Skip to content

PROTOTYPE: scroll-reactive bottom bar (Instagram-style) (#86)#90

Open
ryanbr wants to merge 4 commits into
mainfrom
prototype-scroll-navbar
Open

PROTOTYPE: scroll-reactive bottom bar (Instagram-style) (#86)#90
ryanbr wants to merge 4 commits into
mainfrom
prototype-scroll-navbar

Conversation

@ryanbr

@ryanbr ryanbr commented Jul 8, 2026

Copy link
Copy Markdown
Owner

Prototype for #86 (Quaii) — a subtle, scroll-reactive bottom bar like Instagram's.

Behaviour

The floating GlassBottomBar recedes (a subtle shrink + fade + slide toward the bottom edge) as you scroll down into content, and returns when you scroll up — so the app feels more dynamic without hiding the tabs. Kept partial by design (scale ~0.88, alpha to 0.6, translateY 22dp) so the tabs stay reachable — "subtle but noticeable," per the request.

How it's wired (built for smooth scroll)

  • One NestedScrollConnection on the NavHost drives it — every screen gets the behaviour with no per-screen wiring (scrollable children dispatch their deltas up to it).
  • onPreScroll only flips a Boolean on a direction change; a 220ms tween animates a single collapse float.
  • The bar applies collapse as a graphicsLayer transform only (GPU, per-frame) — no relayout, because the Scaffold keeps the bar's reserved space. So the content doesn't reflow and scrolling stays smooth.
  • Reduce Motion → bar stays fully shown (no animation).

Scope / testing

  • Android only for now (its bar is a single custom Surface, easy + low-risk). If the feel lands, I'll port to the iOS floating two-island bar + FAB.
  • The transform constants (shrink/fade/slide amounts, 220ms, 3px threshold) are the tuning knobs — easy to dial once you see it.
  • Android compiles locally (compileFullDebugKotlin, exit 0).

⚠️ I can't see the linked sample video (can't fetch the attachment), so this is my read of "subtle Instagram-style size change." If you want it to fully hide on scroll (more like the classic Instagram tab bar) rather than just recede, that's a one-line change to the translationY/alpha — tell me which feel matches the video.

File: android/app/src/main/java/com/noop/ui/AppRoot.kt.

ryanbr added 4 commits July 8, 2026 23:51
… on up (#86)

Instagram-style: the floating GlassBottomBar subtly recedes (shrink + fade + slide
toward the edge) as you scroll DOWN into content and returns when you scroll UP,
so the app feels more dynamic without hiding the tabs.

- One NestedScrollConnection on the NavHost drives it, so every screen gets the
  behaviour with zero per-screen wiring. onPreScroll only flips a Boolean on a
  direction change; a 220ms tween animates a single `collapse` float.
- The bar applies `collapse` as a graphicsLayer transform ONLY (scale ~0.88, alpha
  to 0.6, translateY 22dp, bottom-centre pivot). No relayout — the Scaffold keeps
  the bar's reserved space — so scrolling stays smooth (GPU transform per frame).
- Reduce Motion keeps the bar fully shown (no animation). Subtle by design; the
  transform constants are the tuning knobs. Android only for now.

Android compiles locally.
…e off (#86)

Feedback: the collapsed bar slid too far down (into the gesture-nav area) and
didn't read as transparent. Retuned: fade toward see-through (alpha to ~0.35),
gentler shrink (0.92), and only a hair of drift (22dp -> 6dp) so it recedes IN
PLACE rather than falling off the bottom. Android compiles.
…tabs (#86)

Feedback (correctly, twice): the pill's dark translucent fill read as a solid
"bar" behind the tabs and blocked the content. Drop the fill entirely — the pill
is now just the hairline capsule outline + tab icons floating over the content,
which shows straight through. Also removed the drop shadow (also read as a slab).
Android compiles.
…" band (#86)

The full-width band behind the pill was the Scaffold's RESERVED bottomBar region
(filled with the flat app background), sitting below the tinted content. Moved the
bar out of the bottomBar slot and overlay it (Box + align bottom-centre) on
full-bleed content, so the content's background fills continuously behind the
now-transparent pill — no band. NestedScroll moves to the full-bleed NavHost.

Note: content now scrolls UNDER the floating transparent pill (iOS-style); screens
keep their 28dp bottom padding, so the last item can sit partly behind the bar at
the very bottom of a scroll — a bottom-padding bump is the follow-up if that bites.
Android compiles.
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