Skip to content

fix(nav): stop the faded-out tab bar taking taps - #1358

Merged
bmc08gt merged 1 commit into
code/cashfrom
fix/navbar-hidden-not-clickable
Aug 28, 2026
Merged

fix(nav): stop the faded-out tab bar taking taps#1358
bmc08gt merged 1 commit into
code/cashfrom
fix/navbar-hidden-not-clickable

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 28, 2026

Copy link
Copy Markdown
Collaborator

Expanding a token card on the wallet fades the tab bar out with alpha = 1f - cardExpansion.progress.value. Alpha doesn't gate pointer input, so the invisible bar still took taps and switched tabs — and that tap was unrecoverable.

CardExpansionController is owned at the app root (App.kt) so its fly-state survives a push over the wallet, but the only code that ever returns progress to 0 is collapse in CardExpandHost, which lives inside the wallet nav entry. Tapping the invisible bar left the wallet, so nothing was left able to collapse the expansion: progress stuck at 1 and the tab bar stayed invisible on every tab for the rest of the Activity's life. Only relaunching the Activity brought it back.

Changes

Both are needed. Dropping the bar from the tree on its own would leave a stuck expansion with no visible and no tappable bar, which is worse than today.

  • Scope the fade to the wallet tab. A route change mid-expansion can no longer strand the bar faded out with nothing left to bring it back.
  • Drop NavigationBar from the tree once the fade completes. The if (!fadedOut) sits inside the existing AnimatedVisibility content, not in its visible, so the slide-out doesn't also play over an already-transparent bar and the return is still a fade in place. derivedStateOf limits the recomposition to the two frames the boolean flips on, rather than one per frame of the expansion.

The fade moves from the AppContent call site into AppNavigationBar, which now takes the controller rather than a Float — reading progress inside the graphicsLayer keeps a frame of the expansion from recomposing the bar.

Repro

Wallet → tap a token row → card expands, tab bar fades out → tap where a tab button was. Before: navigates to that tab and the bar is invisible everywhere until the app is relaunched. After: nothing happens; back collapses the card and the bar fades back in.

Expanding a token card on the wallet fades the tab bar out with
`alpha = 1f - cardExpansion.progress.value`. Alpha doesn't gate pointer
input, so the invisible bar still took taps and switched tabs — and that
tap was unrecoverable: `CardExpansionController` is owned at the app root
so its fly-state survives a push, but the only code that returns
`progress` to 0 is `collapse` in `CardExpandHost`, which lives inside the
wallet nav entry. Leaving the wallet mid-expansion left nothing able to
collapse it, so `progress` stuck at 1 and the bar stayed invisible on
every tab for the rest of the Activity's life.

Two changes, both needed — dropping the bar from the tree alone would
leave a stuck expansion with no visible *and* no tappable bar, which is
worse:

- Scope the fade to the wallet tab, so a route change can't strand the
  bar faded out with nothing left to bring it back.
- Drop `NavigationBar` from the tree once the fade completes, inside the
  existing `AnimatedVisibility` content so the slide-out doesn't also
  play and the return is still a fade in place. `derivedStateOf` keeps
  that to the two frames the boolean flips on rather than one
  recomposition per frame of the expansion.

The fade itself moves from the `AppContent` call site into
`AppNavigationBar`, which now takes the controller rather than a Float —
reading `progress` inside the `graphicsLayer` keeps a frame of the
expansion from recomposing the bar.
@bmc08gt bmc08gt self-assigned this Aug 28, 2026
@github-actions github-actions Bot added the type: fix Bug fix label Aug 28, 2026
@bmc08gt
bmc08gt merged commit 18e06c8 into code/cash Aug 28, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the fix/navbar-hidden-not-clickable branch August 28, 2026 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant