Uh oh!
There was an error while loading. Please reload this page.
feat(you): rebuild the You tab around the tip card - #1291
Open
bmc08gt wants to merge 4 commits into
Open
Conversation
Implements the "Tip Card You Page" design (node 9216:656). The You tab (the Menu feature under the v2 tab bar) drops its app bar and money tiles and leads with the viewer's own tip card: - the card renders opaque at the design's flattened fill, sits under a "Full Screen" affordance that presents it over the camera, and the status-bar clearance moves to the list's content padding so the card's own inset isn't paid twice - a copy row shows the abbreviated tip link and copies the full URL - Share and Download tiles sit below it. Download opens a "Download As" sheet (PNG / SVG) and hands the rendered file to the Sharesheet — Android has no permissionless save-to-Photos, and the chooser already offers Files/Drive/Photos - the full-screen presentation of your own card gets a Close affordance instead of the Send-a-Tip modal, via a new SelfTipCardDecorator - TipCardMaxWidth is raised so a phone-width canvas gets the full 0.82 fraction the design specifies Settings rows are restyled (17sp headline, 24dp icon, chevron extracted to ListItemDefaults) and rearranged: - My Account keeps the account-shaped rows — Change Display Name, Require Biometrics, Blocked - Access Key, Log Out and Delete Account move to Advanced, alongside Beta Features and Application Logs - the standalone App Settings screen is removed; its only surviving toggle moved into My Account, and Auto Start Camera is dropped (the camera now always auto-starts)
Three fixes found on device: * The Share / Download tiles paid 20dp of vertical padding inside a tile whose height is already fixed at 88dp, leaving the label a 14dp box for a 16dp line and clipping its descenders. The centred arrangement was already doing the spacing, so the padding just goes. * "Require Biometrics" sat ~24dp taller than its neighbours: Material applies its 48dp minimum touch target to a Switch only when onCheckedChange is non-null, and 48dp beats the 24dp icon that sets every other row's height. Adds ListItemDefaults.Toggle — a display-only switch pinned to the icon size — and uses it there; the row's own onClick already ran the toggle, and it still does when you tap the switch itself. * The full-screen tip card is now a route (AppRoute.Menu.TipCard) instead of a bill presented into the session's overlay. The card is a static thing to hold up to a camera, so it gets the whole screen: the page drops away downward on push (and the tab bar leaves with it, since this isn't a tab route), the card sits centred at the design's 302/402 of the screen width, and Close sits just above the navigation bar. Node 9277:121410. That last one retires the whole own-card-as-bill path: presentOwnTipCard, Scannable.TipCard.isSelf, and SelfTipCardDecorator.
Full Screen now morphs the card that's already on the You tab rather than navigating to a dedicated TipCardScreen. The card keeps its slot in the list while an inner layer translates it to the display centre and grows it to the 302dp expanded width (node 9277:121410); the rest of the page fades and slides out under it, the tab bar hides via a counted TabBarVisibilityController, and Close/back collapse it. Spring matches iOS's .spring(response: 0.45, dampingFraction: 0.85) — dampingRatio 0.85, stiffness 195. Also: - Copy link now flips to a filled checkmark.circle.fill-style glyph for 1.5s before fading back to the copy icon, matching iOS. - Version footer sits 44dp below the last row to match iOS's 69dp gap. - Switch Accounts moves into Advanced Features next to Beta Features, and the Advanced view model gained the staff/feature-flag filtering it was missing. - MenuList takes an itemModifier that wraps the row *and* its sibling divider, so fading the list out no longer leaves divider hairlines behind. - Clamp the animated tab-bar inset: the underdamped spring undershoots below zero, PaddingValues throws on a negative, and the exception was killing the Recomposer and freezing the whole UI mid-expansion. Removes TipCardScreen, its content and view model, and the session-presented tip card path.
The empty state was a Box wrapping its content, so `align(Center)` centered it against itself and it rendered flush at the top-left of the list. It now fills the viewport and centers there when it's the only thing in the list, and centers within padding when the override sections are present so it can't push them off screen. Text is centered and inset for narrow screens.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Implements the "Tip Card You Page" design (node
9216:656).You tab
The You tab — the Menu feature under the v2 tab bar — drops its app bar and money tiles and leads with the viewer's own tip card.
rgb(16,16,17)) rather than the translucent frosted fill, since nothing is behind it here.TipCodeExporter, and hands the file to the Sharesheet — Android has no permissionless save-to-Photos, and the chooser already surfaces Files/Drive/Photos.TipCardMaxWidthis raised from 270dp to 305dp so a phone-width canvas gets the full 0.82 width fraction the design specifies (302 on a 402 frame). This also enlarges scanned tip cards slightly.Full Screen is an in-place expansion
Tapping the card or "Full Screen" no longer navigates anywhere — it expands the card that's already on screen, matching iOS.
LazyColumn; an inner layer translates it to the display centre while the slot grows to the 302dp expanded width (node9277:121410). Effectively a shared-element morph without a shared-element API, mirroring iOS's clear-slot + offset approach.TabBarVisibilityControllerso overlapping callers can't uncover it..spring(response: 0.45, dampingFraction: 0.85)converted to Compose:dampingRatio = 0.85f, stiffness = 195f.This replaces
TipCardScreen(and its content/view model) and the session-presented own-tip-card path, both of which are removed.MenuListgained anitemModifierthat wraps each row together with its sibling divider —ListItememits the divider outside the row, so fading the list out otherwise left hairlines floating over the expanded card.Settings
Rows are restyled to match the design — 17sp Demi headline, 24dp icon, and the trailing chevron extracted to
ListItemDefaults.Chevron()so callers driving their ownendSlotcan reuse it. The version footer sits 44dp below the last row, matching iOS's 69dp gap.They are also rearranged:
Access Key, Log Out and Delete Account are recovery/destructive actions rather than account details, so they move to Advanced along with their confirmation prompts and auth wiring.
Switch Accounts lives in Advanced next to the other beta tool. It keeps both of its gates — staff/beta unlock and
FeatureFlag.CredentialManager, whichPassphraseCredentialManager.selectCredential()hard-refuses without — and the Advanced view model now applies the staff/flag filtering it had been missing, so flag-gated rows don't flash before their flag resolves.App Settings screen removed
The standalone App Settings screen held two toggles. Require Biometrics folded into My Account (still gated on biometric hardware, still disabled when nothing is enrolled, still prompting before the flip). Auto Start Camera is dropped outright — the camera now always auto-starts — which also removes
SessionState.autoStartCameraand the now-deadCameraDisabledViewbranch inScannableContainer.The
:apps:flipcash:features:appsettingsmodule,AppRoute.Menu.AppSettings, andAppSettingValue.CameraStartByDefaultare gone.