Skip to content

Commit 4efea35

Browse files
committed
docs(SegmentedControl): the stable-width changeset says each label renders twice, and how wide the shift was per platform
1 parent cae4fe5 commit 4efea35

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎.changeset/segmented-control-stable-width.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22
'@astryxdesign/core': patch
33
---
44

5-
[fix] SegmentedControl segments keep their width when the selection changes. The selected label is heavier, so a segment sized to its own label grew as it was selected and shrank as it was deselected (about 2–3 px in a content-sized control), shifting its neighbors. Each label now reserves its selected width.
5+
[fix] SegmentedControl segments keep their width when the selection changes. The selected label is heavier, so a segment sized to its own label grew as it was selected and shrank as it was deselected, shifting its neighbors: 2–3 px in a content-sized control where the font has no face at the selected weight (as on Linux Chromium), under a pixel with the iOS and Android system fonts. Each label now reserves its selected width. Each label now also renders twice in the markup (the visible title and an aria-hidden twin), so a test that finds a segment with `getByText('Grid')` matches two nodes; find segments by role and name instead (`getByRole('radio', {name: 'Grid'})`).
66
@vjeux

0 commit comments

Comments
 (0)