Skip to content

Keep long Select options in line with the rest (4.13.1) - #199

Merged
tmccoy14 merged 3 commits into
mainfrom
fix/select-long-options
Oct 15, 2026
Merged

tmccoy14 merged 3 commits into
mainfrom
fix/select-long-options

Conversation

@tmccoy14

@tmccoy14 tmccoy14 commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

In a Select with a capped width, a long option that isn't selected sits left of the others: up to 14px when its content can't shrink, and 4–5px when plain text wraps. The selected option lines up because its checkmark holds the check column open.

Fix

  • Check column: .select-item-indicator gets shrink-0. Its fixed size-3.5 could shrink, and an empty one shrank first.
  • Option text: wrapped in a .select-item-text span with min-w-0 wrap-anywhere. Long text wraps inside the row as before, and an unbreakable string such as a hash now breaks onto more lines instead of running 348px past it. Radix strips className and style from ItemText, so the class has to live on a wrapper. The trigger's value is unaffected, because Radix portals only ItemText's children into it.
  • One line, if you want it: a consumer can wrap the text in a block truncate span with a title. The wrapper's min-w-0 lets that shrink and truncate inside the row.
  • Docs: a new Long options section on the Select page, with a wrapping example and a truncated example, both capped at w-56!.
  • Released as 4.13.1, with a changelog entry.

Before / after (Studio project switcher)

Before
before-dark

After
after-studio-followup-dark

Testing

  • Unit tests (80), lint, Prettier and the full build, docs site included, pass. jsdom can't check layout, so the checks below ran in a browser.
  • Docs page: in the wrapping example, every check column is 14px and nothing passes the row's edge. The two long names take 2 lines and the hash 4. In the truncated example, every row is one line with an ellipsis and a full-text title.
  • Studio: against this build, the project switcher and breadcrumb-search e2e specs pass (25 passed, 1 skipped), and every row's check column holds 14px.

Follow-up in Studio

Studio's selectors render labels as inline-block max-w-[200px] truncate. A 200px label can't shrink into the 176px a 224px list leaves, so after this bump those long names line up but are cut off at the row edge. Changing the span to block truncate gives one line with "…" and keeps Studio's title tooltip. That change lands with the bump.

🤖 Generated with Claude Code

The check column shrank to nothing when an option's text was too wide,
so an unselected long option sat 14px left of the others. The text now
truncates inside the row.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tmccoy14 tmccoy14 self-assigned this Oct 15, 2026
tmccoy14 and others added 2 commits October 15, 2026 12:39
Truncation cut text that used to wrap, with no way to read the rest or
turn it off. Long text now wraps inside the row, and an unbreakable
string breaks anywhere. Consumers who want one line wrap their text in a
`block truncate` span. The docs gain a Long options section with both.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Skeleton's own radius beat the examples' rounded-full and rounded-lg, so
the avatar placeholder rendered as a rounded square. The Shapes example
now says a radius utility needs the ! modifier.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tmccoy14
tmccoy14 merged commit 7b51bde into main Oct 15, 2026
1 check passed
@tmccoy14
tmccoy14 deleted the fix/select-long-options branch October 15, 2026 17:01
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