Repository navigation
Stop the theme picker cutting its last card in half - #10
Merged
Merged
Conversation
The strip and the Save/Export/Import cluster shared one flex row, so the buttons took roughly 280px off the width the chips scroll in and the tenth theme was always sliced down the middle -- which reads as a broken card, not as an invitation to scroll. The actions move onto the heading's line, where there was already empty space beside the word "Theme", and the strip takes the full width of a row of its own. On the window in the report all ten themes now fit without scrolling at all; on a narrow one the strip still scrolls, and snapping to chip boundaries means a scroll can no longer come to rest on half a card either. Costs about 14px of the top region, which the picker was spending on being unreadable. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp
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.
Reported from the Theme tab: the picker strip's last card ("Holo") is cut in half by the Save as a theme / Export / Import cluster sitting beside it.
Why it happened
.atf-studio__topwas a flex row: the picker on the left, the actions on the right. The strip scrolls horizontally (overflow-x: auto), so whatever shares its line silently takes width away from it — about 280px for those three buttons. Ten chips at 92px plus gaps need ~1,064px; the strip was getting ~950px, so it always ended mid-card.The failure mode is what makes it worth fixing rather than nudging: a strip that runs out of room at the panel edge reads as "there is more, scroll". A strip that runs out of room against a button cluster reads as a broken card.
The layout
Two stacked rows instead of two side-by-side columns:
The actions move onto the heading's line, where there was already empty space beside the word "Theme"; the strip gets the full width of a row of its own. On the window in the report all ten themes now fit without scrolling at all. On a narrower window it still scrolls — and
scroll-snap-type: x proximitywithscroll-snap-align: starton the chips means a scroll can no longer come to rest on half a card either.Cost: about 14px of the top region — the difference between a 12px heading line and a 30px button line. That region is budgeted at ~110px precisely so the token controls stay above the fold (there's a comment in
theme-studio.tsexplaining why the picker became a horizontal strip in the first place), and 14px does not threaten it. The picker was spending that width on being unreadable.Also removed the now-unused
.atf-studio__pickerrule, and dropped themargin-block-end: 4pxthat existed only to lift the buttons off the strip's scrollbar gutter.Verification
Chrome control was switched off by the organization partway through this task, so I could not take an "after" screenshot — flagging that rather than implying I eyeballed it. Instead the structural fact is pinned by tests, which is the more durable check anyway:
tests/vitest/theme-studio-layout.test.ts(3 cases): the actions and the heading share.atf-studio__topbar; the strip's parent is.atf-studio__topand has no.atfs__actionschild of its own — i.e. nothing shares the strip's row; and every theme is rendered rather than the overflow being dropped.tscclean, builder bundle rebuilt and deployed to the 8889 site.The change affects both places the component mounts — the builder's Theme tab and the standalone Theme Studio window — since they share
mountThemeControls().Worth a reload and a look on your side, since I could not.
🤖 Generated with Claude Code
https://claude.ai/code/session_0119U4sRRWGcTQdwYreTwpAp