Skip to content

fix(Slider): a text value reserves room for its longest value, so a numeric track keeps its length - #12496

Open
cixzhang wants to merge 21 commits into
mainfrom
l0/slider-text-value-stable-track
Open

cixzhang wants to merge 21 commits into
mainfrom
l0/slider-text-value-stable-track

Conversation

@cixzhang

@cixzhang cixzhang commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

User impact

  • Who: people dragging a Slider that shows its value as text beside the track (valueDisplay="text"). This was reported in a public issue.
  • Before (real Chromium): the value text changed width as the value changed. From 90 to 100 the track lost 8 px, so while dragging, the thumb slid out from under a held pointer, and the value per pixel changed with no pointer travel.
  • After: for value texts whose characters are about as wide as a digit (numbers, units, most words), the track keeps one length at every value and during a drag, in the default font and in every bundled theme's body font, so the thumb stays under the pointer. The resting track can be shorter than on main, because the box reserves the room the longest value text needs: 24.01 px on Custom Step at 0 (567.97 px, against 591.98 px on main), and 49.78 px on a 0–1000 range at rest. That is the cost of one length at every value.
  • Still possible: characters much wider than a digit can outgrow the floor, which counts characters: a star rating ('★'.repeat(v), 1 to 5) moves the track 4 px at four stars and 17 px at five, and capital LOW/MEDIUM/HIGH moves it 2.34 px. Above 200 steps, a custom formatValue whose widest output is mid-range may move the track (the floor then counts only the ends and the values one step in). The Slider record lists this as a known gap.
  • Unchanged: the text, its position, the tooltip and none value displays, keyboard and touch behaviour, and the accessible value.

Real-Chrome track width (5b1eca7 vs merge base a914dc0)

Earlier revisions of this pull request were measured in real Chromium against main. Those tables described a different reserve and are replaced by the browser proof under Evidence, which checks the current head in each bundled theme font. Frames for this head follow from the visual check.

Earlier community attempt

#4050 (@AKnassa) fixed the same track jitter earlier, reserving the text value's width in characters, end-aligned, with no hidden copy, for the values at the ends and their neighbours. This pull request arrived at the same shape, so the changeset credits @AKnassa and the commits carry a Co-authored-by trailer.

The shape is similar rather than the same: this pull request formats every step value instead of sampling a few.

