Skip to content

feat(v2): route tip-card & chats tabs through the tipping flow - #1224

Merged
bmc08gt merged 3 commits into
code/cashfrom
feat/v2-tipcard-chats-tabs
Aug 12, 2026
Merged

feat(v2): route tip-card & chats tabs through the tipping flow#1224
bmc08gt merged 3 commits into
code/cashfrom
feat/v2-tipcard-chats-tabs

Conversation

@bmc08gt

@bmc08gt bmc08gt commented Aug 12, 2026

Copy link
Copy Markdown
Collaborator

Summary

Wires the two remaining v2 nav-bar tabs (previously TODO(v2) / null) to the existing tipping flow rather than bespoke screens, so tab taps, deeplinks, and the tip-card decorator all share one code path:

  • NavBarButton.TipCardAppRoute.Sheets.Tips(resumed = true) — flow seeded on the tip card.
  • NavBarButton.ChatsAppRoute.Sheets.Tips(resumed = false) — flow seeded on the list.
  • asNavBarTab maps Sheets.Tips back to a tab by its resumed flag.
  • TippingFlowScreen renders safely as a full-screen tab: LocalBottomSheetDismissDispatcher defaults to a no-op, so the flow's onExit/sheetDismiss is inert when it isn't a sheet.

Because both tabs go through the flow, deeplinks (AppRouter) and TipCardDecorator — which already target Sheets.Tips — need no changes.

Screen consolidation

The v1 and v2 screens collapse into one public, flag-branched screen each (TipCardScreen, TipsScreen), moved out of internal/screens. Both are always flow steps, so they always use the flow-shared TipFlowViewModel; only the chrome differs by FeatureFlag.NewUi:

  • TipCard — v2: centered card + hamburger menu (opens the app menu); v1: title/back + Share scaffold.
  • Tips — v2: flush "Chats" large title, no close/button; v1: centered "Tips" + close + a "Show Tip Card" button.

Also

  • AppBarWithTitle: start/end-aligned titles now sit flush (the phantom leading slot is reserved only for centered titles); adds a screenTitleLarge type token for the Chats title.
  • The shared hamburger icon moves scanner → core so v1 and v2 both resolve it.
  • Adds :shared:featureflags to the tipping module.

Test Plan

  • :apps:flipcash:features:tipping, :core, and :apps:flipcash:app Kotlin-compile.
  • On device: tip-card tab shows the centered card + working hamburger; chats tab shows the tip DM list under a flush "Chats" title; opening a conversation works; deeplink to a tip chat lands in the flow; v1 (NewUi off) tips sheet unchanged (title/close/Show Tip Card).

Note

With resumed = false, the Chats tab shows the profile-setup Intro step if the user has no display name yet (existing flow steps logic) — edge case; can force the list instead if preferred.

@github-actions github-actions Bot added the type: feature New functionality label Aug 12, 2026
AppBarWithTitle reserved a phantom leading slot (a back button's width) for
every title so a centered one stays optically balanced against the end actions.
For a start/end-aligned title that only indents it past a control that isn't
there. Gate the reservation to centered titles, and probe the raw leading icon
(the slot's 5dp padding otherwise makes an empty slot measure non-zero) so a
start-aligned title with no leading control sits flush at the inset.

Add a screenTitleLarge type token for large flush titles (e.g. the Chats tab).
Wire the two remaining v2 nav-bar tabs (were TODO/null) to the existing tipping
flow rather than bespoke screens, so tab taps, deeplinks, and the tip-card
decorator all land in one code path:
- NavBarButton.TipCard -> AppRoute.Sheets.Tips(resumed = true)  (flow at TipCard)
- NavBarButton.Chats   -> AppRoute.Sheets.Tips(resumed = false) (flow at the list)
- asNavBarTab maps Sheets.Tips back to the tab by its resumed flag.
TippingFlowScreen renders safely as a full-screen tab: the sheet-dismiss
dispatcher defaults to a no-op, so the flow's onExit is inert off a sheet.

Collapse the v1/v2 screens into one public flag-branched screen each
(TipCardScreen, TipsScreen), moved out of internal/screens. Both are always
flow steps, so they always use the flow-shared TipFlowViewModel; only the chrome
differs by FeatureFlag.NewUi:
- TipCard: v2 = centered card + hamburger menu; v1 = title/back/share scaffold.
- Tips:    v2 = flush "Chats" large title, no close/button; v1 = "Tips" + close
  + a "Show Tip Card" button.

The shared hamburger icon moves from the scanner module into core so both v1 and
v2 resolve it. Adds :shared:featureflags to the tipping module.
@bmc08gt
bmc08gt force-pushed the feat/v2-tipcard-chats-tabs branch from 5bd7229 to d8b81b2 Compare August 12, 2026 18:36
@bmc08gt bmc08gt changed the title feat(v2): wire tip-card and chats tabs feat(v2): route tip-card & chats tabs through the tipping flow Aug 12, 2026
@github-actions github-actions Bot added the area: ui Compose UI, theme, components, resources label Aug 12, 2026
The tip-card tab is the tipping flow at Sheets.Tips(resumed = true). The flow
seeded its first step from the VM's state.steps, which defaults to [Tips] and
only becomes [TipCard] after the async profile combine resolves — so a tab
switch that crossfades into the tip-card tab briefly rendered the chats list.
Seed [TipCard] straight from route.resumed instead, so the card shows from the
first frame.
@bmc08gt
bmc08gt merged commit 52b5b8b into code/cash Aug 12, 2026
3 checks passed
@bmc08gt
bmc08gt deleted the feat/v2-tipcard-chats-tabs branch August 12, 2026 19:15
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: feature New functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant