Skip to content

fix(mobile): size the bottom bar to the iOS tab bar standard and keep content clear of it - #1295

Open
JonasGao wants to merge 3 commits into
blinkospace:mainfrom
JonasGao:fix/mobile-bottom-bar-safe-area
Open

JonasGao wants to merge 3 commits into
blinkospace:mainfrom
JonasGao:fix/mobile-bottom-bar-safe-area

Conversation

@JonasGao

Copy link
Copy Markdown

Summary

On phones the bottom bar is a fixed 60px strip and no page reserves room for it, so the end of a list scrolls underneath. On iPhones with a home indicator the bar stops above the screen edge, because env(safe-area-inset-*) stays 0 without viewport-fit=cover.

Before After
Bar height 60px 49px + env(safe-area-inset-bottom) (iOS tab bar)
Icons 24px 28px
Glass own blur(20px) shares the header's getMobileGlassStyle()
Room for the bar none page-level scrollers pad their bottom by the bar height
 app/index.html
-  …, interactive-widget=resizes-content
+  …, interactive-widget=resizes-content, viewport-fit=cover

 ScrollArea
+  reserveMobileBottomBar?: boolean                  // opt-in; ignored on desktop and when the bar is disabled
+  paddingBottom: calc(49px + env(safe-area-inset-bottom))
-  {fixMobileTopBar && !isPc && <div className="h-16"></div>}
+  {fixMobileTopBar && !isPc && <div className="h-14"></div>}   // the mobile header is 56px

 page-level scrollers: notes, resources, settings, plugin, review, analytics, detail, hub
+  <ScrollArea … reserveMobileBottomBar>

 Layout (outer scroller)
+  reserveMobileBottomBar={location.pathname === '/ai'}     // the one page without its own scroller

 pages/ai.tsx
-  height: calc(100% - 60px)                              // ignored the "Hidden navigation bar on mobile" setting
+  height: 100%

The reservation is opt-in so lists inside popovers and dialogs, which render above the bar, keep their size.

LoadingAndEmpty now renders nothing once loaded: its zero-height loader still took 3px of margin, which left a strip under the note list. Same component as #1255 / #1222, different reason; the changes do not overlap.

Evidence

Chromium at 390×844, Android user agent, main vs this branch.

End of the Analytics page (last 560px):

Before After
Analytics on main: chart legend under the bottom bar Analytics with this PR: chart legend above the bar

The last chart's legend is under the bar before and clear of it after.

End of the note list:

Before After
Note list on main: 60px bar, footer under the bar Note list with this PR: 49px bar, footer above the bar

Measured after the change:

  • bar 49px, rgba(255, 255, 255, 0.5) with blur(10px): the header's values
  • note list scroller padding-bottom: 49px, its bottom edge on the viewport bottom (7px above it before)
  • hashtag popover list, a nested ScrollArea, unchanged: padding-bottom: 0, 124px tall

Merge Danger

Door: two-way

Layout only. Reverting restores the 60px bar and removes the reservation; no data or schema change.

Blast Radius: Mobile layout

  • Every page-level scroller gains 49px + safe area of bottom padding on phones. Desktop is untouched.
  • viewport-fit=cover opts the whole page into the unsafe areas, and only the bottom inset is handled here. Nothing pads for the top one (home-screen apps with a translucent status bar) or the left and right ones (landscape on notched iPhones).
  • Chromium reports 0 for the safe-area insets, so only that case was exercised. The inset-dependent sizes were not.

🤖 Generated with Claude Code

JonasGao and others added 3 commits November 25, 2026 18:21
…d keep content clear of the bottom bar

On phones the bottom bar is a fixed 60px strip and no page reserves room
for it, so whatever sits at the end of a list scrolls underneath. On
iPhones with a home indicator iOS keeps the page inside the safe area, so
the bar ends above the screen edge: env(safe-area-inset-*) is always 0
unless the viewport opts into viewport-fit=cover.

- size the bar to the iOS tab bar standard: 49px plus the bottom safe
  area, keeping the 28px icons above the home indicator
- opt the viewport into viewport-fit=cover
- page-level ScrollAreas pad their bottom by the bar height on mobile,
  so content scrolls under the bar and the last row still clears it.
  The reservation is opt-in (reserveMobileBottomBar), so lists in
  popovers and dialogs, which render above the bar, are untouched
- the outer layout scroller reserves only for the AI page, which has no
  scroller of its own; drop that page's own 60px reservation, which
  ignored the "Hidden navigation bar on mobile" setting
- align the fixed-header placeholder with the 56px mobile header (it
  reserved 64px)

Co-Authored-By: Claude Code <noreply@anthropic.com>
The fixed mobile header and the bottom bar drew the same translucent
glass twice with different values (blur(10px) vs blur(20px)), so the two
bars did not match. Fold the header's style into getMobileGlassStyle()
and use it for both.

Co-Authored-By: Claude Code <noreply@anthropic.com>
When it is neither loading nor empty, the component still rendered its
wrapper with a zero-height loader whose 8px top and -5px bottom margins
left a 3px strip in the layout, which kept the note list from reaching
the bottom edge on mobile. Return null instead.

Co-Authored-By: Claude Code <noreply@anthropic.com>

This branch has not been deployed

No deployments
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