What changed

  • Slider.tsx: for a text value display only, the value text's box gets a CSS floor, min-inline-size of one ch per character of the longest text any step value shows, plus one ch; for a range, the floor counts the range's catalog message (@astryx.slider.rangeValue, which main uses since fix(core): five components' assembled built-in text follows the locale #13132) with both values at the longest length, so a translated message gets the room its own words need; in English ({start} – {end}) that is both values and the separator. The longest text is found by formatting every step value and max itself, which End shows even off the step grid (memoized on min, max, step and formatValue); above 200 steps, the ends and the values one step in from them. The text sits at the box's logical end. No hidden copy of the text (architecture:component-style-authoring INV7), and no layout read.
  • No tabular-nums and no kerning change: tabular figures widened the space and period in gothic's Fustat ("0 . 8").
  • SliderTextValueWidth.a11y.browser.spec.ts: the track-length proof runs in the default font, in two wide-digit fonts, and in each bundled theme's body font (butter Outfit, chocolate Albert Sans, gothic Fustat, matcha DM Sans, neutral Figtree, y2k Poppins), loaded from the theme packages.
  • component:Slider FR3 gains one known-gap sentence for the above-200-steps residual. [fix] changeset. component:Slider FR7 (the value moves by pointer travel over the track's length, so the track must not change length mid-drag) and architecture:component-style-authoring INV7 (space is reserved with CSS on the element that shows the content, with no hidden copy) govern this fix.

Evidence

  • Red first, real browser: on main the track changes length from 90 to 100 (583.97 px, then 575.97 px; 591.98 px at 0), so SliderTextValueWidth.a11y.browser.spec.ts fails there.
  • Chromium, this head: the eight Slider browser specs list 88 Chromium cases (54 accessibility, 34 interaction, one of them a test.fixme); two runs on this head's build reported 85 passed and no failures. Among them:
    • "Custom Step" from 0 to 100, left to right and right to left: one track length;
    • a range's track as both values change, in both directions: one length;
    • for each of the six bundled theme fonts: Custom Step from 0 to 100, Temperature from 60 to 90 °F, the Price range as both thumbs move, Opacity from 0 to 1 by 0.1, and Rating's five words each keep one track length;
    • the fractional steps (0 to 0.8, 0 to 1): one length;
    • dragging from 80 to the end: the track width holds at every move and the thumb ends under the pointer;
    • a value text wider in the middle than at the ends never clips.
  • WebKit: runs in CI's WebKit project.
  • Off-grid max: a unit test asserts the floor for min={0} max={10.25} step={1} is 6ch ("10.25"); it failed with 3ch before this head.
  • Unchanged paths: the Slider Vitest suites pass (182 at 19138d4).
  • First-load size (architecture:component-import-boundaries INV10): pnpm size:pages --page slider=Slider,Text --unused-on slider at 19138d4 against main 35bda7f reports the Slider page growing by 306 B gzip without the feature (CodeBunny's measurement at this revision): PASS against the 307 B limit. The four reference pages are unchanged.

Scope

Components: Slider

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Preflight

At 19138d4 (main 35bda7f merged in, with the range message resolved as above), on a Linux build machine: the Slider unit suites (182, including a French range that reserves 13 ch for "de 100 à 100"), the Slider browser specs (54/54), core tsc, eslint, review:pre, check:knowledge and check:changesets pass.

pnpm preflight at 76db5b3 on a Linux build machine: review:pre, build, typecheck, lint, vitest ui, knowledge and changesets pass. vitest node passes except offline-media.test.mjs's two real-browser cases, which need the machine's HTTP proxy unset (that file passes 24/24 without it). Browser specs for Slider (pnpm test:interaction and test:a11y on the 8 Slider spec files, built Storybook): 33 interaction (1 skipped) and 54 a11y pass. Before the merge with main, 4cc7210's delta from 76db5b3 was the changeset text, one source comment, FR3's known-gap sentence in the Slider record (the above-200-steps and wide-glyph residuals), the floor's count of format(max) for an off-grid max in Slider.tsx, and that case's unit test in Slider.test.tsx. On that delta, review:pre, check:changesets, check:knowledge, prettier and eslint pass; tsc is clean; and the Slider Vitest suites pass (180), the new test failing before the format(max) change.

…anges

With valueDisplay="text", the value text sat beside the track and changed
width with each value (90 to 100 lost the track 8 px), so a dragged thumb
moved out from under the pointer. Hidden copies of the text at the ends of
the range now hold the box at its widest, with tabular figures.
@vercel

vercel Bot commented Nov 18, 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 12:49pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

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

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 18, 2026
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 18, 2026
@cixzhang cixzhang added the lane:0 Astryx fix-loop lane 0 owns this label Nov 18, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 21a0c8c

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · d88152a

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
Slider · Storybook 116.5 kB (+283 B) · 9.2 kB CSS (+27 B) 2,497 (+30) ✗ · ✓ · ✓
lab/MediaVolume 223.5 kB (+277 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaPlaybackRate 223.4 kB (+275 B) · 1.5 kB CSS (0) — — · — · —
8 more components
Component Size LoC Visual · A11y · RTL
lab/MediaPlayButton 223.5 kB (+275 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaSeekButton 223.5 kB (+275 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaTime 223.5 kB (+275 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaTimeSlider 223.5 kB (+275 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaCaptionsButton 223.5 kB (+274 B) · 1.5 kB CSS (0) — — · — · —
lab/MediaFullscreenButton 223.5 kB (+273 B) · 1.5 kB CSS (0) — — · — · —
lab/AudioPlayer 233.6 kB (+246 B) · 1.8 kB CSS (0) — — · — · —
lab/VideoPlayer 231.1 kB (+182 B) · 2.1 kB CSS (0) — — · — · —
Visual changes: 4 snapshots in 1 component

A change is a question for the reviewer, not a failure.

Component · story Before After Diff
Slider · Disabled With Text Value (probe, dark) · inheritance unknown: not found in the 9 newest reports of other pull requests before frame after frame diff frame
Slider · Disabled With Text Value (probe, light) · inheritance unknown: not found in the 9 newest reports of other pull requests before frame after frame diff frame
Slider · Disabled With Text Value (neutral, dark) · inheritance unknown: not found in the 9 newest reports of other pull requests before frame after frame diff frame
Slider · Disabled With Text Value (neutral, light) · inheritance unknown: not found in the 9 newest reports of other pull requests before frame after frame diff frame

Inheritance checked against the 9 newest reports of other pull requests.

Package size: @astryxdesign/core 7.95 MB packed (+1.1 kB); no new dependencies.

Touched components checked; for the full suites, 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 fix keeps a whole-number Slider's track at one length, but the release claims, one React key and one size report need work before approval.

  • The title and changeset say the track no longer changes length as the value text changes, but a fractional step (0 to 1 by 0.1 goes from 583.98 px to 572.22 px at 0.1) and the new Rating story (643.5 px to 618.03 px at "Not good") still resize it, so narrow the wording to ranges whose end values have the widest text, or extend the reserve to cover a step's decimals.
  • Slider.tsx keys each hidden copy by its text, so a text-value slider whose ends format alike (for example min === max) logs React's duplicate-key error; key the copies by index or dedupe them.
  • This grows the valueDisplay="text" feature, so the description needs the first-load gzip delta for a page that renders Slider without it (architecture:component-import-boundaries INV10); the built Slider module grows by about 197 B gzip.

Two smaller suggestions: compute the reserved texts only when valueDisplay is "text", since tooltip and none sliders now call formatValue for both ends on every render, and shorten the new comment above them.

Claims and files checked

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

  • Changeset: the track no longer changes length as the value text changes. False for a fractional step (0 to 1 by 0.1: 583.98 px at 0, 572.22 px at 0.1) and for a formatValue whose middle text is widest (the Rating story); true for whole-number ranges.
  • Changeset: the text reserves its widest end value and uses tabular figures. Verified (Slider.tsx:1690-1703, :513).
  • Changeset: a patch for core. Consistent; no public API changes.
  • Description: the value text changed width with the value, and 90 to 100 cost the track 8 px. Verified (main: 663.97 px at 90, 655.97 px at 100).
  • Description: the thumb slid off a held pointer because the value per pixel changed. Verified from the drag controller, which re-measures the track mid-drag and divides travel by the new length (sliderTouchController.ts:371-375, :689).
  • Description: afterwards the track keeps its length across every value. False, for the same two cases as the changeset.
  • Description: the text, its position, the tooltip and none displays, keyboard and touch input, and the accessible value are unchanged. Verified (same visible string, text still at the row end, only the text branch changes, thumbs untouched, copies aria-hidden).
  • Description: hidden copies of the end texts share one grid cell with the visible value. Verified (Slider.tsx:1688-1704).
  • Description: a formatValue output that is wider in the middle grows the box instead of clipping. Verified (Rating: box 36.5 px, then 61.97 px at Not good, no overflow).
  • Description: a new Text Value Widths story. Verified (Slider.stories.tsx:116-146).
  • Description: no record changes, and the Slider record's pointer-travel and stable-part clauses govern. No record changes; the pointer-travel clause governs, while the stable-part clause covers anatomy only.
  • Description: the new browser spec fails on main and passes here. Consistent with base and head probes of the same widths, but not rerun; 591.98 px is the width at 0, and the 90 to 100 step is 8 px.
  • Description: WebKit runs in CI's WebKit project. The spec matches the WebKit glob (.github/scripts/lib/a11y-spec-files.mjs:26-28); CI has not run at this head.
  • Description: the Slider suites pass (177). Verified (7 files, 177 tests passed).
  • Description: TypeScript, ESLint, the knowledge check and the changeset check are clean. Verified for ESLint on the changed files, the knowledge check, the changeset check and the core typecheck. The Storybook typecheck shows no error in Slider.stories.tsx, but it could not finish without the chart, vega and probe-theme builds.
  • Description: no new public API. Verified (the API generator reports no rows for core or any theme).
  • Description: the public text contains no internal context. Verified (title, body, branch, commit message and added lines).
  • .changeset/slider-text-value-stable-track.md: the track-length claim is broader than the fix (finding).
  • apps/storybook/stories/Slider.stories.tsx: clear.
  • packages/core/src/Slider/Slider.tsx: the copies' keys repeat when both ends format alike (finding); two small suggestions.
  • packages/core/src/Slider/tests/SliderTextValueWidth.a11y.browser.spec.ts: clear; it covers whole-number stories only, consistent with the changeset finding.

Automated review (maintainer link)

Comment thread packages/core/src/Slider/Slider.tsx Resolved
Comment thread packages/core/src/Slider/Slider.tsx Resolved
Comment thread packages/core/src/Slider/Slider.tsx Resolved
… keys copies uniquely

A fractional step's first value (0.1 next to 0 and 1) was wider than both
ends, so the track still shrank there. The hidden copies now cover the
values at and one step in from each end, deduplicated so equal texts
(min equal to max) share one key, and are built only for a text value
display. The changeset says a mid-range-widest formatValue still widens
the box.
@cixzhang cixzhang changed the title fix(Slider): a text value keeps the track's length while the value changes fix(Slider): a text value reserves the width of the values near each end, so the track keeps its length Nov 18, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 3703b23

@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 reserve keeps whole-number and 0 to 1 text-value tracks at one length during a drag, but it is built from hidden copies of the text and its one-step-in values are not snapped.

  • Miss: Slider.tsx:1708-1719 renders up to 4 hidden copies of the value text for a single slider and 16 for a range to reserve its width, which architecture:component-style-authoring INV7 rules out ("no hidden twin to measure or reserve space"), so render the text once and reserve its width on that element in CSS (for example a StyleX dynamic minInlineSize in ch from the longest end text), or state an exception with element counts and record it in component:Slider.
  • Slider.tsx:1695-1696 uses raw min + step and max - step instead of snapping them like a reached value, so a min={0} max={0.8} step={0.1} slider reserves the text 0.7000000000000001 and its track drops from 660 to 540 px (386 px instead of 626 px with two thumbs); snap and clamp both values with snapToStep and add a test for such a range.
  • Miss: INV6 also asks for the change's CSS delta in the description; a local build shows the package stylesheet byte-identical, so that line is 0 B.

The duplicate-key error, the every-render reserve and the changeset's fractional-step wording from the last round are fixed, and the size report now matches a local build (+240 B gzip). Two smaller notes: the Rating story's widest label now sits inside the reserve, so neither the story nor its no-clip test exercises a box that grows, and the new comment above the reserve still runs to one 40-word sentence.

Claims and files checked

Review mode: incremental; reason: none

  • Changeset: the track keeps its length while the value changes, for example 90 to 100 or steps of 0.1. Verified: Custom Step holds 655.97 px and a 0 to 1 slider by 0.1 holds 660.22 px at every value.
  • Changeset: the text reserves the width of the values at and one step in from each end. False where max - step or min + step carries binary error, for example 0 to 0.8 by 0.1 reserves 0.7000000000000001.
  • Changeset: tabular figures. Verified (Slider.tsx:513).
  • Changeset: a custom formatter whose widest text falls mid-range still widens the box. Verified with a fixture: 36.5 px to 108.2 px, no overflow.
  • Changeset: a patch for core. Consistent; no public API changes.
  • Description: before, the value text changed width and 90 to 100 cost the track 8 px. Verified on the base (663.97 px to 655.97 px).
  • Description: after, the track keeps its length across every value. Verified, apart from the formatter case the description itself names.
  • Description: the text, its position, tooltip and none displays, keyboard, touch and the accessible value are unchanged. Verified (same string at the row end, only the text branch changes, copies are aria-hidden).
  • Description: hidden aria-hidden copies of the end and one-step-in texts share one grid cell with the visible value, every pair for a range, deduplicated. Verified (Slider.tsx:1690-1726); the range pairs include reversed pairs that never show.
  • Description: whole and fractional steps are covered (0, 0.1, 0.9, 1). True for 0 to 1 by 0.1; false for ranges with binary step error (above).
  • Description: the new story has a range and a formatter whose widest output is in the middle. Partly: its widest label is one step in from the minimum and is now reserved, so the box never grows.
  • Description: no record change; the Slider record's pointer-travel and stable-part clauses govern. No record change; the pointer-travel clause governs, the stable-part clause covers anatomy only.
  • Description: the browser spec fails on the base and passes here, 7 of 7 in Chromium. Not rerun; base and head probes of the same scenarios agree.
  • Description: WebKit runs in CI's WebKit project. The spec matches the WebKit glob (.github/scripts/lib/a11y-spec-files.mjs:26-28); CI was skipped for this draft head.
  • Description: the Slider suites pass (178), including min equal to max. Verified (7 files, 178 tests).
  • Description: the built Slider module grows by 240 B gzip, within the optional-feature allowance. Verified (15,206 B to 15,446 B).
  • Description: TypeScript, ESLint, the knowledge check and the changeset check are clean. Verified for the core typecheck, ESLint on the changed files, the knowledge check and the changeset check.
  • Description: no new public API and no record change. Verified (the API generator reports no rows for core or any theme).
  • Description: public text contains no internal context. Verified.
  • .changeset/slider-text-value-stable-track.md: the one-step-in claim fails for ranges with binary step error (finding).
  • apps/storybook/stories/Slider.stories.tsx: the Rating example no longer shows a mid-range-widest label (note).
  • packages/core/src/Slider/Slider.tsx: hidden copies against INV7 and unsnapped one-step-in values (findings); comment style (note).
  • packages/core/src/Slider/Slider.test.tsx: clear.
  • packages/core/src/Slider/__tests__/SliderTextValueWidth.a11y.browser.spec.ts: clear; its no-clip case depends on the Rating example above.

Automated review (maintainer link)

Comment thread packages/core/src/Slider/Slider.tsx Resolved
Comment thread packages/core/src/Slider/Slider.tsx Resolved
…nd values

The hidden copies of the value text are gone (component-style-authoring
INV7: no hidden twin to reserve space). The one text element takes a
min-inline-size reserved per character of the widest end text: a tabular
digit at 0.6em, a space at 0.3em, anything else at 1em. The values one
step in from each end are snapped and clamped like a reached value, so a
0-to-0.8 slider reserves 0.7, not 0.7000000000000001.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 6170f07

@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 text value now reserves its width on one element and holds the track at one length in the system fallback font, but the per-character estimate falls short for the neutral theme's own font, so the track can still change length during a drag.

  • Slider.tsx:1687-1691 counts a digit as 0.6 em and a space as 0.3 em, but Figtree (the neutral and stone themes' body font) has 0.62 em tabular digits, DejaVu Sans 0.636 em and the browser's monospace 0.602 em for digits and spaces, so Custom Step's track shrinks from 654.81 to 653 px at 100 in Figtree and the Price range from 590.41 to 587.28 px at 1000 – 1000 in monospace while the title and changeset say the track keeps its length; count digits and spaces in ch (for example calc(${digitsAndSpaces}ch + ${others}em)) with a browser case under a wide-digit font, or narrow the claims to fonts whose digits are at most 0.6 em.

The hidden copies, the unsnapped one-step-in values and the repeated keys from earlier rounds are fixed, and the size report matches. Non-blocking: the Storybook preview loads no theme web font, so the new browser spec only ever measures the fallback font; letters count as 1 em each, so the Rating box reserves 102 px for a 62 px widest label and the 60 to 90 °F example's track loses 15.5 px it never needed; the Rating story's widest label sits inside the reserve, so its no-clip test never reaches a growing box; the unit test at Slider.test.tsx:2309 is named for copies the head no longer renders; and the comment above the reserve has a 37-word sentence.

Claims and files checked

Review mode: same-head; reason: none

  • Changed rules since the last review (0): none.
  • Title and changeset: with a text value the track keeps its length while the value changes, for example 90 to 100 or steps of 0.1. Verified in the system fallback font (Custom Step holds 654.81 px at 0, 90 and 100; 0 to 0.8 and 0 to 1 by 0.1 hold 649.2 px); false in Figtree, DejaVu Sans and monospace (finding).
  • Changeset: the text reserves the width of the values at and one step in from each end. Partly: it reserves a per-character estimate of those texts, wider than them for letters and narrower in wide-digit fonts.
  • Changeset: the text uses tabular figures. Verified (Slider.tsx:513); fonts without tabular figures (Poppins, DM Sans, Albert Sans) keep proportional digits.
  • Changeset: a formatter whose widest text falls mid-range still widens the box when that value shows. Verified by the CSS (a minimum size only).
  • Changeset: a patch for core. Consistent; no public API changes.
  • Description: the problem was reported in a public issue. Verified (an open issue about the track resizing while dragging).
  • Description: before, the text changed width and 90 to 100 cost the track 8 px. Verified on the base (663.97 to 655.97 px).
  • Description: after, the track keeps its length across every value. Verified in the fallback font; false in Figtree, DejaVu Sans and monospace (finding).
  • Description: the text, its position, the tooltip and none displays, keyboard, touch and the accessible value are unchanged. Verified (same string at the row's end, also on a vertical slider; only the text branch changes).
  • Description: one value-text element reserves its width in CSS, with no hidden copies. Verified (one span with a StyleX dynamic minimum inline size).
  • Description: the reserve is the widest of the texts at and one step in from each end, every pair for a range. Verified (Slider.tsx:1694-1703).
  • Description: counted per character, a digit at 0.6 em (a body font's about 0.57 em), a space at 0.3 em, anything else at 1 em, which no glyph exceeds. The code matches; the digit figure is below Figtree (0.62 em), DejaVu Sans (0.636 em) and monospace (0.602 em), and the space figure below monospace and Fustat (0.6 em).
  • Description: the one-step-in values are snapped and clamped, so 0 to 0.8 reserves 0.7. Verified (a 2.2 em box).
  • Description: a wider mid-range formatter output grows the box rather than clipping, and the changeset says so. Verified.
  • Description: a new story with a range and a formatter whose widest output is in the middle. Partly: its widest label is one step in from the minimum, inside the reserve.
  • Description: no record change; the Slider record's pointer-travel and stable-part clauses govern. Consistent: the pointer-travel clause governs.
  • Description: the browser spec fails on main and passes here, 8 of 8 in Chromium. Not rerun; it has 8 cases, and base and head probes of the same scenarios agree in the fallback font, which is the only font the Storybook preview renders.
  • Description: WebKit runs in CI's WebKit project. The spec matches that project's file pattern; CI has not run on this draft head.
  • Description: the Slider suites pass (178), including min equal to max with no duplicate-key error. Verified (7 files, 178 tests); that case can no longer produce a key error.
  • Description: the minified Slider module grows by 276 B gzip, within the 307 B allowance, and the stylesheet by 27 B. Consistent with CodeBunny's build of this head (+283 B for the Slider import, +28 B CSS).
  • Description: TypeScript, ESLint, the knowledge check and the changeset check are clean. Verified for ESLint on the changed files, the knowledge check and the changeset check; TypeScript was not rerun.
  • Description: no new public API, no record change, no internal context in public text. Verified.
  • .changeset/slider-text-value-stable-track.md: the constant-track claim fails in wide-digit fonts (finding).
  • apps/storybook/stories/Slider.stories.tsx: the Rating example's widest label sits inside the reserve (note).
  • packages/core/src/Slider/Slider.tsx: the width estimate is below some fonts' digits and spaces (finding); comment style (note).
  • packages/core/src/Slider/Slider.test.tsx: the test name describes removed copies (note).
  • packages/core/src/Slider/__tests__/SliderTextValueWidth.a11y.browser.spec.ts: clear; it runs in Storybook's fallback font, and its no-clip case depends on the Rating example.

Automated review (maintainer link)

Comment thread packages/core/src/Slider/Slider.tsx Resolved
A digit at 0.6em fell short in fonts with wider digits (Figtree 0.625em,
DejaVu Sans 0.636em, monospace with 0.602em spaces), so the track could
still change length. A tabular digit or a space now counts as 1ch, the
width of the font's own zero, plus 1px for a text run's rounding. The
reserve takes the most ch and the most em any end text needs. Browser
cases under monospace and DejaVu Sans keep the range's track at one
length.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 1820f62

@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: counting digits and spaces in ch keeps the track at one length in the default theme and most published theme fonts, but the reserve still falls short in fonts without tabular figures, which the description and changeset do not allow for.

  • Slider.tsx:1683-1684 counts every digit as 1ch (the font's zero), which bounds a digit only when the font's digits are tabular or its zero is the widest, and the y2k theme's Poppins has neither, so with hinted text, as Chromium renders it on Linux, a 0 to 500 slider's track drops from 645 to 644 px at ten values between 404 and 484 and to 643 px at 444 while the description says "in any font" and the changeset promises a constant length; narrow those claims and the comment to fonts with tabular figures (noting a pixel or two elsewhere), or reserve the difference and add a browser case under Poppins.

The earlier font estimate, the unit-test name and the long comment sentence are fixed, and the size report matches a fresh build. Non-blocking: the Rating story's widest label still sits inside the reserve, so its no-clip test never reaches a growing box, and the description still counts 8 browser cases where the spec now has 10.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules since the last review (0): none.
  • Changeset: with a text value the track keeps its length while the value changes, for example 90 to 100 or steps of 0.1. Verified in fonts with tabular figures and in DM Sans (Custom Step holds 654.98 px at 0, 90 and 100; 0 to 500 holds under the neutral, stone, butter, gothic, matcha and chocolate themes); false in the y2k theme's Poppins, 645 to 643 px at 444 (finding).
  • Changeset: the text reserves the width of the values at and one step in from each end. Verified, as a count in ch and em (Slider.tsx:1692-1703).
  • Changeset: the text uses tabular figures. Verified (Slider.tsx:513); fonts without them (Poppins, DM Sans, Albert Sans) keep proportional digits.
  • Changeset: a formatter whose widest text falls mid-range still widens the box. Verified (a minimum size only).
  • Changeset: a patch for core. Consistent; no public API changes.
  • Description: the problem was reported in a public issue. Verified (an open issue about the track resizing while dragging).
  • Description: before, the text changed width and 90 to 100 cost the track 8 px. Verified on the base (663.97 to 655.97 px).
  • Description: after, the track keeps its length across every value. Verified except in fonts without tabular figures whose digits outgrow their zero (finding).
  • Description: in any font the reserve follows the font's own digit width, so Figtree, DejaVu Sans and monospace hold. Those three verified; "any font" is false for Poppins (finding).
  • Description: the text, its position, the tooltip and none displays, keyboard, touch and the accessible value are unchanged. Verified (only the text branch changes; same string; Slider suites pass).
  • Description: one value-text element reserves its width in CSS, with no hidden copies. Verified.
  • Description: the reserve covers the texts at and one step in from each end, every pair for a range. Verified (Slider.tsx:1692-1702).
  • Description: a tabular digit or a space counts as 1ch, which no tabular digit or space exceeds, with Figtree at 0.625 em digits and ch. Partly: true for tabular digits; Figtree's ch is 0.641 em against 0.623 em digits; DejaVu Sans and monospace match.
  • Description: any other character counts as 1 em, plus 1 px. Verified (Slider.tsx:1703).
  • Description: the value is tabular and end-aligned. Verified (Slider.tsx:509-513).
  • Description: a new story with a range and a formatter whose widest output is in the middle. Partly: its widest label is one step in from the minimum, inside the reserve (note).
  • Description: no record change; the Slider record's pointer-travel and stable-part clauses govern. Verified.
  • Description: the browser spec fails on main and passes here. Not rerun; this run's base and head probes of the same scenarios agree.
  • Description: 8 of 8 Chromium cases pass. Not rerun; the head's spec has 10 cases (note).
  • Description: WebKit runs in CI's WebKit project. The spec matches that project's file pattern; CI has not run on this draft head.
  • Description: the Slider suites pass (178), including min equal to max. Verified (7 files, 178 tests).
  • Description: the Slider module grows by 301 B gzip, within the 307 B allowance, and the stylesheet by 27 B. Verified (module 6,602 to 6,903 B; Slider import +292 B; its CSS +28 B).
  • Description: browser cases under monospace and DejaVu Sans keep the Price range at one length. Verified (both fonts hold in this run's sweeps).
  • Description: no new public API, no record change, no internal context in public text. Verified.
  • .changeset/slider-text-value-stable-track.md: the constant-length claim fails in fonts without tabular figures (finding).
  • apps/storybook/stories/Slider.stories.tsx: the Rating example's widest label sits inside the reserve (note).
  • packages/core/src/Slider/Slider.tsx: digits counted at 1ch fall short for Poppins (finding).
  • packages/core/src/Slider/Slider.test.tsx: clear.
  • packages/core/src/Slider/__tests__/SliderTextValueWidth.a11y.browser.spec.ts: clear apart from a stale comment about 0.6 em digits (note); its font cases are both tabular.

Automated review (maintainer link)

Comment thread packages/core/src/Slider/Slider.tsx Resolved
In a font whose digits are neither tabular nor no wider than its zero
(Poppins in Y2K), the track can still shift by a pixel or two; the
changeset, comment and description now say so.
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 7b53599

@cixzhang cixzhang changed the title fix(Slider): a text value reserves the width of its longest value, so the track keeps its length fix(Slider): a text value reserves room for its longest value, so a numeric track keeps its length Nov 20, 2026
The floor counts characters, so value text whose characters are much wider
than a digit may move the track; the record now says so, as the release
note does.
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 20, 2026
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 2d6e282

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 20, 2026

@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 floor now holds the track at one length for digit-width text in every story case, and the spec change has an owner's approval at this head, but two statements in the release text are false.

  • The changeset says characters much wider than a digit move the track "by a few pixels", but a five-star formatValue ('★'.repeat(v)) moves it about 17 px (551.95 px at one to three stars, 548 px at four, 535 px at five); drop "by a few pixels" or give that figure.
  • The Preflight section says the head's delta from its preflight revision is the changeset text and one source comment, but the head also rewrites FR3's known-gap sentence in the Slider record; name that change and the knowledge check, which passes at this head.

The code needs no change. The non-blocking notes from earlier reviews (the new comment's length, the inline-formatter memo, the unit test that cannot fail, two stale browser-spec comments, and the missing writing-rubric results) still stand.

Claims and files checked

Review mode: full; reason: spec-record

  • Title, a text value reserves room for its longest value so a numeric track keeps its length: verified (Custom Step 567.97 px at 0, 90 and 100; six theme fonts in the browser spec)
  • Changeset, one track length while the value changes and during a drag for digit-width text (numbers, units, most words): verified for every story case and the drag
  • Changeset, a floor of one ch per character of the longest step text plus one, text at its end: verified (Slider.tsx:1680-1716)
  • Changeset, above 200 steps only the ends and the values one step in count, so a mid-range custom format may move the track: verified (Slider.tsx:1686-1689)
  • Changeset, wider characters such as stars or capitals can move the track by a few pixels: false for stars (about 17 px at five); holds for capitals (2.34 px)
  • Changeset credits both contributors: verified
  • Reported in a public issue: verified
  • Before, 90 to 100 loses 8 px: verified (583.97 to 575.97 px)
  • After, one length at every value and during a drag for digit-width text, in the default font and every bundled theme's body font: verified for the story cases
  • Resting track 24.01 px shorter on Custom Step at 0 and 49.78 px on a 0–1000 range at rest: verified (567.97 against 591.98 px; 503.91 against 553.69 px)
  • Still possible, a star rating moves 4 px at four stars and 17 px at five, capitals 2.34 px, above 200 steps a mid-range format, listed in the record: verified
  • Text position, tooltip and none displays, keyboard, touch and accessible value unchanged: verified
  • Earlier tables replaced by the browser proof: verified
  • The earlier community attempt reserved in characters, end-aligned, with no hidden copy, for the ends and their neighbours, credited with co-author trailers: verified, incomplete (it also sampled the quarter points)
  • Every step value formatted instead of a sample: verified up to 200 steps
  • Floor, range floor with the separator, memo inputs, cut-off, end alignment, no hidden copy, no layout read: verified
  • No tabular figures and no kerning change: verified
  • Browser spec covers the default font, two wide-digit fonts and six theme body fonts from the theme packages: verified
  • Record gains one known-gap sentence; fix changeset; the track-length and style rules govern: verified (owner-approved at this head)
  • Red first, the new spec fails on main: verified (main's track takes three lengths from 0 to 100)
  • 88 Chromium cases (54 and 34, one fixme), two runs with 85 passed and no failures: case count verified; 87 passed in this review, a difference the specs' engine-capability skips can explain
  • The listed browser cases pass in Chromium: verified
  • The new spec runs in CI's WebKit project: verified by configuration, not run
  • Slider unit suites pass (179): verified
  • First-load +256 B gzip, under the 307 B limit, reference pages unchanged: verified (table page −2 B)
  • One defect, no tag-along, no new public API, no internal context: verified
  • Preflight at an earlier revision, with only the changeset text and one comment changed since: false (the record line changed too)
  • packages/core/src/Slider/Slider.tsx: clear; two non-blocking notes (comment length, inline-formatter memo)
  • .changeset/slider-text-value-stable-track.md: blocking (the few-pixels claim)
  • docs/specs/components/Slider/Slider.spec.md: clear (owner-approved); non-blocking note on the gap line's form
  • apps/storybook/stories/Slider.stories.tsx: clear; non-blocking (the widest Rating word is one step in)
  • packages/core/src/Slider/Slider.test.tsx: non-blocking (the test cannot fail)
  • packages/core/src/Slider/__tests__/SliderTextValueWidth.a11y.browser.spec.ts: non-blocking (two stale comments)

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 30b5103

@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 text floor holds the track at one length for every step value in the stories, the release text matches the code, and the record change has an owner's approval at this head, but the floor misses one value the slider itself shows.

  • Miss: Slider.tsx snaps max to the step grid before counting its text while End shows max itself, so a slider whose max lies off the grid still moves the track (with min={0} max={10.25} step={1}: 575.98 px at 0 and 10, 564.2 px at End), which makes the changeset's "the track keeps one length while the value changes" false for it; also count format(max).length and add a browser case with an off-grid max.

The non-blocking notes from earlier reviews (the description's 85-passed count, the new comment's length, the inline-formatter memo, the unit test that cannot fail, two stale browser-spec comments, the Rating story's widest word and the missing writing-rubric results) still stand.

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (0): none
  • Title, a text value reserves room for its longest value so a numeric track keeps its length: false for an off-grid max (End shows 10.25, the floor counts 10); verified for step values (Custom Step 567.97 px at 0, 90 and 100)
  • Changeset, one track length while the value changes and during a drag for digit-width text: false for an off-grid max at End (575.98 to 564.2 px); verified for every story case
  • Changeset, a floor of one ch per character of the longest step text plus one, with the text at its end: verified (Slider.tsx:1680-1716)
  • Changeset, above 200 steps only the ends and the values one step in count, so a mid-range custom format may move the track: verified (Slider.tsx:1686-1689)
  • Changeset, characters much wider than a digit can move the track, five stars about 17 px: verified (551.95 to 535 px)
  • Changeset credits both contributors: verified
  • Reported in a public issue: verified
  • Before, 90 to 100 loses 8 px: verified (583.97 to 575.97 px)
  • After, one length at every value and during a drag in the default and bundled theme fonts: verified for the story cases; false for an off-grid max at End
  • Resting track 24.01 px shorter at 0, and 49.78 px on a 0 to 1000 range at rest: verified (567.97 against 591.98 px; the range rests at 503.91 px)
  • Still possible: stars 4 px at four and 17 px at five, capitals 2.34 px, mid-range formats above 200 steps, listed in the record: verified (3.95 and 16.95 px; the record's FR3 row)
  • Text, its position, the tooltip and none displays, keyboard, touch and the accessible value unchanged: verified
  • Earlier community attempt with the same shape, credited: verified
  • Every step value formatted instead of a sample: verified up to 200 steps
  • Floor, range floor with the separator, memo inputs, cut-off, end alignment, no hidden copy, no layout read: verified
  • No tabular figures and no kerning change: verified
  • Browser spec runs in the default font, two wide-digit fonts and six theme body fonts loaded from the theme packages: verified (the six font files exist)
  • Record gains one known-gap sentence; fix changeset; the track-length and style rules govern: verified (owner-approved at this head)
  • Red first, the new spec fails on main: verified (the base track takes three lengths from 0 to 100)
  • 88 Chromium cases, two runs with 85 passed and no failures: case count verified; 87 passed on the same code (non-blocking)
  • The new spec runs in CI's WebKit project: verified by configuration, not run (CI skipped this head)
  • Slider unit suites pass (179): verified
  • First-load size +256 B gzip, under the 307 B limit, reference pages unchanged: verified on the same code
  • One defect, no tag-along, no new public API, no internal context: verified (no public API rows)
  • Preflight at an earlier revision, with the changeset text, one comment and the record's known-gap sentence changed since: verified
  • packages/core/src/Slider/Slider.tsx: blocking (off-grid max); two non-blocking notes (comment length, inline-formatter memo)
  • .changeset/slider-text-value-stable-track.md: its one-length claim is false for an off-grid max (the same finding)
  • docs/specs/components/Slider/Slider.spec.md: clear (owner-approved); non-blocking note on the gap line's form
  • apps/storybook/stories/Slider.stories.tsx: clear; non-blocking (the widest Rating word is one step in)
  • packages/core/src/Slider/Slider.test.tsx: non-blocking (the test cannot fail)
  • packages/core/src/Slider/__tests__/SliderTextValueWidth.a11y.browser.spec.ts: non-blocking (two stale comments)

Automated review (maintainer link)

Comment thread packages/core/src/Slider/Slider.tsx Resolved
End shows max itself, which can lie off the step grid (min 0, max 10.25,
step 1), so the floor counts format(max) beside the snapped step values.
A unit test asserts the floor for that slider (6ch for "10.25").

@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 floor holds the track at one length for every value the slider shows, an off-grid max at End included, and FR3's known-gap sentence now has an engineering owner's approval at this head, but one sentence in the description is still out of date.

  • The Preflight section says the head differs from the revision the full preflight ran on only in the changeset text, one source comment and FR3's known-gap sentence, but that delta also changes how Slider.tsx computes the floor (it now counts format(max)) and adds the off-grid unit test, so name those two changes in that sentence with the checks that ran on them.

Correcting that sentence is the only change this review asks for. The non-blocking notes from earlier reviews still stand: the 85-passed count, the comment's length, the inline-formatter memo, the duplicate-key test that cannot fail, two stale browser-spec comments, the Rating story's widest word, the missing writing-rubric results, and the toContain('6ch') assertion that would also accept 16ch.

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (0): none
  • Title: a text value reserves room for its longest value, so a numeric track keeps its length: verified (Custom Step 567.97 px at 0, 90 and 100; a 0 to 10.25 slider by 1 holds 551.95 px at 0, 10 and End)
  • Changeset: one track length while the value changes and during a drag, for digit-width text: verified (probes; the browser spec's drag case)
  • Changeset: a floor of one ch per character of the longest text any step value shows, plus one, with the text at its end: verified (Slider.tsx:1680-1717, :509-510)
  • Changeset: above 200 steps only the ends and the values one step in count, so a mid-range custom format may move the track: verified (Slider.tsx:1685-1689)
  • Changeset: characters much wider than a digit can move the track, five stars about 17 px: verified (16.95 px measured on the same floor)
  • Changeset credits both contributors, and two commits carry the co-author trailer: verified
  • Reported in a public issue: verified
  • Before, 90 to 100 loses 8 px: verified (583.97 to 575.97 px on the base)
  • After, one length at every value and during a drag, in the default and every bundled theme font: verified (the browser spec's six theme-font cases pass among its Chromium cases)
  • Resting track 24.01 px shorter on Custom Step at 0, and 49.78 px on a 0 to 1000 range: verified for Custom Step (567.97 against 591.98 px); the range figure was measured earlier on the same floor
  • Still possible: stars, capitals and mid-range formats above 200 steps, listed in the record: verified (FR3's row)
  • Text, its position, the tooltip and none displays, keyboard, touch and the accessible value unchanged: verified (only the text branch changes)
  • Earlier community attempt with the same shape, credited; this pull request formats every step value instead of sampling: verified up to 200 steps
  • Floor, range floor with the separator, max counted as End shows it, memo inputs, cut-off, end alignment, no hidden copy, no layout read: verified (Slider.tsx:1680-1717)
  • No tabular figures and no kerning change: verified
  • Browser spec runs in the default font, two wide-digit fonts and six theme body fonts loaded from the theme packages: verified (the six font files exist)
  • Record gains one known-gap sentence; fix changeset; the track-length and style rules govern: verified (owner-approved at this head)
  • Red first, the new spec fails on the base: verified (the base track takes three lengths from 0 to 100)
  • 88 Chromium cases, two runs with 85 passed and no failures: case count verified; the same specs gave 87 passed and 1 skipped on this head (non-blocking)
  • The new spec runs in CI's WebKit project: verified by configuration, not run (CI has not run on this draft head)
  • Off-grid max unit test asserts 6ch and failed with 3ch before this head: verified
  • Slider unit suites pass (180): verified
  • First-load size +256 B gzip, under the 307 B limit, reference pages unchanged: verified (+256 B; the four reference pages +0 B)
  • One defect, no tag-along, no new public API, no internal context: verified (0 API rows)
  • Full preflight passed at an earlier revision: not re-run; consistent with the Vitest, ESLint, Prettier, tsc and browser runs on this head
  • Preflight, the head differs from that revision only in the changeset text, one comment and the FR3 sentence: false (that delta also changes the floor at Slider.tsx:1690-1694 and adds a unit test)
  • packages/core/src/Slider/Slider.tsx: clear; non-blocking notes on the comment at :1699-1704 and the inline-formatter memo
  • .changeset/slider-text-value-stable-track.md: clear
  • docs/specs/components/Slider/Slider.spec.md: clear (owner-approved at this head); non-blocking note on the gap line's form
  • apps/storybook/stories/Slider.stories.tsx: clear; non-blocking (the widest Rating word sits one step in)
  • packages/core/src/Slider/Slider.test.tsx: non-blocking (the new assertion also accepts 16ch; the duplicate-key test cannot fail)
  • packages/core/src/Slider/__tests__/SliderTextValueWidth.a11y.browser.spec.ts: clear; non-blocking (two stale comments)
  • Pull request description: blocking (the Preflight sentence)

Automated review (maintainer link)

);
const text = screen.getByText('0');
// "10.25" is the longest text: five characters plus one.
expect(text.getAttribute('style') ?? '').toContain('6ch');

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.

Non-blocking: toContain('6ch') also passes for a 16ch floor. Matching the declaration pins it: toContain('minInlineSize: 6ch;').

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 4cc7210

@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 text value's floor holds the track at one length for every step value the slider shows, an off-grid max at End included, and FR3's known-gap sentence has an engineering owner's approval at this head.

CI has started on this head now that the pull request is ready for review, and the merge guard waits for its required checks. One new non-blocking note:

  • Miss: Slider renders a caller's value without snapping it, so an off-grid value with more characters than any step value (such as 33.33 on a 0–100 slider by 1) can outgrow the floor until the first step or drag snaps it; FR3's known gap or the changeset could name it.

The earlier non-blocking notes still stand: the toContain('6ch') assertion that also accepts 16ch, the 85-passed count, the comment's length, the inline-formatter memo, the duplicate-key test that cannot fail, two stale browser-spec comments, the Rating story's widest word, and the missing writing-rubric results.

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (0): none
  • Title: a text value reserves room for its longest value, so a numeric track keeps its length: verified (Custom Step 567.97 px at 0, 90 and 100; a 0 to 10.25 slider by 1 holds 551.95 px at 0, 10 and End)
  • Changeset: one track length while the value changes and during a drag, for digit-width text: verified for step values (probes; the browser spec's drag case); a caller value off the step grid is not counted (non-blocking note)
  • Changeset: a floor of one ch per character of the longest text any step value shows, plus one, with the text at its end: verified (Slider.tsx:1680-1717, :509-510)
  • Changeset: above 200 steps only the ends and the values one step in count, so a mid-range custom format may move the track: verified (Slider.tsx:1685-1689)
  • Changeset: characters much wider than a digit can move the track, five stars about 17 px: verified (16.95 px measured on the same floor)
  • Changeset credits both contributors, and two commits carry the co-author trailer: verified
  • Reported in a public issue: verified
  • Before, 90 to 100 loses 8 px: verified (583.97 to 575.97 px on the base)
  • After, one length at every value and during a drag, in the default and every bundled theme font: verified (the browser spec's six theme-font cases pass among its Chromium cases)
  • Resting track 24.01 px shorter on Custom Step at 0, and 49.78 px on a 0 to 1000 range: verified for Custom Step (567.97 against 591.98 px); the range figure was measured earlier on the same floor
  • Still possible: stars (about 4 px at four, 17 px at five), capitals (2.34 px) and mid-range formats above 200 steps, listed in the record: verified (FR3's row)
  • Text, its position, the tooltip and none displays, keyboard, touch and the accessible value unchanged: verified (only the text branch changes)
  • Earlier community attempt with the same shape, credited; this pull request formats every step value instead of sampling: verified up to 200 steps
  • Floor, range floor with the separator, max counted as End shows it, memo inputs, cut-off, end alignment, no hidden copy, no layout read: verified (Slider.tsx:1680-1717)
  • No tabular figures and no kerning change: verified
  • Browser spec runs in the default font, two wide-digit fonts and six theme body fonts loaded from the theme packages: verified (the six font files exist)
  • Record gains one known-gap sentence; fix changeset; the track-length and style rules govern: verified (owner-approved at this head; the sentence also names the wide-glyph residual)
  • Red first, the new spec fails on the base: verified (the base track takes three lengths from 0 to 100)
  • 88 Chromium cases, two runs with 85 passed and no failures: case count verified; the same specs gave 87 passed and 1 skipped on this head (non-blocking)
  • The new spec runs in CI's WebKit project: verified by configuration; CI's WebKit legs have not reported on this head yet
  • Off-grid max unit test asserts 6ch and failed with 3ch before this head: verified
  • Slider unit suites pass (180): verified
  • First-load size +256 B gzip, under the 307 B limit, reference pages unchanged: verified (+256 B; the four reference pages +0 B)
  • One defect, no tag-along, no new public API, no internal context: verified (no API change)
  • Full preflight passed at an earlier revision: not re-run; consistent with the Vitest, ESLint, Prettier, tsc and browser runs on this head
  • Preflight, the head's delta from that revision is the changeset text, one comment, the FR3 sentence, the floor's format(max) count and its unit test: verified (the delta's four files and every hunk)
  • Preflight, on that delta lint, formatting and type checks pass and the Slider unit suites pass with the new test failing before the change: verified for ESLint, Prettier, tsc, the 180 unit tests and the red-first run; the repository's own pre-review, changeset and knowledge checks not re-run
  • packages/core/src/Slider/Slider.tsx: clear; non-blocking notes on the off-grid caller value, the comment at :1699-1704 and the inline-formatter memo
  • .changeset/slider-text-value-stable-track.md: clear
  • docs/specs/components/Slider/Slider.spec.md: clear (owner-approved at this head); non-blocking note on the gap line's form
  • apps/storybook/stories/Slider.stories.tsx: clear; non-blocking (the widest Rating word sits one step in)
  • packages/core/src/Slider/Slider.test.tsx: non-blocking (the new assertion also accepts 16ch; the duplicate-key test cannot fail)
  • packages/core/src/Slider/__tests__/SliderTextValueWidth.a11y.browser.spec.ts: clear; non-blocking (two stale comments)
  • Pull request description: clear; non-blocking (the 85-passed figure, no writing-rubric results)

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 21, 2026 03:17
github-actions Bot added a commit that referenced this pull request Nov 21, 2026
main's #13132 writes a range's text value through the
@astryx.slider.rangeValue catalog message. The reserve now counts that
message with both values at the longest length, plus one ch, instead of a
fixed ' – ' join; in English the floor is unchanged. A test reserves a
French range through an overridden message.
@cixzhang
cixzhang marked this pull request as draft November 21, 2026 04:18
@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 19138d4

@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 Slider fix itself is ready, but two statements in the description no longer match this revision.

  • The Evidence section reports that the Slider page grows by 256 B gzip without the text display and that the Slider Vitest suites pass with 180 tests, but at this revision the same measurement against the current base reports +306 B (1 B under the 307 B limit) and the suites run 182 tests, so please update both figures.
  • Miss: the second Preflight paragraph says the head's delta from the earlier full preflight is only the changeset text, one comment, the record sentence and the format(max) change with its test, but the merge with main also changed the range reserve in Slider.tsx and added the French unit test, so please say that delta belongs to the previous revision or add the merge's changes to it.

Everything else holds: the track keeps one length at every step value for a single value and a range, a translated range message gets its own room, and the record's known-gap sentence has an engineering owner's approval at this revision. CI has not run here because the pull request is a draft. The earlier non-blocking notes still stand (the off-grid caller value, now measured at 3.77 px, the loose toContain assertions, the duplicate-key test that cannot fail, the 85-passed figure, the comment's length, the inline-formatter memo, two stale browser-spec comments, the Rating story's widest word and the missing writing-rubric results).

Claims and files checked

Review mode: same-head; reason: none

  • Title: a text value reserves room for its longest value, so a numeric track keeps its length: verified for step values (Custom Step 567.97 px at 0, 90 and 100; a text-value range 519.92 px at four values); a caller value off the step grid is not counted (non-blocking)
  • Changeset: one track length while the value changes and during a drag, for digit-width text: verified for step values
  • Changeset: a floor of one ch per character of the longest step text, plus one, with the text at its end: verified (Slider.tsx:1680-1727, :509-510)
  • Changeset: above 200 steps only the ends and the values one step in count, so a mid-range custom format may move the track: verified (Slider.tsx:1685-1689)
  • Changeset: characters much wider than a digit can move the track, five stars about 17 px: verified (16.95 px)
  • Changeset credits both contributors, and two commits carry the co-author trailer: verified
  • Reported in a public issue; an earlier community attempt with the same shape is credited: verified
  • Before, 90 to 100 loses 8 px: verified on the current base (583.97 to 575.97 px)
  • After, one length at every value and during a drag, in the default and every bundled theme font: verified for step values (the browser spec's theme-font and drag cases pass)
  • Resting track shorter, 24.01 px on Custom Step at 0 and 49.78 px on a 0–1000 range at rest: verified
  • Still possible: stars move the track 4 px at four and 17 px at five, capitals 2.34 px, mid-range formats above 200 steps, listed in the record: verified (3.95, 16.95 and 2.34 px; FR3's row)
  • Text, its position, the tooltip and none displays, keyboard, touch and the accessible value unchanged: verified (only the text branch changes)
  • A range's floor counts the translated range message with both values at the longest length; in English both values and the separator: verified (10 ch for a 0–100 range; the French unit test reserves 13 ch)
  • max counted as End shows it, memo inputs, end alignment, no hidden copy, no layout read: verified
  • No tabular figures and no kerning change: verified
  • Browser spec runs in the default font, two wide-digit fonts and six theme body fonts from the theme packages: verified
  • Record gains one known-gap sentence; fix changeset; the track-length and style rules govern: verified (owner-approved at this revision)
  • Red first, the new spec fails on the base: verified (the base track takes three lengths from 0 to 100)
  • 88 Chromium cases, two runs with 85 passed: case count carried; the 85 figure is not checkable (non-blocking)
  • The new spec runs in CI's WebKit project: verified by configuration; CI has not run on this revision
  • Off-grid max unit test asserts 6 ch: verified
  • Slider Vitest suites pass (180): false at this revision, 182 pass (blocking)
  • First-load size +256 B gzip, under the 307 B limit, reference pages unchanged: false at this revision, +306 B against the current base (blocking); reference pages unchanged verified
  • One defect, no tag-along, no new public API, no internal context: verified (no API change)
  • Preflight at this revision: 182 unit tests, 54 browser specs, core typecheck, lint, pre-review, knowledge and changeset checks pass: verified
  • Preflight at an earlier revision and its stated delta: false at this revision, the delta leaves out the merge's range-reserve change and the French unit test (blocking, miss)
  • packages/core/src/Slider/Slider.tsx: clear; non-blocking notes on the off-grid caller value, the comment at :1699-1705 and the inline-formatter memo
  • packages/core/src/Slider/Slider.test.tsx: non-blocking (loose toContain assertions; the duplicate-key test cannot fail)
  • .changeset/slider-text-value-stable-track.md: clear
  • docs/specs/components/Slider/Slider.spec.md: clear (owner-approved at this revision); non-blocking note on the gap line's form
  • apps/storybook/stories/Slider.stories.tsx: clear; non-blocking (the widest Rating word sits one step in)
  • packages/core/src/Slider/__tests__/SliderTextValueWidth.a11y.browser.spec.ts: clear; non-blocking (two stale comments)
  • Pull request description: blocking (the size figure, the Vitest count and the earlier Preflight's delta); non-blocking (the 85-passed figure, no writing-rubric results)

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 still a draft.

The Slider fix holds: the track keeps one length at every step value for a single value and a range, a translated range message gets its own room, and the description's size figure, test count and Preflight now match this revision. The record's known-gap sentence has an engineering owner's approval at this revision. Marking the pull request ready for review lets CI run; the earlier non-blocking notes (the off-grid caller value, the loose toContain assertions, the duplicate-key test that cannot fail, the comment's length, the inline-formatter memo, two stale browser-spec comments, the Rating story's widest word and the missing writing-rubric results) remain optional.

Claims and files checked

Review mode: same-head; reason: none

  • Title: a text value reserves room for its longest value, so a numeric track keeps its length: verified for step values (Custom Step 567.97 px at 0, 90 and 100; a text-value range 519.92 px at four values); a caller value off the step grid is not counted (non-blocking)
  • Changeset: one track length while the value changes and during a drag, for digit-width text: verified for step values
  • Changeset: a floor of one ch per character of the longest step text, plus one, with the text at its end: verified (Slider.tsx:1680-1716, :509-510)
  • Changeset: above 200 steps only the ends and the values one step in count, so a mid-range custom format may move the track: verified (Slider.tsx:1685-1689)
  • Changeset: characters much wider than a digit can move the track, five stars about 17 px: verified (16.95 px)
  • Changeset credits both contributors: verified
  • Reported in a public issue: verified
  • Before, 90 to 100 loses 8 px: verified on the current base (583.97 to 575.97 px)
  • After, one length at every value and during a drag, in the default and every bundled theme body font: verified for step values (the browser spec's theme-font and drag cases pass; its six fonts cover all seven published themes)
  • Resting track shorter, 24.01 px on Custom Step at 0 and 49.78 px on a 0–1000 range at rest: verified
  • Still possible: stars move the track 4 px at four and 17 px at five, capitals 2.34 px, mid-range formats above 200 steps, listed in the record: verified (3.95, 16.95 and 2.34 px; the record's FR3 row)
  • Text, its position, the tooltip and none displays, keyboard, touch and the accessible value unchanged: verified (only the text branch changes)
  • Earlier-revision measurements are replaced by the browser proof: verified
  • Earlier community attempt credited, and the commits carry its co-author trailer: verified (two commits)
  • Every step value is formatted instead of a sample: verified up to 200 steps
  • A range's floor counts the translated range message with both values at the longest length; in English both values and the separator: verified (10 ch for a 0–100 range; the French unit test reserves 13 ch)
  • max counted as End shows it, memo inputs, end alignment, no hidden copy, no layout read: verified
  • No tabular figures and no kerning change: verified
  • Browser spec runs in the default font, two wide-digit fonts and six theme body fonts from the theme packages: verified
  • Record gains one known-gap sentence; fix changeset; the track-length and style rules govern: verified (owner-approved at this revision)
  • Red first, the new spec fails on the base: verified (the base track takes three lengths from 0 to 100)
  • Eight Slider browser spec files, 88 cases, two runs with 85 passed and no failures: spec files verified; 85 is consistent with one fixme and the engine-capability skips
  • The new spec runs in CI's WebKit project: verified by configuration; CI has not run on this revision
  • Off-grid max unit test asserts 6 ch: verified
  • Slider Vitest suites pass (182): verified
  • First-load size +306 B gzip against the current base, under the 307 B limit, reference pages unchanged: verified
  • One defect, no tag-along, no new public API, no internal context: verified
  • Preflight at this revision: 182 unit tests with the French 13 ch case, 54 browser specs, core typecheck, lint, pre-review, knowledge and changeset checks: verified
  • Earlier full preflight and the pre-merge delta from it: verified (the delta's files and changes match the history)
  • packages/core/src/Slider/Slider.tsx: clear; non-blocking notes on the off-grid caller value, the comment at :1699-1705 and the inline-formatter memo
  • packages/core/src/Slider/Slider.test.tsx: non-blocking (loose toContain assertions; the duplicate-key test cannot fail)
  • .changeset/slider-text-value-stable-track.md: clear
  • docs/specs/components/Slider/Slider.spec.md: clear (owner-approved at this revision); non-blocking note on the gap line's form
  • apps/storybook/stories/Slider.stories.tsx: clear; non-blocking (the widest Rating word sits one step in)
  • packages/core/src/Slider/__tests__/SliderTextValueWidth.a11y.browser.spec.ts: clear; non-blocking (two stale comments)
  • Pull request description: clear; non-blocking (no writing-rubric results)

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec d88152a

@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 every job it ran on this head after the pull request was marked ready for review.

The Slider fix holds: the track keeps one length at every step value for a single value and a range, a translated range message gets its own room, and the new browser spec passes in CI's Chromium run on this revision. The record's known-gap sentence has an engineering owner's approval at this revision, and the Slider page still grows by less than the 0.3 KB allowance without the text display. The earlier non-blocking notes (the off-grid caller value, the loose toContain assertions, the duplicate-key test that cannot fail, the comment's length, the inline-formatter memo, two stale browser-spec comments, the Rating story's widest word and the missing writing-rubric results) remain optional.

Claims and files checked

Review mode: same-head; reason: none

  • Title: a text value reserves room for its longest value, so a numeric track keeps its length: verified for step values (Custom Step 567.97 px at 0, 90 and 100; a text-value range 519.92 px at four values); a caller value off the step grid is not counted (non-blocking)
  • Changeset: one track length while the value changes and during a drag, for digit-width text: verified for step values
  • Changeset: a floor of one ch per character of the longest step text, plus one, with the text at its end: verified (Slider.tsx:1680-1726, :509-510)
  • Changeset: above 200 steps only the ends and the values one step in count, so a mid-range custom format may move the track: verified (Slider.tsx:1685-1689)
  • Changeset: characters much wider than a digit can move the track, five stars about 17 px: verified (16.95 px)
  • Changeset credits both contributors: verified
  • Reported in a public issue: verified
  • Before, 90 to 100 loses 8 px: verified (583.97 to 575.97 px)
  • After, one length at every value and during a drag, in the default and every bundled theme body font: verified for step values (the browser spec's theme-font and drag cases pass in CI's Chromium run on this revision; its six fonts cover all seven published themes)
  • Resting track shorter, 24.01 px on Custom Step at 0 and 49.78 px on a 0–1000 range at rest: verified
  • Still possible: stars move the track 4 px at four and 17 px at five, capitals 2.34 px, mid-range formats above 200 steps, listed in the record: verified (3.95, 16.95 and 2.34 px; the record's FR3 row)
  • Text, its position, the tooltip and none displays, keyboard, touch and the accessible value unchanged: verified (only the text branch changes; the text's end edge stays at the row's end)
  • Earlier-revision measurements are replaced by the browser proof: verified
  • Earlier community attempt credited, and the commits carry its co-author trailer: verified (two commits)
  • Every step value is formatted instead of a sample: verified up to 200 steps
  • A range's floor counts the translated range message with both values at the longest length; in English both values and the separator: verified (10 ch for a 0–100 range; the French unit test reserves 13 ch)
  • max counted as End shows it, memo inputs, end alignment, no hidden copy, no layout read: verified
  • No tabular figures and no kerning change: verified
  • Browser spec runs in the default font, two wide-digit fonts and six theme body fonts from the theme packages: verified (15 of 15 passed in CI's Chromium run on this revision)
  • Record gains one known-gap sentence; fix changeset; the track-length and style rules govern: verified (owner-approved at this revision)
  • Red first, the new spec fails on the base: verified (the base track takes three lengths from 0 to 100)
  • Eight Slider browser spec files, 88 cases, two runs with 85 passed and no failures: verified for this patch; 85 is consistent with one fixme and the engine-capability skips
  • The new spec runs in CI's WebKit project: verified by configuration; on pull requests CI runs it in Chromium, and WebKit runs it in the weekly WebKit job
  • Off-grid max unit test asserts 6 ch: verified
  • Slider unit suites pass (182): verified
  • First-load size +306 B gzip against the earlier base, under the 307 B limit, reference pages unchanged: verified for that revision; this revision measures +287 B against its own base, reference pages unchanged
  • One defect, no tag-along, no new public API, no internal context: verified (CI's API report for this revision lists no change)
  • Preflight at the earlier revision: 182 unit tests with the French 13 ch case, 54 browser specs, core typecheck, lint, pre-review, knowledge and changeset checks: verified
  • Earlier full preflight and the pre-merge delta from it: verified (the delta's files and changes match the history)
  • packages/core/src/Slider/Slider.tsx: clear; non-blocking notes on the off-grid caller value, the comment at :1699-1705 and the inline-formatter memo
  • packages/core/src/Slider/Slider.test.tsx: non-blocking (loose toContain assertions; the duplicate-key test cannot fail)
  • .changeset/slider-text-value-stable-track.md: clear
  • docs/specs/components/Slider/Slider.spec.md: clear (owner-approved at this revision); non-blocking note on the gap line's form
  • apps/storybook/stories/Slider.stories.tsx: clear; non-blocking (the widest Rating word sits one step in)
  • packages/core/src/Slider/__tests__/SliderTextValueWidth.a11y.browser.spec.ts: clear; non-blocking (two stale comments)
  • Pull request description: clear; non-blocking (no writing-rubric results)

Automated review (maintainer link)

@cixzhang
cixzhang marked this pull request as ready for review November 21, 2026 16:21
github-actions Bot added a commit that referenced this pull request Nov 21, 2026

This branch was successfully deployed

1 active deployment
Preview — d88152ab 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:0 Astryx fix-loop lane 0 owns this needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant