Skip to content

fix(ui): restore BottomBar padding after Modal migration - #1170

Merged
bmc08gt merged 3 commits into
code/cashfrom
fix/bottombar-modal-padding
Jul 29, 2026
Merged

fix(ui): restore BottomBar padding after Modal migration#1170
bmc08gt merged 3 commits into
code/cashfrom
fix/bottombar-modal-padding

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Jul 28, 2026

Copy link
Copy Markdown
Collaborator

Problem

PR #1128 (chore(ui): have BottomBarContainer render using Modal) switched BottomBarContainer to the shared Modal composable. Because the old inline Column and Modal have different layout opinions, the bottom bar no longer renders the way it did before — most visibly in its padding and alignment.

Concrete differences it picked up from Modal's defaults (example values for the NORMAL width class: inset=20, grid.x2=10, grid.x3=15):

Aspect Original inline Column After Modal migration
Top padding inset (20) grid.x2 (10) — halved
Bottom padding 0 (nav bars only) grid.x2 (10) — extra gap on top of the last button's own bottom padding
Item spacing grid.x3 (15) grid.x2 (10) — tighter
Horizontal alignment Start CenterHorizontally — title/subtitle centered

Fix

Modal's centered, symmetric-padding defaults are correct for its other caller (ReceivedFundsConfirmation), so rather than change the defaults:

  • Modal gains two params — contentPadding: PaddingValues and horizontalAlignment: Alignment.Horizontal — whose defaults exactly match the previous hard-coded values, so all existing callers are unaffected.
  • BottomBarContainer passes the original BottomBarView layout values: top/horizontal-only inset padding, Alignment.Start, and grid.x3 item spacing.

Testing

  • ./gradlew :ui:components:compileDebugKotlin compiles clean.
  • Other Modal caller (ReceivedFundsConfirmation) uses Modal {} with no layout args → keeps unchanged defaults.

Typography

Also aligns the bar's text styles with the design:

  • Title: textMedium (16sp) → textLarge (20sp SemiBold)
  • Message/subtitle: textSmall (14sp) → caption (12sp Medium)

Exit animation

While verifying, the BottomBar's slide-out (exit) animation was missing — dismissing a modal made it vanish instantly instead of sliding down. Cause: BottomBarManager.setMessageShown(id) clears the active message immediately on close (so other screens don't re-show it), setting bottomBarMessage to null before the AnimatedContent exit transition completes. BottomBarView early-returns on a null message, so the outgoing frame rendered nothing.

Fix: retain the last non-null message and render it during the transition, so the outgoing content stays on screen to animate out. Verified with Maestro (Menu → My Account → Log Out → Cancel) by recording the dismissal — the modal now slides down and off-screen over several frames rather than disappearing in one.

PR #1128 migrated BottomBarContainer to the shared Modal composable but
inherited Modal's own layout defaults, changing how the bar renders:
- top inset padding was halved (inset -> grid.x2)
- an extra bottom gap was added (grid.x2, on top of the button's own padding)
- item spacing tightened (grid.x3 -> grid.x2)
- title/subtitle became center-aligned instead of start-aligned

Parameterize Modal with contentPadding and horizontalAlignment (defaults
unchanged, so other callers like ReceivedFundsConfirmation are unaffected)
and pass the original BottomBarView values from BottomBarContainer.
@github-actions github-actions Bot added type: fix Bug fix area: ui Compose UI, theme, components, resources labels Jul 28, 2026
bmc08gt added 2 commits July 28, 2026 19:42
… visible

The manager clears the active message immediately on close (so other screens
don't re-show it), which set bottomBarMessage to null before the AnimatedContent
exit transition finished. BottomBarView early-returns on a null message, so the
outgoing frame rendered nothing and the bar appeared to vanish instantly instead
of sliding out.

Retain the last non-null message and render that during the transition so the
slide-out animation is visible.
@bmc08gt
bmc08gt merged commit 5a0d284 into code/cash Jul 29, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the fix/bottombar-modal-padding branch July 29, 2026 02:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: ui Compose UI, theme, components, resources type: fix Bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant