Skip to content

CC-101: Improve Component Library Mobile Support#30

Merged
ianpaschal merged 8 commits into
masterfrom
ian/cc-101-improve-component-library-mobile-support
Jun 13, 2026
Merged

CC-101: Improve Component Library Mobile Support#30
ianpaschal merged 8 commits into
masterfrom
ian/cc-101-improve-component-library-mobile-support

Conversation

@ianpaschal

@ianpaschal ianpaschal commented Jun 12, 2026

Copy link
Copy Markdown
Owner

Resolves CC-101

Summary by CodeRabbit

  • New Features

    • Added a footer bar component with action groups and Storybook examples.
    • Tabs can now render as a footer wrapper when configured.
  • Style

    • Overlays, navigation, drawers, dialogs, menus, inputs, tabs and select popups now respect device safe-area insets and constrain to the visible viewport.
    • Updated global color palette and added a footer-height CSS token.

@coderabbitai

coderabbitai Bot commented Jun 12, 2026

Copy link
Copy Markdown

Review Change Stack

Important

Review skipped

Auto incremental reviews are disabled on this repository.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 866537f3-8872-44e4-8cb7-ecaf681117df

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Walkthrough

This pull request updates CSS layouts across six UI component modules to account for device safe-area insets. Changes include incorporating env(safe-area-inset-top) into navigation component heights and padding, updating modal and popup centering calculations to use viewport-aware positioning, adjusting drawer interior padding with safe-area values, constraining mobile menu popup height, and extending footer component spacing with bottom safe-area inset. All changes use standard CSS env() custom properties for device notch and rounded-corner accommodation.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly describes the main objective of the changeset: improving mobile support for the component library by adding safe-area inset handling across multiple components.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ian/cc-101-improve-component-library-mobile-support

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/Drawer/Drawer.module.scss`:
- Line 248: The global padding line that adds env(safe-area-inset-top) is
applied to all drawers; change it to conditional padding based on the drawer
anchor using the data attribute data-swipe-direction (e.g., apply
env(safe-area-inset-top) only when data-swipe-direction="top",
env(safe-area-inset-bottom) only when data-swipe-direction="bottom", and
similarly env(safe-area-inset-left/right) for left/right) so header/content
spacing for Drawer components is correct; update both occurrences of the padding
rule to use direction-scoped selectors that add the appropriate safe-area inset
for that anchor.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: d30061f6-a3f0-4872-bde3-b67b2a9efa7f

📥 Commits

Reviewing files that changed from the base of the PR and between 7532c82 and 8f4c482.

📒 Files selected for processing (7)
  • src/components/AppNavigation/AppNavigation.module.scss
  • src/components/AppNavigation/components/MobileNavigation/MobileNavigation.module.scss
  • src/components/DialogManager/Dialog.module.scss
  • src/components/Drawer/Drawer.module.scss
  • src/components/InputPanel/InputPanel.module.scss
  • src/components/Menu/components/MobileMenu/MobileMenu.module.scss
  • src/components/Tabs/components/TabsList/TabsList.module.scss

Comment thread src/components/Drawer/Drawer.module.scss Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/components/Tabs/components/TabsList/TabsList.module.scss (1)

34-37: 🎯 Functional Correctness | 🟡 Minor

Add env(..., 0px) fallbacks for footer safe-area insets in TabsList.module.scss

This footer block uses env(safe-area-inset-bottom/right/left) without fallbacks, which can make the calc(...) invalid in environments where env() fallback behavior isn’t available. Other parts of the repo already use env(..., 0px) in some safe-area calculations, so adding it here improves robustness.

Suggested fix
-        height: calc(var(--app-bar-height) + env(safe-area-inset-bottom));
-        min-height: calc(var(--app-bar-height) + env(safe-area-inset-bottom));
-        padding: calc(var(--spacing) - var(--border-width)) 0 calc(var(--spacing) + env(safe-area-inset-bottom));
+        height: calc(var(--app-bar-height) + env(safe-area-inset-bottom, 0px));
+        min-height: calc(var(--app-bar-height) + env(safe-area-inset-bottom, 0px));
+        padding: calc(var(--spacing) - var(--border-width)) 0 calc(var(--spacing) + env(safe-area-inset-bottom, 0px));
@@
-      padding: 0 calc(var(--page-padding) + env(safe-area-inset-right)) 0 calc(var(--page-padding) + env(safe-area-inset-left));
+      padding: 0 calc(var(--page-padding) + env(safe-area-inset-right, 0px)) 0 calc(var(--page-padding) + env(safe-area-inset-left, 0px));
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/components/Tabs/components/TabsList/TabsList.module.scss` around lines 34
- 37, Replace raw env(safe-area-inset-...) usages with fallbacks so calc() won't
become invalid where env() lacks support: update the three occurrences in
TabsList.module.scss (the height, min-height and padding lines using
env(safe-area-inset-bottom)) to use env(safe-area-inset-bottom, 0px); also scan
the same module for any env(safe-area-inset-left/right) and add , 0px fallbacks
there as needed.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/components/Select/Select.hooks.ts`:
- Around line 54-65: The subscribe function currently creates an anonymous
resize handler and never removes the global listener, and
useSafeCollisionPadding calls useSyncExternalStore without a SSR-safe
getServerSnapshot; implement a getServerSnapshot function that returns a safe
fallback for SSR and pass it as the third argument to useSyncExternalStore
(referencing getSnapshot/getServerSnapshot and useSafeCollisionPadding), and
refactor subscribe so the resize handler is a named/closed-over function
(reference measureSafeAreas, cachedSafeAreas, listeners, initialized) that is
added once and removed via window.removeEventListener when the last subscriber
unsubscribes (i.e., on listeners.delete(listener) if listeners.size === 0 also
remove the global handler and reset initialized as needed).

In `@src/components/Select/Select.module.scss`:
- Around line 52-54: The popup's min-width (min-width: var(--anchor-width)) can
exceed the available space and ignore max-width; in Select.module.scss locate
the rule that sets min-width: var(--anchor-width) (the popup/select dropdown
styles) and change it to constrain the min to the smaller of anchor and
available width by using CSS min() (or an equivalent clamp) so the popup will
never force a width larger than var(--available-width) while still honoring the
anchor size; keep the existing max-width: var(--available-width) and max-height
unchanged.

---

Outside diff comments:
In `@src/components/Tabs/components/TabsList/TabsList.module.scss`:
- Around line 34-37: Replace raw env(safe-area-inset-...) usages with fallbacks
so calc() won't become invalid where env() lacks support: update the three
occurrences in TabsList.module.scss (the height, min-height and padding lines
using env(safe-area-inset-bottom)) to use env(safe-area-inset-bottom, 0px); also
scan the same module for any env(safe-area-inset-left/right) and add , 0px
fallbacks there as needed.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 322fa0ec-c332-4d9e-aa0d-871d687e8f17

📥 Commits

Reviewing files that changed from the base of the PR and between 8f4c482 and 036dde7.

📒 Files selected for processing (10)
  • src/components/AppNavigation/AppNavigation.module.scss
  • src/components/AppNavigation/components/MobileNavigation/MobileNavigation.module.scss
  • src/components/DialogManager/Dialog.module.scss
  • src/components/Drawer/Drawer.module.scss
  • src/components/InputPanel/InputPanel.module.scss
  • src/components/Menu/components/MobileMenu/MobileMenu.module.scss
  • src/components/Select/Select.hooks.ts
  • src/components/Select/Select.module.scss
  • src/components/Select/Select.tsx
  • src/components/Tabs/components/TabsList/TabsList.module.scss

Comment thread src/components/Select/Select.hooks.ts
Comment thread src/components/Select/Select.module.scss Outdated

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@src/components/AppNavigation/components/MobileNavigation/MobileNavigation.module.scss`:
- Line 69: The padding shorthand in MobileNavigation.module.scss currently uses
a fixed bottom value of 1rem; change the bottom padding to include the bottom
safe-area inset so the bottom spacing becomes 1rem plus
env(safe-area-inset-bottom) (i.e., replace the bottom component of the existing
padding shorthand with a calc that adds env(safe-area-inset-bottom) to the 1rem
value) so menu items won't sit under the home indicator.

In `@src/components/FooterBar/FooterBar.tsx`:
- Around line 31-41: The useEffect sets the CSS custom property
'--footer-bar-height' via the ResizeObserver but the cleanup only disconnects
the observer; update the cleanup returned by useEffect in FooterBar.tsx (the
effect using contentRef and ResizeObserver) to both disconnect the observer and
clear the CSS property (e.g., call
document.documentElement.style.removeProperty('--footer-bar-height') or set it
to an empty string) so the variable is removed when the component unmounts.
- Line 27: The default prop portalTarget = document.body will throw during SSR;
change FooterBar (and likewise AppNavigation) so portalTarget is not evaluated
at module/render time: remove the document.body default (use undefined or null
as the prop default) and inside the component (e.g., in FooterBar) compute a
safe runtime target by checking typeof document !== "undefined" (or using
useEffect to set a ref/state) and fallback to document.body only on the client
before creating the portal; update any usages that rely on the old default to
accept an optional portalTarget.

In `@src/components/Tabs/components/TabsList/TabsList.hooks.tsx`:
- Line 20: The JSX fragment return in TabsList.hooks.tsx currently includes a
trailing space ("<>{children} </>") that will render extra whitespace; update
the return in the component hook to remove the trailing space so it renders as a
plain fragment containing children (i.e., change the fragment around children to
have no extra spaces) — locate the return that uses the fragment with children
and remove the space before the closing tag.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

Run ID: 78171a57-624f-4677-8468-622413cb3e3e

📥 Commits

Reviewing files that changed from the base of the PR and between 8f4c482 and b0510b6.

📒 Files selected for processing (22)
  • src/components/AppNavigation/AppNavigation.module.scss
  • src/components/AppNavigation/components/MobileNavigation/MobileNavigation.module.scss
  • src/components/DialogManager/Dialog.module.scss
  • src/components/Drawer/Drawer.module.scss
  • src/components/FooterBar/FooterBar.module.scss
  • src/components/FooterBar/FooterBar.module.scss.d.ts
  • src/components/FooterBar/FooterBar.stories.tsx
  • src/components/FooterBar/FooterBar.tsx
  • src/components/FooterBar/FooterBarActions.module.scss
  • src/components/FooterBar/FooterBarActions.module.scss.d.ts
  • src/components/FooterBar/FooterBarActions.tsx
  • src/components/FooterBar/index.ts
  • src/components/InputPanel/InputPanel.module.scss
  • src/components/Menu/components/MobileMenu/MobileMenu.module.scss
  • src/components/Select/Select.hooks.ts
  • src/components/Select/Select.module.scss
  • src/components/Select/Select.tsx
  • src/components/Tabs/components/TabsList/TabsList.hooks.tsx
  • src/components/Tabs/components/TabsList/TabsList.module.scss
  • src/components/Tabs/components/TabsList/TabsList.tsx
  • src/index.ts
  • src/style/variables.scss

Comment thread src/components/FooterBar/FooterBar.tsx
Comment thread src/components/FooterBar/FooterBar.tsx
Comment thread src/components/Tabs/components/TabsList/TabsList.hooks.tsx Outdated
@ianpaschal ianpaschal merged commit 288cad3 into master Jun 13, 2026
2 checks passed
@ianpaschal ianpaschal deleted the ian/cc-101-improve-component-library-mobile-support branch June 13, 2026 13:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant