Skip to content

fix(setting): sliders in a Setting row collapse to their thumb (3.0.0) - #560

Merged
lorant-one merged 5 commits into
previewfrom
fix/setting-control-collapsed-slider
Nov 23, 2026
Merged

lorant-one merged 5 commits into
previewfrom
fix/setting-control-collapsed-slider

Conversation

@lorant-one

Copy link
Copy Markdown
Member

Requested by Lorant · project thread

What broke

Since 3.0.0 a Slider inside a labelled <Setting> row shows only its thumb next to its value (Frametic's Shot › Duration, Stack's video editor inspector, the docs' own Group example). e90760e replaced the control area's maxWidth prop (which also filled) with a plain CSS max-width, so the area became exactly as wide as its content, and a control that fills its parent (Slider, Input, a fill-width SegmentedControl) had nothing to fill.

Fix

The labelled control area gets flex-grow: 1, so it grows into the free space up to controlWidth. What e90760e wanted stays: whether the row wraps is still decided by content size (so no extra wrapping), and horizontal="end" plus margin-left: auto keep a button at the trailing edge.

Checks

  • vitest run src/__tests__/setting-control-edge.test.tsx: 2 passed (new case: a Slider row's area has flex-grow: 1 and the 16rem cap)
  • tsc --noEmit clean; Biome on the two files reports only the pre-existing noArrayIndexKey in SettingAxes
  • Docs /components/setting, Group example, dark, before and after:

Before: Opacity is a ring next to "60%". After: a full slider up to the cap, Position's SegmentedControl back to its 2.x width.

CHANGELOG [Unreleased] entry added for 3.0.1.


Generated by Claude Code

…eir width

Since 3.0.0 the labelled Setting row capped its control area with a CSS
max-width and nothing else, so the area was only as wide as its content. A
control that fills its parent (Slider, Input, a fill-width SegmentedControl)
had no width to fill and collapsed: a Slider showed only its thumb next to
its value. The area now grows into the free space up to controlWidth.
Wrapping is still decided by content size, and horizontal="end" keeps a
button at the trailing edge.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtz72GNFGSy7czLGPrC
…size, padding and border style (#561)

The rail took its corners from the `-nest-4` tokens, and a `compact` rail always
took "l": 16px round 8px options in playful (Frametic's feature switches), and in
conservative the nest tokens add 2px for 4px of padding. The rail now computes its
radius from the options' own token: radius + padding (2px compact, 4px otherwise) +
the 1px border. Options without a size follow the density in CSS. Large tokens on
short buttons clamp to a pill on both, so they still nest.


Claude-Session: https://claude.ai/code/session_016gNJtwQuhoLQdpygLCVEyk

Co-authored-by: Claude <[email protected]>
…x out of the box (#564)

* fix(toggle-button): long labels truncate instead of pushing the suffix out of the box

A label too long for the button ran out of it: the label area kept its content
width, so a long title overflowed and took the suffix icon (or a tag) with it, as
in the docs sidebar's "Design system for AI coding agents". Now:

- labels end in an ellipsis by default (`truncate` defaults to true; `false` keeps
  the old full-width label)
- the label area can shrink (min-width 0) for node labels too
- prefix and suffix icons keep their size (flex-shrink 0)
- a fillWidth button may shrink with its parent

The docs sidebar puts its title in a truncating Text, so the ellipsis shows and the
availability tag stays whole.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtwQuhoLQdpygLCVEyk

* fix(toggle-button): truncate by default only when the button fills its parent

The visual check showed the always-on default squeezing fit-width pills in
scrolling strips ("Today" to "Tod…") and SegmentedControl options to an equal
share ("Categorical" to "Categori…") where they fit. Left out, `truncate` now
follows `fillWidth`: a sidebar row truncates, a pill keeps its full label.
SegmentedControl passes `truncate={false}`, as it shares and truncates its
options itself.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtwQuhoLQdpygLCVEyk

* fix(toggle-button): leave a fill-width button's own min-width alone

Letting a fill-width button shrink below its content made SegmentedControl's
shared options split the row evenly instead of by their labels (the second
visual check). A sidebar row truncates without it: its column fixes its width.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_016gNJtwQuhoLQdpygLCVEyk

---------

Co-authored-by: Claude <[email protected]>
… colour (#567)

A danger option drew label and icon in the saturated danger tone, so on dark
the label read dimmer than the rows around it. The label now takes
danger-on-background-medium and the prefix icon danger-on-background-weak,
the same quiet-icon, strong-label order as a plain option.


Claude-Session: https://claude.ai/code/session_016gNJtwQuhoLQdpygLCVEyk

Co-authored-by: Claude <[email protected]>
@lorant-one
lorant-one merged commit 07fba0a into preview Nov 23, 2026
9 checks passed
@github-actions github-actions Bot mentioned this pull request Nov 24, 2026
27 tasks done
@lorant-one lorant-one added the approved label Nov 24, 2026 — with Claude
@lorant-one
lorant-one deleted the fix/setting-control-collapsed-slider branch November 29, 2026 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants