Skip to content

fix(SegmentedControl): a segment grows with its label when the text grows past it - #12457

Merged
cixzhang merged 11 commits into
mainfrom
fix/segmentedcontrol-grows-with-text
Nov 21, 2026
Merged

cixzhang merged 11 commits into
mainfrom
fix/segmentedcontrol-grows-with-text

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Primary intent

A SegmentedControl's segments grow with their labels when the text size grows past their height, instead of holding a fixed height that the label runs out of.

User impact

  • People who use large text (iOS Dynamic Type accessibility sizes, or a browser's larger text): each segment now holds its whole label. At iOS AX5 a label grew to 61 px inside a 24 px segment.
  • Everyone at the default text size on a desktop: unchanged. Each size keeps its height (Neutral: 20, 24 and 28 px).
  • Phones at the default text size: every segment keeps its height. Measured in Chromium at 390×844@2 and 402×714@3 (phone emulation): Neutral's small segment stays 20 px, because its label line is 20 px there too.

Change

  • SegmentedControlItem.tsx: each size's height is max(size − 4px, 1lh), the same rule Button uses for its sizes (max(size, 1lh)).
  • @astryxdesign/theme-neutral: the theme's own segment heights get the same rule (max(size − 8px, 1lh)), along with its test.
  • SegmentedControlItem.spec.md:
    • FR6 drops "(implementation gap: the height is fixed)", and the readiness row and the "Fixed height" current-state item go with it.
    • The FR6/FR7 verification row names the new spec, and verified_by lists it.
  • New SegmentedControl/__tests__/SegmentedControlTextSize.interaction.browser.spec.ts, in Neutral (which overrides the segment height) and Stone (which uses Core's rule):
    • On a desktop page at the default text size, each size keeps its shipped height (Neutral 20/24/28, Stone 24/28/32).
    • With the labels' text enlarged (40 px on a 60 px line) and the element sizes unchanged, each segment holds its label, in the default, size-variant and icon stories.
  • Changeset: [fix] patch for Core and Neutral.

Authority

  • spec:AST-102 FR4: "A control grows with its text rather than holding a fixed height, so its height never clips a label."
  • SegmentedControlItem FR6: "… as a minimum that grows with a set text size under spec:AST-102 FR4".

Evidence

  • Real Chromium (Playwright 1.61.1): the new spec fails 6 of 8 cases on main (all six growth cases) and passes 8/8 here. With only Core's three height lines reverted, the three Stone growth cases fail, so the spec covers Core's rule as well as Neutral's.
  • The SegmentedControl interaction specs pass 71/71 in Chromium; WebKit runs in CI.
  • SegmentedControl units and the Neutral theme tests pass; tsc, eslint, check:knowledge and check:changesets are clean.

iOS Safari (Dynamic Type)

iPhone 11 Simulator, iOS 26.2 Mobile Safari, from vjeux's farm. The UIKit content-size preference was set and read back at each size, and Safari was restarted at each size; -apple-system-body read back 17/40/47/53 px (Default/AX3/AX4/AX5) on both builds. Taken again at this revision's head, d492c14, against main 3d313c6, because the merge of main changed the shared layer module useLayer.tsx. Every height repeats the take at 872843f exactly (16 of 16 story, size and build cells); no SegmentedControl file changed. That take repeated the first take at b8c548d exactly. Heights in CSS px. Stills and per-cell data for this take: https://github.com/vjeux/astryx/blob/9425bc252b783e810dea8fe67a8560a80f5ad0ab/index.md (16 of 16 cells identical to 872843f within 0.1 px). Earlier takes: https://github.com/vjeux/astryx/blob/1897ccab2e5b5ef182183a53102b901cf8c61e54/index.md

Default story:

Dynamic Type main head
Default (Large) 24 24
AX3 24 (its 46 px label spills out of the track) 56, whole label inside
AX4 24 (54 px label spills) 66, whole label inside
AX5 24 (61 px label spills) 74, whole label inside

Size variants (small/medium/large):

Dynamic Type main head
Default (Large) 20/24/28 20/24/28
AX3 20/24/28 (labels spill) 50/56/56
AX4 20/24/28 (labels spill) 58/66/66
AX5 20/24/28 (labels spill) 67/74/74
  • At the default size every segment keeps its height on the phone too, as the release note says.
  • Nothing is clipped on the head. From AX4 the size-variant labels end in the segment label's existing ellipsis ("D…", "We…", "Mon…") on both builds (medium and large at AX4, all three at AX5); this PR changes only the height.
  • Compared with the earlier run at d462abb, before the merge of main: the small segment at the default size is now 20 px (it was 21), and at AX3–AX5 it is 50/58/67 (it was 53/61/71), because the small label's line is now shorter. Medium and large are unchanged.
  • Also measured on iOS at AX5, on the same head and main (optional takes): at 390 px width the head grows to 74 px (size variants 67/74/74) with no label outside the track. Every label ends in the existing ellipsis on both builds at that width. In RTL the head grows the same way with no spill, and the segment order mirrors on both builds.

Writing rubric results

  • R1 narration: FR6 now states the shipped rule in the present tense, with the gap wording removed.
  • R2 research: none.
  • R3 evidence: none in the record; the verification row names the spec.
  • R4 rejected alternatives: none.
  • R5 change references: none.
  • R6 open questions: none.
  • R7 project status: none.

Owner and land path

  • Owner: Astryx maintainers, fix-loop lane 1.
  • Land path: code review, CI, merge.

…rows past it

A segment held a fixed height, so at large text sizes (iOS Dynamic Type at
its accessibility sizes) its label ran out of it: 61 px of label in a 24 px
segment at AX5. The height is now max(size, 1lh), in Core and in the Neutral
theme's override, as Button's is. At the default text size one label line is
shorter than the segment, so each size keeps its height; a larger text size
grows the segment. FR6's implementation gap and its current-state item are
removed; a browser spec covers both sizes.
@vercel

vercel Bot commented Nov 17, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 21, 2026 11:47am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 17, 2026
@astracat-bot

astracat-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 21, 2026, 12:51 PM UTC

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 162c200

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 17, 2026
@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 2597254

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
DateTimeInput 231.9 kB (0) · 20.6 kB CSS (+4 B) — — · — · —
SegmentedControl 103.5 kB (0) · 7.2 kB CSS (0) — — · ✓ · —
SegmentedControlItem 19.2 kB (−1 B) · 4.3 kB CSS (0) — — · — · —

Package size:

  • @astryxdesign/cli 6.03 MB packed (+17 B); no new dependencies
  • @astryxdesign/core 7.92 MB packed (+61 B); no new dependencies
  • @astryxdesign/theme-neutral 114.1 kB packed (+94 B); no new dependencies

Wide change (shared styles: packages/themes/neutral/src/neutralTheme.ts): add ci:run-visual for Visual, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes. The height rule itself matches the SegmentedControlItem and typography records: segments now hold their labels at 200–300% text and keep their size at the desktop default. The release note, the new test and the description need small fixes.

  • The changeset says every segment keeps its height at the default text size, but on a phone Neutral's small segment grows from 20 to 21 px (its control from 28 to 29 px), so say the claim holds on a desktop and name the 1 px phone change.
  • The new browser spec runs only in Storybook's default Neutral theme, whose own height override hides Core's rule (with the three Core height lines reverted it still passes 4 of 4), so add its cases under a theme without a segment height, such as Stone, before the record maps FR6 to it.
  • The description changes a component record but has no ## Writing rubric results section, so add the R1–R7 lines from the spec-writing guide.

Two new source comments could be shorter under the comment-style rule; see the inline notes.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: segments grow with their labels when text outgrows them (Dynamic Type, larger browser text). Verified: at 200%, 250% and 300% browser text every segment grows to its label's line in Neutral and Stone; the new spec fails 3 of 4 cases on main and passes 4 of 4 here.
  • Claim: at the default text size every segment keeps its height. False on a phone for Neutral's small size (20 to 21 px); true on a desktop (identical frames).
  • Claim: patch release for Core and Neutral. Verified: both packages change and no public API row changes.
  • Claim: people with large text keep the whole label. Verified by the same measurements.
  • Claim: at the largest iOS size a label grew to 61 px in a 24 px segment. Not checked here (device result).
  • Claim: desktop default unchanged, Neutral 20, 24 and 28 px. Verified.
  • Claim: on phones the small size's label line is 21 px and the segment grows 1 px. Verified; the label overflowed by 0.5 px per edge, so "clipped" overstates it.
  • Claim: Core uses max(size − 4px, 1lh), as Button uses max(size, 1lh). Verified in both components.
  • Claim: Neutral uses max(size − 8px, 1lh) and its test follows. Verified.
  • Claim: the record drops FR6's gap note, the readiness clause and the current-state item, and names the new spec. Verified.
  • Claim: the new spec covers desktop default heights and enlarged text in three stories. Verified, but only under Neutral.
  • Claim: the governing claims are AST-102 FR4 and SegmentedControlItem FR6. Verified at current main.
  • Claim: SegmentedControl interaction specs pass in Chromium. Verified (67 of 67 here, the storyboard case included).
  • Claim: unit tests, theme tests, lint, knowledge and changeset checks pass. Verified (166 unit tests; lint, knowledge and changeset checks clean); the typecheck was covered only by the package builds.
  • Claim: device results at the largest iOS sizes will follow. Not stated yet; not a finding.
  • File .changeset/segmented-control-grows-with-text.md: finding (default-size claim).
  • File docs/specs/components/SegmentedControl/SegmentedControlItem.spec.md: finding (FR6 verification row names a spec that tests Neutral only); otherwise consistent with the code.
  • File packages/core/src/SegmentedControl/SegmentedControlItem.tsx: clear (comment suggestion).
  • File packages/core/src/SegmentedControl/__tests__/SegmentedControlTextSize.interaction.browser.spec.ts: finding (Neutral only).
  • File packages/themes/neutral/src/neutralTheme.test.ts: clear.
  • File packages/themes/neutral/src/neutralTheme.ts: clear (comment suggestion).

Automated review (maintainer link)

…phone pixel

The text-size spec ran only in Neutral, whose own segment height override
hid Core's rule. Each case now also runs in Stone, which sets no segment
height: with Core's height lines reverted the Stone growth cases fail.
The changeset names the one-pixel growth of Neutral's small segment on a
phone, and two source comments are shorter.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 7875d5b

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes for one wording fix in the release note; the height rule, the Neutral override and the new Stone coverage look right.

  • The changeset says Neutral's small segment on a phone grows from 20 to 21 px "so the label is no longer clipped", but on the base that label already draws whole (its 21 px line overflows the 20 px segment by 0.5 px per edge and nothing hides it), so please say it grows "to hold its 21 px label line" instead, here and in the description.

The text-size spec now fails on the base and on a Core-only revert under Stone, and passes on this head. Please also update the description's interaction-spec count: there are 71 tests at this head, and all pass.

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (0): none
  • Claim, changeset: segments grow with their labels when the text size grows past their height: verified (browser text at 200% and 300%; the text-size spec fails on the base and passes here).
  • Claim, changeset: this covers iOS Dynamic Type at its accessibility sizes: not reproduced in this review; the same CSS rule applies.
  • Claim, changeset: at the default text size on a desktop every segment keeps its height: verified (pixel-identical desktop frames in Neutral and Stone; the spec's desktop cases).
  • Claim, changeset: on a phone Neutral's small segment grows from 20 to 21 px: verified (phone profile, 21 px label line).
  • Claim, changeset: the growth means the label is no longer clipped: false (on the base the segment's overflow is visible and the whole label draws).
  • Claim, description: people using large text get the whole label inside each segment: verified in the browser.
  • Claim, description: at the largest iOS size a label reached 61 px inside a 24 px segment: a stated device result, not reproduced here.
  • Claim, description: desktop default heights are unchanged (Neutral 20, 24 and 28 px): verified.
  • Claim, description: the phone small segment grows by the one pixel its label was clipped by: the growth is verified; the clipping is false (as above).
  • Claim, description: Core uses max(size − 4px, 1lh), the rule Button uses: verified (SegmentedControlItem.tsx:169-180, Button.tsx:291-293).
  • Claim, description: Neutral uses max(size − 8px, 1lh) with its test: verified (neutralTheme.ts:371-380, neutralTheme.test.ts:613-615).
  • Claim, description: the record drops the FR6 gap wording, its readiness row and current-state item, and names the new spec: verified in the record diff.
  • Claim, description: the new spec checks default desktop heights and growth with 40 px text on a 60 px line, in Neutral and Stone: verified.
  • Claim, description: the changeset is a patch for Core and Neutral and names the phone pixel: verified.
  • Claim, description: the quoted typography and SegmentedControlItem requirements: verified against the current records.
  • Claim, description: the spec fails 6 of 8 cases on main and passes 8 of 8 here: verified.
  • Claim, description: with only Core's three height lines reverted, the three Stone growth cases fail: verified.
  • Claim, description: the SegmentedControl interaction specs pass 66/66: they all pass, but there are 71 at this head.
  • Claim, description: unit tests, theme tests, typecheck, lint, knowledge and changeset checks pass: verified.
  • Claim, description: writing rubric results: present and consistent with the record edit.
  • File .changeset/segmented-control-grows-with-text.md: finding (line 6).
  • File docs/specs/components/SegmentedControl/SegmentedControlItem.spec.md: clear.
  • File packages/core/src/SegmentedControl/SegmentedControlItem.tsx: clear.
  • File packages/core/src/SegmentedControl/__tests__/SegmentedControlTextSize.interaction.browser.spec.ts: clear.
  • File packages/themes/neutral/src/neutralTheme.test.ts: clear.
  • File packages/themes/neutral/src/neutralTheme.ts: clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec d462abb

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes for one claim in the release note; the height rule, the Neutral override, the Stone coverage and the phone wording look right.

  • Miss: the changeset (and the description's user impact) says segments grow under iOS Dynamic Type at its accessibility sizes, but no Safari-on-iOS result at this revision is stated, and spec:AST-013 FR10 (with spec:AST-102 FR4's verification row) needs that result from Safari itself, so please state it in the description (device or simulator, iOS version, Dynamic Type category, what the segments do) or drop the iOS clause until it exists.

This claim was already in the changeset when earlier revisions were reviewed, and those reviews should have raised it. Nothing else is needed: the browser-text evidence covers Core's rule and Neutral's override.

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (0): none
  • Claim, changeset: segments grow with their labels when the text size grows past their height: verified (browser text at 200% and 300%; the text-size spec fails on the base and passes here).
  • Claim, changeset: this covers iOS Dynamic Type at its accessibility sizes: not shown at this revision (no Safari-on-iOS result stated; the finding above).
  • Claim, changeset: this covers a browser's larger text: verified.
  • Claim, changeset: at the default text size on a desktop every segment keeps its height: verified (desktop cases in Neutral and Stone).
  • Claim, changeset: on a phone Neutral's small segment, with a 21 px label line, grows from 20 to 21 px to hold it: verified (phone profile, 21 px label line).
  • Claim, description: people using large text get the whole label inside each segment: verified for browser text; the iOS part is the finding above.
  • Claim, description: at the largest iOS size a label reached 61 px inside a 24 px segment: a stated result for the base, not reproduced here.
  • Claim, description: desktop default heights are unchanged (Neutral 20, 24 and 28 px): verified.
  • Claim, description: on phones the small segment grows from 20 to 21 px to hold its label line: verified.
  • Claim, description: Core uses the size minus 4 px floored at one line, the rule Button uses: verified (SegmentedControlItem.tsx:169-180, Button.tsx:291-293).
  • Claim, description: Neutral uses the size minus 8 px floored at one line, with its test: verified (neutralTheme.ts:371-380, neutralTheme.test.ts:613-615).
  • Claim, description: the record drops the FR6 gap wording, its readiness item and current-state item, and names the new spec: verified in the record diff.
  • Claim, description: the new spec checks default desktop heights and growth with 40 px text on a 60 px line in three stories, in Neutral and Stone: verified (SegmentedControlTextSize.interaction.browser.spec.ts:70-133).
  • Claim, description: the changeset is a patch for Core and Neutral and names the phone pixel: verified.
  • Claim, description: the quoted typography and segment requirements: verified against the current records.
  • Claim, description: the spec fails 6 of 8 cases on the base and passes 8 of 8 here: verified.
  • Claim, description: with only Core's three height lines reverted, the three Stone growth cases fail: verified.
  • Claim, description: the SegmentedControl interaction specs pass 71/71 in Chromium: verified; WebKit has not run in CI at this revision (draft).
  • Claim, description: unit tests, theme tests, typecheck, lint, knowledge and changeset checks pass: verified.
  • Claim, description: device stills at large iOS sizes will follow: not yet present (the finding above).
  • Claim, description: writing rubric results: present and consistent with the record edit.
  • File .changeset/segmented-control-grows-with-text.md: finding (line 6).
  • File docs/specs/components/SegmentedControl/SegmentedControlItem.spec.md: clear.
  • File packages/core/src/SegmentedControl/SegmentedControlItem.tsx: clear.
  • File packages/core/src/SegmentedControl/__tests__/SegmentedControlTextSize.interaction.browser.spec.ts: clear.
  • File packages/themes/neutral/src/neutralTheme.test.ts: clear.
  • File packages/themes/neutral/src/neutralTheme.ts: clear.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this revision yet because the pull request is a draft, and it runs once the pull request is marked ready for review.

The one open item from the last review is settled: the description now states iOS Safari results at the Dynamic Type accessibility sizes, so the release note's iOS claim matches its evidence. The height rule in Core and Neutral, the Neutral and Stone test coverage and the record edit were already in order.

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (0): none
  • Claim, changeset: segments grow with their labels when the text size grows past their height: verified (Core and Neutral height rules; the text-size spec fails its growth cases on the base and passes here).
  • Claim, changeset: this covers iOS Dynamic Type at its accessibility sizes: verified by the description's iOS Safari simulator results for this revision (segments 56, 66 and 74 px at the three accessibility sizes, against 24 px before).
  • Claim, changeset: this covers a browser's larger text: verified (200% and 300% browser text in Neutral and Stone).
  • Claim, changeset: at the default text size on a desktop every segment keeps its height: verified (desktop cases in Neutral and Stone).
  • Claim, changeset: on a phone Neutral's small segment, with a 21 px label line, grows from 20 to 21 px: verified (phone profile).
  • Claim, changeset: a patch release for Core and the Neutral theme: verified.
  • Claim, description: people using large text get the whole label in each segment, where before a 61 px label sat in a 24 px segment at the largest iOS size: verified (browser measurements; the iOS results).
  • Claim, description: desktop default heights are unchanged (Neutral 20, 24 and 28 px): verified.
  • Claim, description: on phones the small segment grows from 20 to 21 px: verified.
  • Claim, description: Core uses the size minus 4 px floored at one line, the rule Button uses: verified (SegmentedControlItem.tsx:169-180, Button.tsx:291-293).
  • Claim, description: Neutral uses the size minus 8 px floored at one line, with its test: verified (neutralTheme.ts:371-380, neutralTheme.test.ts:613-615).
  • Claim, description: the record drops the FR6 gap wording and its readiness and current-state items, and names the new spec in its verification row and verified-by list: verified in the record diff.
  • Claim, description: the new spec checks default desktop heights, and growth with 40 px text on a 60 px line in three stories, in Neutral and Stone: verified (SegmentedControlTextSize.interaction.browser.spec.ts:70-133).
  • Claim, description: the changeset is a fix patch for Core and Neutral and names the phone pixel: verified.
  • Claim, description: the quoted typography and segment requirements: verified against the current records.
  • Claim, description: the spec fails 6 of 8 cases on the base and passes 8 of 8 here: verified.
  • Claim, description: with only Core's three height lines reverted, the three Stone growth cases fail: verified.
  • Claim, description: the SegmentedControl interaction specs pass 71/71 in Chromium, and WebKit runs in CI: 71/71 verified; WebKit has not run yet on this draft.
  • Claim, description: unit tests, theme tests, typecheck, lint, knowledge and changeset checks pass: verified.
  • Claim, description: iOS Safari segment heights at the default size and the three accessibility sizes, for the default story and the size variants: stated simulator results for this revision, consistent with the one-line height rule and the phone measurement.
  • Claim, description: at the largest size in a 390 px page the track keeps its width, long labels end in an ellipsis, nothing spills, and right to left mirrors: stated simulator result, consistent with the record's existing truncation rule.
  • Claim, description: from the second-largest size the size-variant labels end in the existing ellipsis on both builds, and only the height changes: stated simulator result, consistent with the diff (height values only).
  • Claim, description: writing rubric results: present and consistent with the record edit.
  • File .changeset/segmented-control-grows-with-text.md: clear.
  • File docs/specs/components/SegmentedControl/SegmentedControlItem.spec.md: clear.
  • File packages/core/src/SegmentedControl/SegmentedControlItem.tsx: clear.
  • File packages/core/src/SegmentedControl/__tests__/SegmentedControlTextSize.interaction.browser.spec.ts: clear.
  • File packages/themes/neutral/src/neutralTheme.test.ts: clear.
  • File packages/themes/neutral/src/neutralTheme.ts: clear.

Automated review (maintainer link)

@cixzhang cixzhang removed the needs:design-review Affects visuals — Design should review label Nov 20, 2026
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 20, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec a09460d

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes. The height rule in Core and Neutral, its browser spec and the record edit still conform, but the latest merge of main makes two statements in the release note out of date.

  • Regression: the release note's phone sentence (.changeset/segmented-control-grows-with-text.md, line 6) no longer holds, because main now gives the small segment the supporting-text line height, so on a phone its label line is 20 px and Neutral's small segment stays 20 px; end the note at "At the default text size every segment keeps its height." and update the description's phone bullet and the comment at lines 77–78 of the text-size spec to match.
  • Regression: the release note names iOS Dynamic Type at its accessibility sizes, but the description's iOS Safari results were taken before that merge changed this pull request's own SegmentedControlItem.tsx and Neutral theme, so state iOS Safari results for this revision in the description, or drop the iOS wording from the release note.
Claims and files checked

Review mode: full; reason: merge-touches-pr-files

  • Claim, changeset: segments grow with their labels when the text size grows past their height: verified (SegmentedControlItem.tsx:169-181, neutralTheme.ts:377-385; the text-size spec fails its six growth cases on the base and passes here).
  • Claim, changeset: this covers iOS Dynamic Type at its accessibility sizes: not evidenced at this revision (the iOS results predate the merge).
  • Claim, changeset: this covers a browser's larger text: verified (200% browser text, Neutral and Stone).
  • Claim, changeset: at the default text size on a desktop every segment keeps its height: verified (base and head frames identical, Neutral and Stone).
  • Claim, changeset: on a phone Neutral's small segment, with a 21 px label line, grows from 20 to 21 px: false (a 20 px line and a 20 px segment on base and head).
  • Claim, changeset: a patch release for Core and Neutral: verified.
  • Claim, description: people using large text get each whole label inside its segment: verified in Chromium; the iOS figures predate the merge.
  • Claim, description: desktop default heights are unchanged (Neutral 20, 24 and 28 px): verified.
  • Claim, description: on phones the small segment grows from 20 to 21 px: false.
  • Claim, description: Core uses the size minus 4 px floored at one line, the rule Button uses: verified (Button.tsx:291-293).
  • Claim, description: Neutral uses the size minus 8 px floored at one line, with its test: verified (neutralTheme.test.ts:613-615).
  • Claim, description: the record drops the FR6 gap wording and its readiness and current-state items, and names the new spec in its verification row and verified-by list: verified.
  • Claim, description: the new spec checks default desktop heights, and growth with 40 px text on a 60 px line in three stories, in Neutral and Stone: verified.
  • Claim, description: the changeset is a fix patch for Core and Neutral and names the phone pixel: the pixel is false at this revision.
  • Claim, description: the quoted typography and segment requirements: verified against the current records.
  • Claim, description: the new spec fails 6 of 8 cases on the base and passes 8 of 8 here: verified.
  • Claim, description: with only Core's height lines reverted, the Stone growth cases fail: verified (all three fail on the base, where Core's rule is absent and Stone sets no height).
  • Claim, description: the SegmentedControl interaction specs pass 71 of 71 in Chromium: verified; WebKit has not run on this draft.
  • Claim, description: unit tests, theme tests, lint, and the knowledge and changeset checks pass: verified; the package typecheck passes in the builds, and the new spec file was not typechecked separately.
  • Claim, description: iOS Safari segment heights at the default size and the accessibility sizes, with the narrow-page, truncation and right-to-left results: taken at an earlier revision, before the merge.
  • Claim, description: writing rubric results: present and consistent with the record edit.
  • File .changeset/segmented-control-grows-with-text.md: two findings (the phone sentence; the iOS evidence).
  • File docs/specs/components/SegmentedControl/SegmentedControlItem.spec.md: clear.
  • File packages/core/src/SegmentedControl/SegmentedControlItem.tsx: clear.
  • File packages/core/src/SegmentedControl/__tests__/SegmentedControlTextSize.interaction.browser.spec.ts: clear apart from the stale phone comment at lines 77–78.
  • File packages/themes/neutral/src/neutralTheme.test.ts: clear.
  • File packages/themes/neutral/src/neutralTheme.ts: clear.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Requesting changes. The height rule in Core, the Neutral theme and the CLI's bundled Neutral copy, its browser spec, the record edit and the release note hold up; one piece of evidence is left.

  • The description's iOS Safari results were taken before the commit that changes packages/cli/assets/templates/themes/neutral/neutralTheme.ts, and spec:AST-094 DEC-31 lets a device take carry only across test-only files, knowledge records, release notes and a few listed generated files, so the release note's iOS Dynamic Type claim has no iOS Safari result for this revision: please run the same iOS Safari check here and update the description's iOS section, whose "the later commit changes a test comment only" no longer holds.
Claims and files checked

Review mode: same-head; reason: none

  • Changed rules (0).
  • Release note: segments grow with their labels when the text size grows past their height: verified (SegmentedControlItem.tsx:166-181, neutralTheme.ts:376-384; at 200% browser text Neutral goes from 20/24/28 px to 40/40/40 px and Stone from 24/28/32 px to 34.9/40/40 px, every label inside its segment).
  • Release note: this covers iOS Dynamic Type at its accessibility sizes: not shown at this revision (the iOS Safari results predate the CLI bundle commit; finding above).
  • Release note: this covers a browser's larger text: verified (200% browser text in every published theme and with no theme).
  • Release note: at the default text size every segment keeps its height, on a desktop and on a phone: verified (base and head frames pixel-identical on a 1280 px desktop and 402 px and 390 px phone pages).
  • Release note: a fix patch for Core and Neutral: verified.
  • Description: people with large text get each whole label inside its segment, where main let a 61 px label spill out of a 24 px segment at iOS AX5: verified in Chromium; the iOS figures are stated simulator results for an earlier revision.
  • Description: desktop default heights are unchanged (Neutral 20, 24 and 28 px): verified.
  • Description: phones at the default text size keep every height, and Neutral's small segment stays 20 px around a 20 px label line: verified.
  • Description: Core uses the size minus 4 px floored at one line, the rule Button uses: verified (Button.tsx:291-293).
  • Description: Neutral uses the size minus 8 px floored at one line, with its test: verified (neutralTheme.test.ts:613-615); its CLI copy matches byte for byte.
  • Description: the record drops the FR6 gap wording and its readiness and current-state items, and names the new spec in its verification row and verified-by list: verified.
  • Description: the new spec checks default desktop heights in Neutral and Stone (20/24/28 and 24/28/32 px) and growth with 40 px text on a 60 px line in the default, size-variant and icon stories: verified.
  • Description: the changeset is a fix patch for Core and Neutral: verified.
  • Description: the quoted typography and segment requirements: verified against the current records.
  • Description: the new spec fails 6 of 8 cases on main and passes 8 of 8 here, and with only Core's three height lines reverted the three Stone growth cases fail: verified in real Chromium (the code under test is unchanged since that run).
  • Description: the SegmentedControl interaction specs pass 71 of 71 in Chromium: verified; WebKit has not run on this draft.
  • Description: unit tests, theme tests, typecheck, lint, and the knowledge and changeset checks pass: verified; the CLI theme bundle check passes too.
  • Description: the iOS Safari heights at Default and AX3–AX5 are for this revision's code, with only a test comment changed after them: false at this revision (a later commit changes the CLI's bundled Neutral copy).
  • Description: writing rubric results: present and consistent with the record edit.
  • File .changeset/segmented-control-grows-with-text.md: one finding (its iOS claim lacks evidence at this revision).
  • File docs/specs/components/SegmentedControl/SegmentedControlItem.spec.md: clear.
  • File packages/cli/assets/templates/themes/neutral/neutralTheme.ts: clear (byte-identical to its source).
  • File packages/core/src/SegmentedControl/SegmentedControlItem.tsx: clear.
  • File packages/core/src/SegmentedControl/__tests__/SegmentedControlTextSize.interaction.browser.spec.ts: clear.
  • File packages/themes/neutral/src/neutralTheme.test.ts: clear.
  • File packages/themes/neutral/src/neutralTheme.ts: clear.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet, because the pull request is a draft; it starts once the pull request is marked ready for review.

The height floor in Core, the Neutral theme and the CLI's bundled Neutral copy, the browser spec, the record edit and the release note hold up. The iOS Safari results in the description now cover this revision, which resolves the earlier request for them.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules (0).
  • Release note: segments grow with their labels when the text size grows past their height: verified (SegmentedControlItem.tsx:166-181, neutralTheme.ts:376-384; at 200% browser text Neutral goes from 20/24/28 px to 40/40/40 px and Stone from 24/28/32 px to 34.9/40/40 px, every label inside its segment).
  • Release note: this covers iOS Dynamic Type at its accessibility sizes: shown by the description's iOS Safari results for this revision (simulator, AX3 to AX5).
  • Release note: this covers a browser's larger text: verified (200% browser text in every published theme and with no theme).
  • Release note: at the default text size every segment keeps its height, on a desktop and on a phone: verified (base and head frames pixel-identical on a 1280 px desktop and on 402 px and 390 px phone pages).
  • Release note: a fix patch for Core and Neutral: verified.
  • Description: people with large text get each whole label inside its segment, where main let a 61 px label spill out of a 24 px segment at iOS AX5: verified in Chromium; the iOS figures are stated simulator results for this revision.
  • Description: desktop default heights are unchanged (Neutral 20, 24 and 28 px): verified.
  • Description: phones at the default text size keep every height, and Neutral's small segment stays 20 px around a 20 px label line: verified.
  • Description: Core uses the size minus 4 px floored at one line, the rule Button uses: verified (Button.tsx:291-293).
  • Description: Neutral uses the size minus 8 px floored at one line, with its test: verified (neutralTheme.test.ts:613-615); its CLI copy matches byte for byte.
  • Description: the record drops the FR6 gap wording and its readiness and current-state items, and names the new spec in its verification row and verified-by list: verified.
  • Description: the new spec checks default desktop heights in Neutral and Stone (20/24/28 and 24/28/32 px) and growth with 40 px text on a 60 px line in the default, size-variant and icon stories: verified.
  • Description: the changeset is a fix patch for Core and Neutral: verified.
  • Description: the quoted typography and segment requirements: verified against the current records.
  • Description: the new spec fails 6 of 8 cases on main and passes 8 of 8 here, and with only Core's three height lines reverted the three Stone growth cases fail: verified in real Chromium (the code under test is unchanged since that run).
  • Description: the SegmentedControl interaction specs pass 71 of 71 in Chromium: verified; WebKit has not run on this draft.
  • Description: unit tests, theme tests, typecheck, lint, and the knowledge and changeset checks pass: verified (code unchanged since that run); the CLI theme bundle check passes too.
  • Description: the iOS Safari heights at Default and AX3 to AX5 were taken at this revision against main, with the text-size setting read back and Safari restarted at each size: stated simulator results for this revision, accepted as text.
  • Description: those heights repeat the earlier take exactly because the only files changed since are the CLI's Neutral copy and a test comment, which Storybook does not render: verified (exactly those two files changed; Storybook loads Neutral from the package source).
  • Description: the small segment is shorter than in the run before the merge of main because its label line is now shorter: consistent with the small size's supporting line height (SegmentedControlItem.tsx:173).
  • Description: writing rubric results: present and consistent with the record edit.
  • File .changeset/segmented-control-grows-with-text.md: clear.
  • File docs/specs/components/SegmentedControl/SegmentedControlItem.spec.md: clear.
  • File packages/cli/assets/templates/themes/neutral/neutralTheme.ts: clear (byte-identical to its source).
  • File packages/core/src/SegmentedControl/SegmentedControlItem.tsx: clear.
  • File packages/core/src/SegmentedControl/__tests__/SegmentedControlTextSize.interaction.browser.spec.ts: clear.
  • File packages/themes/neutral/src/neutralTheme.test.ts: clear.
  • File packages/themes/neutral/src/neutralTheme.ts: clear.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 22d2e34

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The code is unchanged since the last approval and still holds up; what changed is that the iOS evidence in the description no longer covers the latest revision.

  • Regression: the release note's iOS Dynamic Type claim (.changeset/segmented-control-grows-with-text.md:6) has no iOS Safari result for this revision, because the description's take is at the previous revision and the new commit changes .github/playwright-leg-durations.json, a file spec:AST-094 DEC-31 does not let a take carry across; run the iOS Safari check again at this revision and update the description, drop that commit, or drop the iOS wording from the release note.

CI has not run on this draft yet; it starts once the pull request is marked ready for review.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0).
  • Release note: segments grow with their labels when the text size grows past their height: verified (SegmentedControlItem.tsx:166-181, neutralTheme.ts:376-384; at 200% browser text Neutral goes from 20/24/28 px to 40/40/40 px and Stone from 24/28/32 px to 34.9/40/40 px, every label inside its segment).
  • Release note: this covers iOS Dynamic Type at its accessibility sizes: not shown for this revision (the description's iOS Safari take is at the previous revision and does not carry across the new commit).
  • Release note: this covers a browser's larger text: verified (200% browser text, Neutral and Stone).
  • Release note: at the default text size every segment keeps its height, on a desktop and on a phone: verified (base and head frames pixel-identical on a 1280 px desktop page and a 402 px phone page).
  • Release note: a fix patch for Core and Neutral: verified.
  • Description: people with large text get each whole label inside its segment, where main let a 61 px label spill out of a 24 px segment at iOS AX5: verified in Chromium; the iOS figures are stated for the previous revision.
  • Description: desktop default heights are unchanged (Neutral 20, 24 and 28 px): verified.
  • Description: phones at the default text size keep every height, and Neutral's small segment stays 20 px: verified.
  • Description: Core uses the size minus 4 px floored at one line, the rule Button uses: verified (Button.tsx:291-293).
  • Description: Neutral uses the size minus 8 px floored at one line, with its test: verified (neutralTheme.test.ts:613-615); its CLI copy matches byte for byte.
  • Description: the record drops the FR6 gap wording and its readiness and current-state items, and names the new spec in its verification row and verified-by list: verified.
  • Description: the new spec checks default desktop heights in Neutral and Stone and growth with 40 px text on a 60 px line in three stories: verified.
  • Description: the quoted typography and segment requirements: verified against the current records.
  • Description: the new spec fails 6 of 8 cases on main and passes 8 of 8 here, and with only Core's three lines reverted the three Stone growth cases fail: verified in real Chromium on the same code.
  • Description: the SegmentedControl interaction specs pass 71 of 71 in Chromium: verified on the same code; WebKit has not run on this draft.
  • Description: unit tests, theme tests, typecheck, lint and the knowledge and changeset checks pass: verified on the same code.
  • Description: the iOS Safari heights at Default and AX3 to AX5 were taken at this revision's head: false for this revision, which is one commit later than the head the take names.
  • Description: those heights repeat the earlier take because only the CLI's Neutral copy and a test comment changed between those two takes: verified for that comparison.
  • Description: the small segment is shorter than before the merge of main because its label line is shorter: consistent with SegmentedControlItem.tsx:173.
  • Description: writing rubric results: consistent with the record edit.
  • File .changeset/segmented-control-grows-with-text.md: finding (line 6, iOS claim without iOS evidence at this revision).
  • File .github/playwright-leg-durations.json: clear in itself (one sorted Chromium entry for a spec that exists); its commit is what ends the iOS take's carry.
  • File docs/specs/components/SegmentedControl/SegmentedControlItem.spec.md: clear.
  • File packages/cli/assets/templates/themes/neutral/neutralTheme.ts: clear (byte-identical to its source).
  • File packages/core/src/SegmentedControl/SegmentedControlItem.tsx: clear.
  • File packages/core/src/SegmentedControl/__tests__/SegmentedControlTextSize.interaction.browser.spec.ts: clear.
  • File packages/themes/neutral/src/neutralTheme.test.ts: clear.
  • File packages/themes/neutral/src/neutralTheme.ts: clear.

Automated review (maintainer link)

Comment thread .github/playwright-leg-durations.json Resolved

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: the required checks have not run on this head, because the pull request is still a draft; they start when it is marked ready for review.

The height floor in Core, Neutral's override with its test, the regenerated CLI theme bundle, the new browser spec and the record edit all hold at this revision: at a 32 px root font every segment now matches its label's line (Neutral 20/24/28 px to 40/40/40 px, Stone 24/28/32 px to 34.9/40/40 px), the default text size renders pixel-identically to the base on a desktop page and on both phone profiles, and the new spec passes 8 of 8 here while failing all six growth cases on the base. The iOS Dynamic Type evidence in the description applies to this revision: the two commits since that take add and then remove the same CI timing line, so this revision's tree is identical to the one the take was made on.

  • Non-blocking: the description's iOS section still says the take was made at "this revision's head" and names the earlier commit; one sentence saying the tree is unchanged since then would save the next reader the comparison.
Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0).
  • Release note, segments grow with their labels when the text size grows past their height: verified (SegmentedControlItem.tsx:166-184, neutralTheme.ts:376-385; measured 20/24/28 px to 40/40/40 px in Neutral and 24/28/32 px to 34.9/40/40 px in Stone at a 32 px root font, every label line inside its segment).
  • Release note, this covers iOS Dynamic Type at its accessibility sizes: verified from the description's stated iOS Safari simulator results, which apply to this revision's identical tree.
  • Release note, this covers a browser's larger text: verified (32 px root font, Neutral and Stone).
  • Release note, at the default text size every segment keeps its height on a desktop and on a phone: verified (base and head frames byte-identical at 1280×800, at 402×714 at 3× and at 390×844 at 2×, in Neutral and Stone).
  • Release note, a fix patch for Core and Neutral: verified; the changeset check passes and the release's fixed version group ships the CLI's regenerated template with them.
  • Description, Core uses the size minus 4 px floored at one line, the rule Button uses: verified (Button.tsx:291-293).
  • Description, Neutral uses the size minus 8 px floored at one line, with its test: verified (neutralTheme.test.ts:613-615).
  • Description, the CLI's bundled Neutral copy matches the source: verified (byte-identical; the bundle drift test passes, 15 cases).
  • Description, the record drops the FR6 gap wording and its readiness and current-state items and names the new spec: verified.
  • Description, the new spec checks default desktop heights in Neutral and Stone and growth with 40 px text on a 60 px line in three stories: verified (8 cases).
  • Description, the spec fails 6 of 8 cases on the base and passes 8 of 8 here, and covers Core's rule as well as Neutral's: verified (the base tree with this spec file fails all six growth cases, the three Stone ones included).
  • Description, the SegmentedControl interaction specs pass 71 of 71 in Chromium: verified.
  • Description, SegmentedControl units and the Neutral theme tests pass: verified (192 tests).
  • Description, the knowledge and changeset checks are clean: verified.
  • Description, lint and types are clean: verified for the changed packages (no lint errors; the Core typecheck passes; the remaining warnings are in files this pull request does not change).
  • Description, phones at the default text size keep every height: verified at both phone profiles.
  • Description, the latest commit leaves the spec's leg timing to the refresh on the default branch: verified (a spec with no recorded time is planned at the median, and no check requires an entry).
  • Description, the iOS take was made at this revision's head: corrected — it was made two commits earlier, on a tree identical to this revision's, so it still applies.
  • File, the release note: clear.
  • File, the SegmentedControlItem record: clear; the edit removes the recorded gap, adds no requirement, and changes no approval line.
  • File, SegmentedControlItem.tsx: clear.
  • File, packages/themes/neutral/src/neutralTheme.ts: clear.
  • File, neutralTheme.test.ts: clear; it expects exactly the strings the theme now emits.
  • File, the CLI's bundled neutralTheme.ts: clear; generated, and byte-identical to the theme source.
  • File, SegmentedControlTextSize.interaction.browser.spec.ts: clear; red-first in both themes.
  • Cross-file consistency: Core, Neutral, the bundled copy, the theme test, the record's verification row and the release note all describe the same rule.

Automated review (maintainer link)

@cixzhang cixzhang added ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) lane:2 Astryx fix-loop lane 2 owns this labels Nov 21, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec d492c14

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The height rule in Core, the Neutral theme and its CLI copy, the browser spec and the record edit still hold; what stands in the way is evidence for the release note's iOS claim at this revision.

  • Regression: the release note's iOS Dynamic Type claim (.changeset/segmented-control-grows-with-text.md:6) has no iOS Safari result for this revision, because its merge of main changes packages/core/src/Layer/useLayer.tsx, a shared layer module after which spec:AST-094 DEC-31 requires a new take; run the iOS Safari check again at this revision and update the description's iOS section, or drop the iOS wording from the release note.

CI has not run on this draft yet; it starts once the pull request is marked ready for review.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules (0).
  • Release note, segments grow with their labels when the text size grows past their height: verified (SegmentedControlItem.tsx:166-182, neutralTheme.ts:376-385; at a 32 px root font Neutral goes from 20/24/28 px to 40/40/40 px and Stone from 24/28/32 px to 34.9/40/40 px, every label line inside its segment).
  • Release note, this covers iOS Dynamic Type at its accessibility sizes: not shown for this revision (the description's iOS Safari take is at an earlier revision and does not carry across this merge of main).
  • Release note, this covers a browser's larger text: verified (32 px root font, Neutral and Stone).
  • Release note, at the default text size every segment keeps its height on a desktop and on a phone: verified (base and head frames pixel-identical at 1280×800, 390×844 at 2× and 402×714 at 3×, in Neutral and Stone).
  • Release note, a fix patch for Core and Neutral: verified; the changeset check passes and the fixed version group ships the CLI's regenerated template with them.
  • Description, people with large text get each whole label inside its segment, where main let a 61 px label spill from a 24 px segment at iOS AX5: verified in Chromium; the iOS figures are stated for an earlier revision.
  • Description, desktop default heights are unchanged (Neutral 20, 24 and 28 px): verified.
  • Description, phones at the default text size keep every height and Neutral's small segment stays 20 px: verified at both phone profiles.
  • Description, Core uses the size minus 4 px floored at one line, the rule Button uses: verified (Button.tsx:291-293).
  • Description, Neutral uses the size minus 8 px floored at one line, with its test: verified (neutralTheme.test.ts:613-615); its CLI copy matches byte for byte.
  • Description, the record drops the FR6 gap wording and its readiness and current-state items, and names the new spec in its verification row and verified-by list: verified.
  • Description, the new spec checks default desktop heights in Neutral and Stone and growth with 40 px text on a 60 px line in three stories: verified (8 cases).
  • Description, the quoted typography and segment requirements: verified against the current records.
  • Description, the new spec fails 6 of 8 cases on main, passes 8 of 8 here, and covers Core's rule as well as Neutral's: verified (against the base's Storybook the six growth cases fail, the three Stone ones included).
  • Description, the SegmentedControl interaction specs pass 71 of 71 in Chromium: verified.
  • Description, SegmentedControl units and the Neutral theme tests pass, and types, lint and the knowledge and changeset checks are clean: verified.
  • Description, the iOS Safari heights at Default and AX3 to AX5 were taken at this revision's head: false for this revision, which merges main after that take.
  • Description, those heights repeat the earlier take because only the CLI's Neutral copy and a test comment changed between the two takes: verified for that comparison.
  • Description, the small segment is shorter than before the earlier merge of main because its label line is shorter: consistent with SegmentedControlItem.tsx:173 and the 20 px line measured on a phone.
  • Description, writing rubric results: consistent with the record edit.
  • File .changeset/segmented-control-grows-with-text.md: finding (line 6, iOS claim without iOS evidence at this revision).
  • File docs/specs/components/SegmentedControl/SegmentedControlItem.spec.md: clear; the edit removes the recorded gap, adds no requirement and changes no approval line.
  • File packages/cli/assets/templates/themes/neutral/neutralTheme.ts: clear; generated, byte-identical to its source.
  • File packages/core/src/SegmentedControl/SegmentedControlItem.tsx: clear.
  • File packages/core/src/SegmentedControl/__tests__/SegmentedControlTextSize.interaction.browser.spec.ts: clear; red-first in both themes.
  • File packages/themes/neutral/src/neutralTheme.test.ts: clear; it expects exactly the strings the theme now emits.
  • File packages/themes/neutral/src/neutralTheme.ts: clear.
  • Cross-file consistency: Core, Neutral, the bundled copy, the theme test, the record's verification row and the release note describe the same rule.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet, because the pull request is a draft; it starts once the pull request is marked ready for review.

The height floor in Core, the Neutral theme and its CLI copy, the browser spec and the record edit hold, and the description now states the iOS Safari take that the release note's Dynamic Type wording needed for this revision. Next, mark the pull request ready for review so CI runs; the merge guard waits for its required checks.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules (0).
  • Release note, segments grow with their labels when the text size grows past their height: verified (SegmentedControlItem.tsx:169-181, neutralTheme.ts:377-385; at a 32 px root font Neutral goes from 20/24/28 px to 40/40/40 px and Stone from 24/28/32 px to 34.9/40/40 px, every label line inside its segment).
  • Release note, this covers iOS Dynamic Type at its accessibility sizes: verified from the description's iOS Safari take at this revision (AX3 to AX5, the whole label inside every segment).
  • Release note, this covers a browser's larger text: verified (32 px root font, Neutral and Stone).
  • Release note, at the default text size every segment keeps its height on a desktop and on a phone: verified (base and head frames pixel-identical at 1280×800, 390×844 at 2× and 402×714 at 3×, in Neutral and Stone).
  • Release note, a fix patch for Core and Neutral: verified; the changeset check passes and the fixed version group ships the CLI's regenerated template with them.
  • Description, people with large text get each whole label inside its segment, where main let a 61 px label spill from a 24 px segment at iOS AX5: verified in Chromium; the iOS figures are stated for this revision.
  • Description, desktop default heights are unchanged (Neutral 20, 24 and 28 px): verified.
  • Description, phones at the default text size keep every height and Neutral's small segment stays 20 px: verified at both phone profiles.
  • Description, Core uses the size minus 4 px floored at one line, the rule Button uses: verified (Button.tsx:291-293).
  • Description, Neutral uses the size minus 8 px floored at one line, with its test: verified (neutralTheme.test.ts:613-615); its CLI copy matches byte for byte.
  • Description, the record drops the FR6 gap wording and its readiness and current-state items, and names the new spec in its verification row and verified-by list: verified (SegmentedControlItem.spec.md:30, :116, :178).
  • Description, the new spec checks default desktop heights in Neutral and Stone and growth with 40 px text on a 60 px line in the default, size-variant and icon stories: verified (8 cases).
  • Description, the quoted typography and segment requirements: verified against the current records.
  • Description, the new spec fails 6 of 8 cases on main, passes 8 of 8 here, and covers Core's rule as well as Neutral's: verified (against the base's Storybook the six growth cases fail, the three Stone ones included).
  • Description, the SegmentedControl interaction specs pass 71 of 71 in Chromium and WebKit runs in CI: verified for Chromium; the WebKit interaction job is in CI and has not run on the draft.
  • Description, SegmentedControl units and the Neutral theme tests pass, and types, lint and the knowledge and changeset checks are clean: verified.
  • Description, the iOS Safari heights were taken again at this revision because its merge of main changed the shared layer module, and they repeat the earlier take with no SegmentedControl file changed: consistent; that merge changes the shared layer module and none of the pull request's or SegmentedControl's files.
  • Description, the small segment is 20 px at the default size and shorter at AX3 to AX5 than before the earlier merge of main, because its label line is shorter: consistent with SegmentedControlItem.tsx:173.
  • Description, 390 px width and right-to-left at AX5 were not measured on iOS, and the height rule is direction- and width-independent: consistent; the floor sets only the block size.
  • Description, writing rubric results: consistent with the record edit.
  • File .changeset/segmented-control-grows-with-text.md: clear; line 6's iOS claim now has its take at this revision.
  • File docs/specs/components/SegmentedControl/SegmentedControlItem.spec.md: clear; the edit removes the recorded gap, adds no requirement and changes no approval line.
  • File packages/cli/assets/templates/themes/neutral/neutralTheme.ts: clear; generated, byte-identical to its source.
  • File packages/core/src/SegmentedControl/SegmentedControlItem.tsx: clear.
  • File packages/core/src/SegmentedControl/__tests__/SegmentedControlTextSize.interaction.browser.spec.ts: clear; red-first in both themes.
  • File packages/themes/neutral/src/neutralTheme.test.ts: clear; it expects exactly the strings the theme now emits.
  • File packages/themes/neutral/src/neutralTheme.ts: clear.
  • Cross-file consistency: Core, Neutral, the bundled copy, the theme test, the record's verification row and the release note describe the same rule.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 21, 2026 11:07

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: one release-note fix, which CI found once it ran on this revision.

  • Found by CI: .changeset/segmented-control-grows-with-text.md names @astryxdesign/core and @astryxdesign/theme-neutral but not @astryxdesign/cli, whose bundled Neutral theme (packages/cli/assets/templates/themes/neutral/neutralTheme.ts) this change edits, so the required lint check fails its "Check Changeset coverage" step; add '@astryxdesign/cli': patch to its frontmatter.

The height floor in Core, the Neutral theme and its CLI copy, the record edit and the new browser spec otherwise hold, and the new spec passes in CI's Chromium and WebKit runs.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules (0).
  • Release note, segments grow with their labels when the text size grows past their height: verified (SegmentedControlItem.tsx:169-181, neutralTheme.ts:377-385; at a 32 px root font Neutral goes from 20/24/28 px to 40/40/40 px and Stone from 24/28/32 px to 34.9/40/40 px, every label line inside its segment).
  • Release note, this covers iOS Dynamic Type at its accessibility sizes: verified from the description's iOS Safari take at this revision (AX3 to AX5, the whole label inside every segment).
  • Release note, this covers a browser's larger text: verified (32 px root font, Neutral and Stone).
  • Release note, at the default text size every segment keeps its height on a desktop and on a phone: verified (base and head frames pixel-identical at 1280×800, 390×844 at 2× and 402×714 at 3×, in Neutral and Stone).
  • Release note, the packages it releases (a fix patch for Core and Neutral): incomplete; the change also edits a file the CLI ships, and the release note does not name the CLI (the blocking finding above).
  • Description, people with large text get each whole label inside its segment, where main let a 61 px label spill from a 24 px segment at iOS AX5: verified in Chromium; the iOS figures are stated for this revision.
  • Description, desktop default heights are unchanged (Neutral 20, 24 and 28 px): verified.
  • Description, phones at the default text size keep every height and Neutral's small segment stays 20 px: verified at both phone profiles.
  • Description, Core uses the size minus 4 px floored at one line, the rule Button uses: verified (Button.tsx:291-293).
  • Description, Neutral uses the size minus 8 px floored at one line, with its test: verified (neutralTheme.test.ts:613-615); its CLI copy matches byte for byte.
  • Description, the record drops the FR6 gap wording and its readiness and current-state items, and names the new spec in its verification row and verified-by list: verified (SegmentedControlItem.spec.md:30, :59, :116, :178).
  • Description, the new spec checks default desktop heights in Neutral and Stone and growth with 40 px text on a 60 px line in the default, size-variant and icon stories: verified (8 cases, all passing in CI's Chromium and WebKit runs).
  • Description, the quoted typography and segment requirements: verified against the current records.
  • Description, the new spec fails 6 of 8 cases on main, passes 8 of 8 here, and covers Core's rule as well as Neutral's: verified (against the base's Storybook the six growth cases fail, the three Stone ones included).
  • Description, the SegmentedControl interaction specs pass 71 of 71 in Chromium and WebKit runs in CI: verified; CI's WebKit interaction job passed on this revision.
  • Description, SegmentedControl units and the Neutral theme tests pass, and types, lint and the knowledge and changeset-format checks are clean: verified for those checks; CI's separate changeset coverage step fails (the blocking finding above).
  • Description, the iOS Safari heights were taken again at this revision because its merge of main changed the shared layer module, and they repeat the earlier take with no SegmentedControl file changed: consistent; that merge changes the shared layer module and none of the pull request's or SegmentedControl's files.
  • Description, the small segment is 20 px at the default size and shorter at AX3 to AX5 than before the earlier merge of main, because its label line is shorter: consistent with SegmentedControlItem.tsx:173.
  • Description, at AX5 the head also grows at 390 px width and in right-to-left with no label outside the track: consistent; the floor sets only the block size.
  • Description, writing rubric results: consistent with the record edit.
  • Description, land path through code review, CI and merge: CI's required lint check fails on this revision.
  • File .changeset/segmented-control-grows-with-text.md: finding; it does not name @astryxdesign/cli.
  • File docs/specs/components/SegmentedControl/SegmentedControlItem.spec.md: clear; the edit removes the recorded gap, adds no requirement and changes no approval line.
  • File packages/cli/assets/templates/themes/neutral/neutralTheme.ts: clear in content (byte-identical to its source); its package is the one the release note misses.
  • File packages/core/src/SegmentedControl/SegmentedControlItem.tsx: clear.
  • File packages/core/src/SegmentedControl/__tests__/SegmentedControlTextSize.interaction.browser.spec.ts: clear; red-first in both themes and green in CI's Chromium and WebKit runs.
  • File packages/themes/neutral/src/neutralTheme.test.ts: clear; it expects exactly the strings the theme now emits.
  • File packages/themes/neutral/src/neutralTheme.ts: clear.
  • Cross-file consistency: Core, Neutral, the bundled copy, the theme test and the record's verification row describe the same rule; the release note's package list leaves out the CLI.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as draft November 21, 2026 11:36
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 2597254

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved: CI passed on this revision now that the pull request is ready for review.

There are no blocking findings. Every check passes, including the changeset coverage step and the new text-size spec in Chromium and WebKit. Optional cleanup: the description still calls the release note a patch for Core and Neutral, and calls the previous commit this revision's head for the iOS take; refreshing those two lines keeps it accurate.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules (0).
  • Release note, a fix patch for the CLI, Core and the Neutral theme: verified; CI's changeset coverage step passes on this revision, with the CLI's bundled Neutral theme, Core's source and Neutral's source each covered by a named package.
  • Release note, segments grow with their labels when the text size grows past their height: verified (SegmentedControlItem.tsx:169-181, neutralTheme.ts:376-385); at 200%, 250% and 300% text, Neutral goes from 20/24/28 px to 40, 50 and 60 px and Stone from 24/28/32 px to its label line, with every label line inside its segment.
  • Release note, this covers iOS Dynamic Type at its accessibility sizes: verified from the description's iOS Safari take (AX3 to AX5), which still counts here because only the release note changed after it.
  • Release note, this covers a browser's larger text: verified (200% to 300% root font size, Neutral and Stone).
  • Release note, at the default text size every segment keeps its height on a desktop and on a phone: verified (base and head frames pixel-identical at 1280×800 and at 390×844 at 2×, in Neutral and Stone; the new spec's default-height cases pass in CI).
  • Description, people with large text get each whole label inside its segment, where main let a 61 px label spill from a 24 px segment at iOS AX5: verified in Chromium; the iOS figures are stated in the description.
  • Description, desktop default heights are unchanged (Neutral 20, 24 and 28 px): verified.
  • Description, phones at the default text size keep every height, and Neutral's small segment stays 20 px because its label line is 20 px: verified at 390×844 at 2×.
  • Description, Core uses the size minus 4 px floored at one line, the rule Button uses: verified (Button.tsx:291-293).
  • Description, Neutral uses the size minus 8 px floored at one line, with its test: verified (neutralTheme.test.ts:613-615); its CLI copy matches byte for byte.
  • Description, the record drops the FR6 gap wording and its readiness and current-state items, and names the new spec in its verification row and verified-by list: verified (SegmentedControlItem.spec.md:30, :59, :116, :178).
  • Description, the new spec checks default desktop heights in Neutral and Stone and growth with 40 px text on a 60 px line in the default, size-variant and icon stories: verified (8 cases, all passing in CI's Chromium and WebKit runs of this revision).
  • Description, the changeset is a fix patch for Core and Neutral: out of date; the release note also names the CLI (non-blocking).
  • Description, the quoted typography and segment requirements: verified against the current records.
  • Description, the new spec fails 6 of 8 cases on main, passes 8 of 8 here, and covers Core's rule as well as Neutral's: verified (its six growth cases fail against the base's Storybook, the three Stone ones included; 8 of 8 pass in CI on this revision).
  • Description, the SegmentedControl interaction specs pass 71 of 71 in Chromium, with WebKit in CI: verified on this revision (71 of 71 across CI's Chromium shards; the WebKit run passes with no SegmentedControl failure).
  • Description, SegmentedControl units and the Neutral theme tests pass, and types, lint and the knowledge and changeset checks are clean: typecheck, lint (ESLint and changeset coverage), the docsite build with its knowledge check, and every node and UI test shard pass on this revision (SegmentedControl units 66 of 66, Neutral theme tests 42 of 42).
  • Description, the iOS Safari heights were taken again after the merge of main changed the shared layer module, repeat the earlier take, and no SegmentedControl file changed: consistent; the description still calls that commit this revision's head (non-blocking).
  • Description, the small segment is 20 px at the default size and shorter at AX3 to AX5 than before an earlier merge of main, because its label line is shorter: consistent with SegmentedControlItem.tsx:173.
  • Description, at AX5 the head also grows at 390 px width and in right-to-left with no label outside the track: consistent; the floor sets only the block size.
  • Description, writing rubric results: consistent with the record edit.
  • Description, land path through code review, CI and merge: CI passed on this revision.
  • File .changeset/segmented-control-grows-with-text.md: clear; it names all three packages the change ships to.
  • File docs/specs/components/SegmentedControl/SegmentedControlItem.spec.md: clear; the edit removes the recorded gap, adds no requirement and changes no approval line.
  • File packages/cli/assets/templates/themes/neutral/neutralTheme.ts: clear; byte-identical to its source.
  • File packages/core/src/SegmentedControl/SegmentedControlItem.tsx: clear.
  • File packages/core/src/SegmentedControl/__tests__/SegmentedControlTextSize.interaction.browser.spec.ts: clear; red-first in both themes and passing in CI.
  • File packages/themes/neutral/src/neutralTheme.test.ts: clear; it expects exactly the strings the theme now emits.
  • File packages/themes/neutral/src/neutralTheme.ts: clear.
  • Cross-file consistency: Core, Neutral, the bundled copy, the theme test, the record's verification row and the release note's package list describe the same change.

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 21, 2026 12:24

@rubyycheung rubyycheung left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Design approval for the segment text-sizing fix. Compared the exact base and this head in Neutral and Stone: normal-size frames are pixel-identical, and enlarged labels fit their growing segments with spacing unchanged. Native Tab and arrow-key selection behave the same. Existing horizontal truncation is unchanged. Verified in desktop Chromium with enlarged text, not an iOS device run.

@cixzhang
cixzhang merged commit 123c39f into main Nov 21, 2026
161 checks passed
@github-actions
github-actions Bot deleted the fix/segmentedcontrol-grows-with-text branch November 22, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — 25972546 Deployed Nov 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run-a11y Run the accessibility suite on this PR; write access, next push (AST-030 FR12) CLA Signed This label is managed by the Meta Open Source bot. lane:2 Astryx fix-loop lane 2 owns this needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants