refactor(activity): size the avatar badge slot off the static grid - #1387
Merged
Conversation
The badge landed with three raw dp constants. Two of them were already grid values in disguise, so read them from the theme instead: the avatar is `staticGrid.x8` (40dp) and the badge `staticGrid.x4` (20dp). The 48dp slot has no token on either grid. It takes `staticGrid.x10` (50dp), which reads as the avatar plus one grid step of overhang on each side. That is 2dp wider than Figma draws, and it shifts the title by the same 2dp on every row rather than unevenly. Also drops an unused `size` import the badge work left behind.
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.
Follow-up to #1386, which landed the token badge with three raw dp constants.
Two were already grid values in disguise, so they now come from the theme: the avatar is
staticGrid.x8(40dp), the badgestaticGrid.x4(20dp).The 48dp slot has no token on either grid — the 5pt static grid goes 45, 50, and the dynamic grid is screen-size dependent. It takes
staticGrid.x10(50dp), which reads as the avatar plus one grid step of overhang on each side. That is 2dp wider than Figma draws. The trade is a uniform 2dp shift of every row's title rather than an off-grid constant, which seemed the better of the two; happy to go back to a literal 48dp if you'd rather match the design exactly.Also drops an unused
sizeimport the badge work left behind.