Repository navigation
feat(nav): scan wears the tip card, You wears a people circle - #1462
Merged
Merged
Conversation
The scanner tab drew a viewfinder and the You tab drew the tip card, which had the card standing for the account rather than for the thing the scanner points at. Node 10000:111297 swaps them: the scanner gets the tip card glyph, and the You tab falls back to a people circle when the user has no photo. The avatar branch is untouched — a photo still wins. The design file draws the You tab only as an outline, so the selected weight comes from Material instead. Icons.Filled.AccountCircle is the same glyph solid, and its disc lands on ic_people_circle's outer edge (r 10 at 24x24, against the outline's 9.25 centreline plus a 1.5 stroke); only the head moves, 0.5 smaller. Knocking the person out of a solid body is what ic_nav_wallet_selected and ic_nav_tipcard_selected already do. That makes the icon map return a Painter rather than a drawable id, since one of the four now comes from an ImageVector. ic_nav_scan and ic_nav_scan_selected lose their last caller and go with it.
The capture had three bars: the photo slot in both selection states, plus the no-photo glyph unselected. The state it was missing is the one the design file never drew — the people circle selected — which is now the only glyph in the bar coming from Material rather than from the drawables. A fourth bar puts it next to the outline it replaces, so the two can be compared in one image.
Chats sits beside the scanner rather than after the wallet. Scanning a tip card now lands in the chat, so the two tabs that make up the messaging path are adjacent instead of separated by the wallet. NavBarButton.tabs is the only place bar order is expressed; NavigationBar reads its indices from that list, so nothing else moves.
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 free
to 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.
The nav bar had the scanner tab drawing a viewfinder and the You tab drawing the tip card, so the card stood for the account rather than for the thing the scanner points at. Node 10000:111297 swaps them:
ic_nav_tipcard/_selected), because scanning one is what that tab is for.ic_nav_scanandic_nav_scan_selectedlose their last caller and are deleted. The new-user tutorial's "Scan a tip card" card, the other place the old scan outline was used, moves toic_nav_tipcardso the card and the tab it points at match.Where the selected people circle comes from
The design file draws the You tab only as an outline, so there is no filled twin to export.
Icons.Filled.AccountCirclefrommaterial-icons-coreis the same glyph solid, and it lines up: its disc is r 10 at 24×24, againstic_people_circle's 9.25 centreline plus a 1.5 stroke — the same 10.0 outer edge. Only the head moves, 0.5 smaller. Knocking the person out of a solid body is the treatmentic_nav_wallet_selectedandic_nav_tipcard_selectedalready use, so it sits with the rest of the set rather than against it.That makes the icon map return a
Painterinstead of a drawable id, since one of the four now comes from anImageVector.Test ids are unchanged
NavBarButton.testTagstill yieldsnav_scanner,nav_wallet,nav_chats,nav_tipcard. The Maestro flows key off those, not off drawable names, so none of them move.Screenshots
NavigationBarAvatarScreenshotTestgains a fourth bar — no photo, You tab selected — which was the one state neither the photo bars nor the unselected fallback showed.NavigationBarNoAvatarSelectedPreviewcovers the same state in the IDE.Tab order
Chats moves from third to second, so the bar reads scanner, chats, wallet, you.
NavBarButton.tabsis the only place the order is declared —NavigationBarreads it for the row, for the selected index, and for the pill offset — so the list is the whole change. ThetestTagvalues are derived per button rather than per position, so the Maestro selectors still match.