fix(nav): align mobile compose FAB and scroll-to-top as a 48px circle pair - #893
Conversation
… pair The bottom-right compose FAB rendered as a horizontal pill rather than a circle: it is a <Button>, whose `md` size class injects `h-[2.125rem]`, which won over the FAB's `h-14` (height lost, width kept), so `rounded-full` on a 56x34 box produced a stadium shape. It also sat at a different bottom offset and size than the scroll-to-top control, so the two never lined up. - FAB: force a true circle with `!h-12 !w-12` (48px) so the height beats the Button's injected size class; keep its tuned bottom offset. - scroll-to-top (mobile only): match the FAB at 48px circle and the same `safe-area + 4.75rem` bottom (desktop stays 40px). Also match the FAB's in-app (RN) bottom so the pair stays level there too. Result: two identical 48px circles, level on opposite bottom corners.
Greptile SummaryThis is a CSS/positioning polish PR that fixes the mobile compose FAB rendering as a pill and aligns it with the scroll-to-top button as a matched 48 px circle pair.
Confidence Score: 5/5Safe to merge — two isolated CSS/positioning changes with no logic or data-flow impact. Both changes are narrow and self-consistent: the No files require special attention. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Viewport width] -->|≥ 768px desktop| B[scroll-to-top: 40×40 px\nright: 20px, bottom: 20px]
A -->|< 768px mobile| C{is-inapp-browser?}
C -->|No| D[scroll-to-top: 48×48 px\nleft: 16px\nbottom: env safe-area + 4.75rem]
C -->|Yes RN webview| E[scroll-to-top: 48×48 px\nleft: 16px\nbottom: 7rem]
F[Compose FAB navbar-mobile.tsx] --> G{isInRn?}
G -->|No| H[right: 1rem\nbottom: env safe-area + 4.75rem\n!h-12 !w-12 = 48px circle]
G -->|Yes| I[right: 1rem\nbottom: 7rem\n!h-12 !w-12 = 48px circle]
D -.->|matched pair| H
E -.->|matched pair| I
Reviews (1): Last reviewed commit: "fix(nav): align mobile compose FAB and s..." | Re-trigger Greptile |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughMobile floating action buttons (compose FAB and scroll-to-top) are resized and repositioned for coordinated layout on mobile devices. The compose button is reduced from 56px to 48px, and the scroll-to-top button is adjusted to match with updated safe-area inset calculations and conditional styling for in-app browser contexts. ChangesMobile floating button alignment
Possibly related PRs
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~3 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
What & why
Follow-up polish to the recent mobile nav changes. On mobile the bottom-right compose FAB rendered as a horizontal pill instead of a circle, and it did not line up with the bottom-left scroll-to-top button (different size and different bottom offset).
Root cause of the pill shape
The FAB is a
<Button>. The Button component injects itsmdsize classh-[2.125rem](34px), which won over the FAB'sh-14(56px): height was clamped whilew-14(56px) stuck.!rounded-fullon a 56x34 box renders as a stadium/pill, which is exactly what showed on the device.Changes
navbar-mobile.tsx): force a true circle with!h-12 !w-12(48px) so the height beats the Button's injected size class. Bottom offset unchanged (it was already nicely placed).scroll-to-top/_index.scss, mobile only): match the FAB at a 48px circle and the samesafe-area-inset-bottom + 4.75rembottom (was 40px @+5.5rem). Desktop is untouched (stays 40px). Also matches the FAB's in-app (RN) bottom so the pair stays level in the native webview too.Result
Two identical 48px circles, level on opposite bottom corners: a clean matched pair, with the same blue and the same icon size (20px).
Verification
navbar-mobile.spec.tsx: 7/7 passCSS-only / positioning change, no logic touched. Best reviewed on a mobile viewport (< 768px).
Summary by CodeRabbit