Repository navigation
Draw the achievements tab underline as a border, not a fill-width bar - #30
Merged
simonhamp merged 1 commit intoOct 20, 2026
Merged
Conversation
The sheet's tabs drew the web's border-b-2 as a separate w-full h-[2] bar under the label. On Android a w-full child fills to the width of the whole row (ComposeFlexLayout hands a row's children the row's maxWidth, and cross-axis FILL becomes fillMaxWidth), so the first tab swelled to the full row and the second was squeezed to nothing, its label wrapping one character per line. The web draws the underline as border-b-2 on the tab itself; do the same, and no fill-width child remains to inflate the tab.
cchampou
force-pushed
the
fix/achievements-tab-underline
branch
from
October 20, 2026 01:48
3cb7c5e to
efe7140
Compare
Member
|
thanks! |
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.
Problem
In the achievements sheet, the Unix Ranks tab was squeezed into a narrow sliver at the right edge of the tab row, its label wrapping one character per line:
Root cause
The sheet drew the web's
border-b-2tab underline as a separate sibling column withw-full h-[2]under the label. On Android, a Row measures unweighted children withmaxWidth= the row's own width, and a child withwidth: fill(fromw-full) becomesModifier.fillMaxWidth()(ComposeFlexLayout.kt, cross-axis fill branch) — so the underline claimed the entire row width, not the tab's content width:maxWidth ≈ 0→ the "Unix Ranks" label wrapped one character per line.iOS measures content-sized children with
.unspecified, where the bar hugs the label, which is why the two platforms disagreed.Fix
Draw the underline the way the web does:
border-b-2on the tab itself (lane colour when selected,border-transparentotherwise). Nowidth: fillchild remains, so the pressable content-sizes on both platforms. Same height as before (2px bar ↔ 2px border).Proof
Before/after screenshots from the same Android device, the achievements sheet on
mainand on this branch. Before, the first tab swallows the row and "Unix Ranks" is crushed into a 121px-wide, 530px-tall sliver, its text wrapped one character per line; after, both tabs sit side by side, "Unix Ranks" a healthy 224px wide.main)The accessibility trees agree: on
mainthe second tab measures[959,610][1080,1140]— narrow and tall, the vertical text — while on this branch it sits beside Badges at[330,627][554,662].The wire trees confirm the mechanism too. Before — the underline is a fill-width node inside the first tab:
{"type": "column", "ref": "achievements-tab-badges", "children": [ {"type": "column", "layout": {"padding": [6, 12, 6, 12]}, "children": [ {"type": "text", "props": {"text": "Badges (4)"}} ]}, {"type": "column", "layout": {"width": "fill", "height": 2}, "style": {"bg_color": "#2F9E44"}} ]}After — no fill child; the border rides the tab:
{"type": "column", "layout": {"padding": [6, 12, 6, 12]}, "style": {"border_width": 2, "border_color": "#2F9E44"}, "props": {"border_b": 2}, "children": [ {"type": "text", "props": {"text": "Badges (4)"}} ]}Testing
tests/Feature/Screens/AchievementsSheetTest.php— 8 passed