Skip to content

Rank: stack under the profile icon, tappable hint, overflow-proof label - #107

Merged
ehsan6sha merged 3 commits into
mainfrom
fix/rank-placement-and-tap
Aug 24, 2026
Merged

Rank: stack under the profile icon, tappable hint, overflow-proof label#107
ehsan6sha merged 3 commits into
mainfrom
fix/rank-placement-and-tap

Conversation

@ehsan6sha

Copy link
Copy Markdown
Member

Follow-up to #106 from live testing.

TAP-TO-HINT: desktop got the hint on hover for free; touch did not - Tooltip's default touch trigger is a LONG PRESS, which nobody discovers. Now triggerMode: tap (hover still works), showDuration 5s, and the hint reads as an action: 'Gold - add 1.4 TB of storage to reach Platinum'.

PLACEMENT: moved out of the title into the leading slot, stacked directly under the profile avatar. That has a deliberate cost - the toolbar is a fixed 56px, so the column (avatar 24 + gap 2 + badge 28 = 54) only fits if the avatar drops to radius 12 and the tap target is 28 rather than the ideal 48. Not growing the header was an explicit requirement, so it wins; the target is still more than twice the glyph row.

leadingWidth is reserved from the VIEWPORT and signed-in flag only, never the rank. The rank arrives async, so deriving width from it would jolt the title sideways the moment billing resolved.

Avatar and badge are separate tap targets: avatar opens the profile sheet, badge shows the hint. One shared region would make the hint unreachable.

OVERFLOW GUARD: the badge's Row had no protection against its content exceeding its slot. The widget tests caught it, but it is a real production path - a large OS text scale makes 'Platinum' wider than the reserved width. Pips stay fixed; the name yields via Flexible + ellipsis.

analyze clean, 964 tests.

Two changes.

TAP-TO-HINT
Desktop showed the 'what do I need for the next rank' hint on hover for
free. Touch did not: Tooltip's default touch trigger is a LONG PRESS,
which nobody discovers. triggerMode: tap adds the tap trigger without
removing hover, and showDuration goes to 5s because the 1.5s default is
tuned for a hover the user can simply hold. The hint is also reworded as
an action - 'Gold - add 1.4 TB of storage to reach Platinum' - since the
point is telling the user what to DO.

PLACEMENT
Moved out of the title and into the leading slot, stacked directly under
the profile avatar.

That costs something, and the cost is deliberate: the toolbar is a fixed
56px, so the column (avatar 24 + gap 2 + badge 28 = 54) only fits if the
avatar drops to radius 12 and the badge's tap target is 28 rather than
the ideal 48. The header must not grow - that was an explicit
requirement - so it wins over the larger target. The badge is still more
than twice the height of the glyph row it wraps.

leadingWidth is reserved from the VIEWPORT and the signed-in flag only,
never from the rank. The rank arrives asynchronously, so deriving width
from it would jolt the title sideways the moment billing resolved.

Avatar and badge are separate tap targets on purpose: the avatar opens
the profile sheet, the badge shows the hint. One shared gesture region
would make the hint unreachable.

Tests updated to the new geometry and extended: the badge must sit BELOW
the avatar and left-aligned with it, the stacked column must fit the
toolbar, and the rank must never overlap the title.
The badge's Row had no protection against its own content exceeding the
width it is given, so the tier name could paint overflow stripes into the
header. Widget tests caught it (their default font is a full em square
per glyph, so 'Platinum' is wider there) but it is a real production
path too: an OS-level text-scale setting makes the name wider than the
reserved leading width.

The pips are the rank signal and stay fixed; the NAME is what yields -
Flexible + ellipsis, so the badge cannot overflow whatever width it gets.
@ehsan6sha
ehsan6sha merged commit 3ddf6d7 into main Aug 24, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant