Skip to content

chore(core): UISlider's measured values - #8189

Draft
vjeux wants to merge 859 commits into
meta:mainfrom
vjeux:uikit/c03-slider-values
Draft

vjeux wants to merge 859 commits into
meta:mainfrom
vjeux:uikit/c03-slider-values

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #8076 (at 6f994bc). Review only this PR's change: vjeux/astryx@6f994bc...ca43cee

User need

Part of Astryx's UIKit-parity work (spec:AST-094), which makes touch presentations behave as on iOS. #8190 makes a Slider under a finger track like UISlider, and needs UISlider's real numbers: FR1–FR3 require a touch presentation's values to come from the UIKit constants table, each with its source.

Problem and solution fit

motion/uikit/slider.ts holds UISlider's values on iOS 26.2, each with its measurement:

  • Touch target: 48 pt, the 37 × 24 thumb grown by its hit insets; a tap on the track does nothing.
  • Tracking: the value moves by the finger's travel past a 10 pt threshold, over the track's length.
  • Release: a critically damped 0.4 s spring toward the lift value plus 0.4 of the momentum projection; none after a lift outside the bounds.
  • Lift and drop: ×1.55 on 0.215 s / 0.6, back on 0.5 s / 0.7.
  • Haptic: once per arrival at an end. Reduce Motion: the animator's policy; no mode of its own.

Current specification

spec:AST-094 FR1–FR3. component:Slider sets no touch physics.

Public delta and caller burden

None: an internal table ([chore]), unread here; touch motion has no theme surface.

Design and alternatives

  • Measured, not tuned by eye: a tuned value looks right in one demo and drifts from iOS; each value here comes from the lab's logs.
  • Travel, not position: the thumb travels 263 of the track's 300 pt, so it lags the finger, and mapping the finger's position would jump. Every logged valueChanged matches the travel rule to 10⁻⁴.
  • The coast uses UIKit's own settings, read at the lift. The lift uses the per-frame fit, which overshoots more than the read settings, as UISwitch's lens does (chore(core): UISwitch's measured values and flip rule #8123).

Evidence

A UIKit host app on the iOS 26.2 simulator (iPhone 17 Pro, real touches) logged valueChanged, the thumb's frames and four releases. The coast fits within 0.11 pt rms; a 126.9 pt/s release travelled 12.56 pt after the lift, against 12.64 pt predicted.

Scope

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

Testing

Data only; #8190 is its first reader. To check it:

  1. Read motion/uikit/slider.ts: each value names its measurement.
  2. Run pnpm exec vitest run --project ui packages/core/src/motion/uikit: slider.test.ts replays the logged drags and releases (tracking, lift and drop, coast) and holds the table to no Reduce Motion mode.

Run on this head: the UIKit table tests pass (196), and typecheck and lint are clean.

@vercel

vercel Bot commented Oct 24, 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 Oct 30, 2026 12:45am UTC

Request Review

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

astracat-bot Bot commented Oct 24, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Oct 30, 2026, 1:01 AM UTC

@github-actions

github-actions Bot commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

Component Size

Component Import before Import after Delta CSS before CSS after Delta
core/AlertDialog 56.9KB 57.0KB +117B 12.4KB 12.4KB 0B
core/AppShell 57.9KB 58.0KB +90B 11.6KB 11.6KB 0B
core/AvatarGroupOverflow 39.9KB 40.0KB +125B 6.4KB 6.4KB 0B
core/Banner 47.8KB 47.9KB +123B 9.9KB 9.9KB 0B
core/BaseTypeahead 54.3KB 54.4KB +111B 9.9KB 9.9KB 0B
core/BreadcrumbItem 66.4KB 66.5KB +105B 11.0KB 11.0KB 0B
core/Button 43.3KB 43.4KB +102B 9.2KB 9.2KB 0B
core/Calendar 54.9KB 55.0KB +110B 10.0KB 10.0KB 0B
core/Carousel 50.2KB 50.3KB +82B 10.2KB 10.2KB 0B
core/ChatComposer 60.6KB 60.7KB +100B 10.8KB 10.8KB 0B
core/ChatComposerInput 55.7KB 55.8KB +99B 10.1KB 10.1KB 0B
core/ChatComposerTokenElement 55.7KB 55.8KB +100B 10.1KB 10.1KB 0B
core/ChatDictationButton 46.5KB 46.6KB +107B 9.5KB 9.5KB 0B
core/ChatLayout 48.8KB 48.9KB +104B 9.9KB 9.9KB 0B
core/ChatLayoutScrollButton 46.4KB 46.5KB +84B 9.6KB 9.6KB 0B
core/ChatSendButton 45.8KB 45.9KB +96B 9.2KB 9.2KB 0B
core/CheckboxInput 49.9KB 50.0KB +105B 9.3KB 9.3KB 0B
core/CheckboxListItem 54.0KB 54.1KB +92B 10.5KB 10.5KB 0B
core/ClickableCard 12.8KB 12.9KB +117B 6.9KB 6.9KB 0B
core/CodeBlock 60.5KB 60.6KB +106B 10.7KB 10.7KB 0B
core/Collapsible 11.7KB 11.8KB +113B 4.2KB 4.2KB 0B
core/CommandPalette 50.9KB 51.0KB +104B 11.8KB 11.8KB 0B
core/CommandPaletteItem 8.4KB 8.5KB +110B 3.5KB 3.5KB 0B
core/ComplexSelector 55.8KB 55.9KB +132B 10.6KB 10.6KB 0B
core/ContextMenu 77.7KB 77.8KB +87B 14.6KB 14.6KB 0B
core/ContextMenuItem 16.6KB 16.7KB +117B 5.2KB 5.2KB 0B
core/DateInput 99.9KB 100.0KB +88B 14.8KB 14.8KB 0B
core/DateRangeInput 69.4KB 69.5KB +103B 11.2KB 11.2KB 0B
core/DateTimeInput 110.1KB 110.2KB +77B 15.2KB 15.2KB 0B
core/DialogHeader 48.8KB 48.9KB +101B 9.8KB 9.8KB 0B
core/DrawerHeader 48.9KB 49.0KB +97B 11.2KB 11.2KB 0B
core/DropdownMenu 72.7KB 72.8KB +106B 14.7KB 14.7KB 0B
core/DropdownMenuCheckboxItem 16.1KB 16.2KB +106B 5.6KB 5.6KB 0B
core/DropdownMenuItem 15.4KB 15.5KB +101B 5.2KB 5.2KB 0B
core/DropdownMenuRadioItem 16.2KB 16.3KB +110B 5.6KB 5.6KB 0B
core/DropdownMenuSubMenu 58.1KB 58.2KB +95B 9.5KB 9.5KB 0B
core/FileInput 54.1KB 54.2KB +102B 10.3KB 10.3KB 0B
core/IconButton 43.3KB 43.4KB +113B 9.2KB 9.2KB 0B
core/Item 11.4KB 11.5KB +98B 4.7KB 4.7KB 0B
core/LayerProvider 63.3KB 63.4KB +121B 10.1KB 10.1KB 0B
core/Lightbox 51.2KB 51.3KB +95B 9.8KB 9.8KB 0B
core/Link 43.5KB 43.6KB +112B 7.6KB 7.6KB 0B
core/ListItem 53.5KB 53.6KB +103B 10.5KB 10.5KB 0B
core/Markdown 144.5KB 144.5KB +79B 17.4KB 17.4KB 0B
core/MobileNav 51.0KB 51.1KB +97B 10.1KB 10.1KB 0B
core/MobileNavToggle 46.2KB 46.3KB +104B 9.4KB 9.4KB 0B
core/MoreMenu 72.9KB 73.0KB +103B 14.7KB 14.7KB 0B
core/MultiSelector 76.2KB 76.3KB +110B 14.6KB 14.6KB 0B
core/NumberInput 55.7KB 55.8KB +108B 10.7KB 10.7KB 0B
core/Outline 28.6KB 28.7KB +113B 4.0KB 4.0KB 0B
core/Pagination 87.7KB 87.8KB +105B 15.3KB 15.3KB 0B
core/Popover 49.8KB 49.9KB +84B 12.1KB 12.1KB 0B
core/PowerSearch 155.1KB 155.1KB +87B 18.6KB 18.6KB 0B
core/RadioListItem 52.1KB 52.3KB +111B 9.7KB 9.7KB 0B
core/SegmentedControlItem 8.6KB 8.7KB +116B 3.9KB 3.9KB 0B
core/SelectableCard 12.8KB 12.9KB +114B 7.1KB 7.1KB 0B
core/Selector 79.1KB 79.2KB +81B 15.0KB 15.0KB 0B
core/SelectorOption 14.5KB 14.6KB +97B 5.1KB 5.1KB 0B
core/SideNav 58.0KB 58.1KB +97B 10.6KB 10.6KB 0B
core/SideNavCollapseButton 46.6KB 46.7KB +90B 9.5KB 9.5KB 0B
core/SideNavHeading 54.7KB 54.8KB +96B 10.1KB 10.1KB 0B
core/SideNavItem 54.5KB 54.6KB +97B 10.1KB 10.1KB 0B
core/Step 32.4KB 32.5KB +118B 5.3KB 5.3KB 0B
core/Stepper 47.4KB 47.5KB +106B 9.6KB 9.6KB 0B
core/Switch 48.4KB 48.5KB +111B 9.3KB 9.3KB 0B
core/Tab 9.7KB 9.8KB +119B 4.1KB 4.1KB 0B
core/TabMenu 51.6KB 51.7KB +83B 10.0KB 10.0KB 0B
core/Table 84.0KB 84.0KB +71B 15.1KB 15.1KB 0B
core/TableCell 78.8KB 78.9KB +89B 14.8KB 14.8KB 0B
core/TableHeaderCell 78.6KB 78.7KB +92B 14.8KB 14.8KB 0B
core/TableSelectionToolbar 52.4KB 52.5KB +98B 11.2KB 11.2KB 0B
core/TextInput 53.5KB 53.6KB +100B 10.5KB 10.5KB 0B
core/Thumbnail 50.7KB 50.8KB +103B 11.0KB 11.0KB 0B
core/TimeInput 86.8KB 86.9KB +83B 13.8KB 13.8KB 0B
core/Timestamp 27.5KB 27.5KB 0B 9.5KB 9.5KB 0B
core/Toast 59.8KB 59.9KB +105B 9.7KB 9.7KB 0B
core/ToggleButton 44.1KB 44.2KB +91B 9.3KB 9.3KB 0B
core/Token 29.6KB 29.7KB +111B 4.5KB 4.5KB 0B
core/Tokenizer 64.8KB 64.9KB +114B 11.7KB 11.7KB 0B
core/TopNav 51.9KB 52.0KB +104B 10.4KB 10.4KB 0B
core/TopNavHeading 54.2KB 54.3KB +101B 9.9KB 9.9KB 0B
core/TopNavItem 9.0KB 9.2KB +116B 3.8KB 3.8KB 0B
core/TopNavMegaMenu 54.2KB 54.3KB +121B 10.8KB 10.8KB 0B
core/TopNavMegaMenuItem 9.1KB 9.2KB +119B 4.1KB 4.1KB 0B
core/TopNavMenu 53.6KB 53.7KB +97B 10.1KB 10.1KB 0B
core/TreeList 32.5KB 32.6KB +111B 4.7KB 4.7KB 0B
core/Typeahead 61.5KB 61.6KB +101B 11.3KB 11.3KB 0B

Sizes are gzip. Import counts the JavaScript the import loads eagerly; CSS counts the package stylesheet rules referenced by the modules it can load from its own package, lazily loaded ones included.

Bundle Size Summary

Gzip figures measure each package's entry file, not the code an import pulls in.

Package Entry (ESM) Entry gzip before Entry gzip after Delta
@astryxdesign/core 4.9KB 1.2KB 1.2KB 0B
Package stylesheet Gzip before Gzip after Delta
@astryxdesign/core 34.6KB 34.6KB 0B

Accessibility Audit

Status: No accessibility violations detected.

Visual Regression

55 of 502 shot(s) changed.

A change here is a question, not a failure: check whether the after is the
picture you intended. Record that review on the PR. Baseline maintenance is an
explicit dispatch of CI; this report never rewrites the baseline or adds a release gate.

component story theme mode pixels
Selector Indicator Space Bottom Sheet Narrow End RTL neutral light 753,933
Selector Indicator Space Bottom Sheet Wide Start neutral light 740,072
RichTextEditor Markdown parity: side by side probe dark 558,840
RichTextEditor Markdown parity: side by side probe light 540,756
Chat Full AI Chat probe light 230,823
Chat Full AI Chat probe dark 229,805
AppShell With Mobile Nav probe light 217,010
AppShell With Mobile Nav probe dark 216,960
Collapsible Dividers probe dark 66,445
Collapsible Dividers probe light 66,445
AppShell Playground neutral dark 65,198
AppShell Playground neutral light 63,788
Chat Default neutral dark 36,304
Chat Default neutral light 35,767
Chat Empty State probe light 23,531
Chat Empty State probe dark 22,622
ChatAutoScroll Scroll Behavior Comparison neutral dark 15,378
ChatAutoScroll Scroll Behavior Comparison neutral light 14,107
Chat With Attachments probe light 13,406
Chat With Attachments probe dark 11,232

and 35 more.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This pull request is on hold for an owner decision. The UISlider values rest only on the draft spec:AST-094 that this branch adds, so an engineering owner needs to approve or reject that spec, including its proposed changes to the theme-token, press-feedback and scroll-chaining specs, by commenting /approve-spec <full head SHA> here; the author can record this as an engineering owner. Whatever that decision, these need fixing before approval:

  • Land #8067 and its predecessors first, then rebase, so the diff is the four-file slider commit instead of 13,263 lines.
  • Run the new pr-interaction job inside the owning test lane and add it to the test join, as the CI routing spec (spec:AST-030 FR11 and FR7) requires, or drop it from this stack.
  • Get the required lint check green; ESLint runs out of heap at this head.
  • Fix the animator's Reduce Motion handling, which leaves an interrupted fade at its mid value or at 0 (animator.ts:1346, animator.ts:1577), and correct the slider comments on the projection rate and the touch target (slider.ts:94, slider.ts:45).

[Automated review]

Comment thread .github/workflows/ci.yml Outdated
# them, so a change to an instrument is proven by its negative controls
# before a component spec relies on it. Chromium only on these runners;
# see the harness README for running WebKit.
pr-interaction:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This job routes itself on its own path set (line 3484), and no job lists it in needs, so a failing interaction proof reaches none of the required joins. Current spec:AST-030 FR11 says new coverage inside an existing surface must join that surface's test owner and must not create a separately routed lane, and FR7 says any owned lane failure must fail its join. Run the proofs inside the owning lane and add the outcome to the test join, or get an owner-approved AST-030 amendment.

Comment thread packages/core/src/motion/animator.ts Outdated
): Partial<Record<MotionProperty, Segment | null>> => {
const next: Partial<Record<MotionProperty, Segment | null>> = {};
const opacityNow = valueAt('opacity', time);
const opacityTo = targets.opacity ?? opacityNow;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

When the call has no opacity target, the dip returns to the presentation value, not to the running fade's target. Under Reduce Motion, a move 100 ms into a 0 to 1 fade ends at opacity 0.3577 for good. Use segments.get('opacity')?.target (else the resting value) as the return value.

Comment thread packages/core/src/motion/animator.ts Outdated
changed.push(property);
if (segment == null) {
segments.delete(property);
resting[property] = targets[property] ?? valueAt(property, time);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The segment is deleted on the line above, so for an untargeted opacity valueAt returns the stale resting value. With reducedMotion: 'instant' during a fade-in, opacity drops to 0 and the element vanishes (play() repeats this at line 1665). Leave opacity out of next when the call neither targets nor fades it, or read the value before deleting.

releaseProjectionRate: 0.996,
/**
* How much of the projection the coast travels: the target is the lift
* value plus this share of the projected distance (0.0996 s × the release

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

0.0996 s is this table's 0.996 rate (0.4 × 0.249 s); at the normal rate of 0.998 the share would be 0.1996 s. As written, a consumer could project with projectDistance's default rate and coast twice as far. Suggest "(0.0996 s × the release velocity at releaseProjectionRate)", and drop "as scroll.decelerationRate.normal" at line 86.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

A consumer reading this entry must not coast twice as far. Fixed in 6e0f96c: the comment gives the share as "0.0996 s × the release velocity at releaseProjectionRate", and the rate's entry now says it is not UIScrollView's normal rate (0.998), so it has to be passed to the projection explicitly.


export const slider = {
/**
* The thumb's touch target, a square in pt centered on the thumb: the

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This entry's own source shows vertical touches tracking only from -20 to +16 pt, inside the 40 pt frame, so the measured target is 48 × 40, not a 48 pt square. Worth recording the frame clip so the touch presentation does not accept touches UIKit ignores.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

The touch presentation should not accept touches UIKit ignores. Fixed in 6e0f96c: the entry now records that UIKit hit-tests inside the control's frame first, so the lab's 40 pt frame clipped the 48 pt target to 48 × 40.

@vjeux
vjeux force-pushed the uikit/c03-slider-values branch from 3e47976 to 6e0f96c Compare October 24, 2026 15:00
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 24, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 24, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This pull request is on hold for an owner decision: the UISlider values rest only on the draft spec:AST-094 that this branch adds, so an engineering owner needs to approve or reject that spec, including its proposed changes to the theme-token, press-feedback, input-modality and scroll-chaining specs, by commenting /approve-spec <full head SHA> here; the author can record this as an engineering owner. Whatever that decision, these need fixing before approval:

  • Land #8067 and its predecessors first, then rebase, so the diff is the four-file slider commit instead of 13,265 lines; the rebase also clears the pr-a11y failure, which comes from the branch predating a spec file main now runs.
  • Run the new pr-interaction job inside the owning test lane and add it to the test join, as the CI routing spec (spec:AST-030 FR11 and FR7) requires, or drop it from this stack.
  • Fix the animator's Reduce Motion handling, which leaves an interrupted fade at its mid value or at 0 (animator.ts:1346, animator.ts:1577).
  • Add the writing-rubric results for AST-094 to the description, and correct the dropSpring source and the comments that point at files absent from this branch.

[Automated review]

Comment thread .github/workflows/ci.yml Outdated
# them, so a change to an instrument is proven by its negative controls
# before a component spec relies on it. Chromium only on these runners;
# see the harness README for running WebKit.
pr-interaction:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This job selects itself with its own path set (line 3484), and no job lists it in needs, so a failing interaction proof reaches none of the required joins. Current spec:AST-030 FR11 says new coverage inside an existing surface must join that surface's test owner and must not create a separately routed lane, and FR7 that any owned lane failure must fail its join. Run the proofs inside the owning lane and add their outcome to what ci-test-join.mjs requires, or drop the job until an owner-approved amendment admits it.

Comment thread packages/core/src/motion/animator.ts Outdated
): Partial<Record<MotionProperty, Segment | null>> => {
const next: Partial<Record<MotionProperty, Segment | null>> = {};
const opacityNow = valueAt('opacity', time);
const opacityTo = targets.opacity ?? opacityNow;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

When the call does not target opacity, the dip returns to the presentation value rather than the running fade's target: under Reduce Motion, a move 100 ms into a 0 to 1 fade on springs.smooth ends at opacity 0.3577 for good. Return to segments.get('opacity')?.target (else the resting value).

Comment thread packages/core/src/motion/animator.ts Outdated
changed.push(property);
if (segment == null) {
segments.delete(property);
resting[property] = targets[property] ?? valueAt(property, time);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

In 'instant' mode crossfade() returns a null opacity even when the call never targeted it, and the segment is deleted on the line above, so valueAt here returns the pre-fade resting value: a move during a fade-in drops opacity to 0 and the element vanishes (play() repeats this at line 1665). Leave opacity out of next when the call neither targets nor fades it, or read the value before deleting.

* 800 ms hold fitted with one spring (response 0.49 s, damping ratio
* 0.70, rms 0.10 pt; undershoot to 36.04 pt), Oct 23 2026
*/
dropSpring: {response: 0.5, dampingRatio: 0.7},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This stores response 0.5 s, but the @source above names only the per-frame fit, response 0.49 s, and slider.test.ts:142 calls 0.5 s "the read". Add the read release behavior (0.5 s, 0.7) to the source so the stored value has one.

@vjeux
vjeux force-pushed the uikit/c03-slider-values branch from 6e0f96c to a3052e3 Compare October 24, 2026 17:57
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 24, 2026
@github-actions github-actions Bot removed the needs:design-review Affects visuals — Design should review label Oct 24, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This needs an engineering owner's decision before it can be approved: the UISlider values rest on draft spec AST-094, and this head also registers the slider springs as theme-retunable motion roles, which AST-094's FR4 and DEC-1 reject. An engineering owner records that decision by commenting /approve-spec a3052e3db96cae64bc1f7c7e59c18b06820c6c35 on this pull request (the author may do so as an engineering owner), or by saying the slider values should wait for the stacked pull requests to land. Whatever the decision, these need changes:

  • Leave this pull request carrying only the two slider commits on top of main; with the merged stack it changes about 28,700 authored lines.
  • Under Reduce Motion, a move that interrupts a fade leaves the element at the fade's mid-flight opacity or at its starting opacity (animator.ts:1399, :1631).
  • uikit.slider ships on @astryxdesign/core/motion/experimental, so it needs an @experimental marker and an [experimental] changeset (AST-017 FR21, FR22).
  • The platform adaptation condition, the --motion-* theme variables and the separately routed pr-interaction job contradict current specs AST-012 FR2, theme-tokens INV1 and AST-030 FR7 and FR11.

[Automated review]


import {registerMotionTable} from '../roles';

export const slider = {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

slider reaches callers as uikit.slider through @astryxdesign/core/motion/experimental (uikit/index.ts:34), but unlike springs, scroll, timing and navigation it has no @experimental JSDoc block. spec:AST-017 FR21 requires every declaration on an experimental surface to carry it.

* 800 ms hold fitted with one spring (response 0.49 s, damping ratio
* 0.70, rms 0.10 pt; undershoot to 36.04 pt), Oct 23 2026
*/
dropSpring: {response: 0.5, dampingRatio: 0.7},

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The @source above names a per-frame fit at response 0.49 s (rms 0.10 pt), but the stored value is 0.5 s, which slider.test.ts calls "the read" (rms 0.20 pt). Store 0.49, or cite the read 0.5 s in the source so the value and its source agree.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 97dd708: the drop spring's @source now cites the read settings the table stores (0.5 s, 0.7), with the 0.49 s per-frame fit beside them for comparison.

Comment thread .changeset/uikit-slider-values.md Outdated
'@astryxdesign/core': patch
---

[chore] Internal: UISlider's values measured on iOS 26.2 join the UIKit constants table: the thumb's 48 pt touch target, the tracking rule (the value moves by the finger's travel past the pan threshold over the track's length), the release coast's spring, projection rate and share, the thumb's lift and drop springs and scale, and the end-of-track haptic. Its three springs are motion roles a theme can retune (`slider.releaseSpring`, `slider.liftSpring`, `slider.dropSpring`), listed in the motion docs' role table. Not exported from the package entry point; no component uses it yet.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

At this head the table is public as uikit.slider on @astryxdesign/core/motion/experimental, and its springs are documented theme roles, so "Internal … Not exported" no longer holds. spec:AST-017 FR22 asks for an [experimental] changeset when an experimental surface gains an entry.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 97dd708: the changeset is now [experimental] and names uikit.slider on @astryxdesign/core/motion/experimental, and the table carries an @experimental JSDoc marker that a case checks.

Comment thread packages/core/src/motion/animator.ts Outdated
): Partial<Record<MotionProperty, Segment | null>> => {
const next: Partial<Record<MotionProperty, Segment | null>> = {};
const opacityNow = valueAt('opacity', time);
const opacityTo = targets.opacity ?? opacityNow;

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

When the move does not target opacity, the cross-fade ends at opacityNow, the running fade's value at this instant. Under Reduce Motion a 0 → 1 fade interrupted at 100 ms by an x move settles at 0.358 and stays there. Ending at the running segment's target keeps the fade's outcome.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This code comes from #8076, the stacked base, so its fix belongs there. The animator's Reduced Motion path has since been rewritten there (63e5356, 18ff410), and this branch is restacked onto it (123b938).

Comment thread packages/core/src/motion/animator.ts Outdated
changed.push(property);
if (segment == null) {
segments.delete(property);
resting[property] = targets[property] ?? valueAt(property, time);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The segment is deleted on the line above, so valueAt here returns the value from before the fade: in 'instant' mode the same interrupted fade drops to opacity 0. Read the target (or valueAt) before deleting the segment; play() repeats this at :1717–:1718.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This code comes from #8076, the stacked base, and is fixed there with the Reduced Motion rewrite (63e5356, 18ff410): the call options and the 'instant' mode this read belonged to are gone. This branch is restacked onto it (123b938).

* is everything else. Pair `ios` with `pointer: 'coarse'` for a touch
* profile, such as touch motion tuned per platform.
*/
platform?: 'ios' | 'other';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

spec:AST-012 FR2 closes the condition vocabulary to width, pointer, contrast and motion ("Future environment fields require explicit additions to this closed vocabulary"). platform needs that amendment first, or should leave this pull request.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This code comes from #8076, the stacked base, so its fix belongs there.

Comment thread .github/workflows/ci.yml Outdated
# them, so a change to an instrument is proven by its negative controls
# before a component spec relies on it. Chromium only on these runners;
# see the harness README for running WebKit.
pr-interaction:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

pr-interaction routes itself and is not in the test join's needs (:887–:896): on this head test already passed while this job was still queued. spec:AST-030 FR11 asks new coverage to join the existing owners, and FR7 asks every owned lane's failure to fail its join.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This code comes from #8076, the stacked base, so its fix belongs there.

Comment on lines +83 to +85
useIsomorphicLayoutEffect(() => {
recognizer.setEnabled(isEnabled);
}, [recognizer, isEnabled]);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Turning isEnabled off mid-gesture cancels the recognizer here and calls the caller's onGesture with cancelled from this layout effect. Per architecture:react-component-runtime INV3, name the system it synchronizes (the recognizer and its gesture host) in a comment beside it.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This code comes from #8076, the stacked base, so its fix belongs there.

* and the release coast against the per-frame value after a lift
* @position Testing; parity of the slider constants (law P4, unit layer).
* The browser layer is
* Slider/__tests__/SliderTouch.interaction.browser.spec.ts.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Slider/__tests__/SliderTouch.interaction.browser.spec.ts does not exist at this head; drop or reword the reference until that browser layer lands.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Fixed in 97dd708: the header no longer names a spec that does not exist at this head.

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 24, 2026
@cixzhang

Copy link
Copy Markdown
Contributor

Posted by Cindy's agent on her behalf.

Parts of this PR re-implement behavior that already exists, or is being specified, as a shared part of core. Converging keeps one implementation per behavior:

  • Reduced motion. core/src/motion/uikit/slider.ts:157 offers reducedMotion: 'keep'. Per design:reduced-motion DR4, core has no reduced-motion opt-out: the animator should be the one place that resolves reduced motion (touch cross-fades in 200 ms or less with no travel, a fine pointer changes at once), so the 'keep' option should be removed.

This is about where the behavior lives, not about the PR's intent.

@vjeux

vjeux commented Oct 24, 2026

Copy link
Copy Markdown
Contributor Author

Agreed: one implementation.

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 25, 2026
# Conflicts:
#	packages/cli/test/__golden__/no-icon-set/docs-topics.json
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 25, 2026
vjeux added 6 commits October 26, 2026 23:57
…(spec:AST-094 FR18, DEC-13)

A screen-edge pan attached to a stack container, as wide as the screen,
with a touch 4 px from its edge: inside the 40.2 px band the pan decides at
UIKit's 15 px whatever the element's width, and then tracks the travel past
it. From several edges too. Both fail while a wider element decides at
FR19's 10 px.
…'s width (spec:AST-094 FR18, DEC-13)

FR18: inside the 40.2 px band a screen-edge pan decides at UIKit's 15 px
screen-edge hysteresis; outside it the author's scrolling is untouched and
FR19's 10 px governs every other claim. The pan decided at 10 px on any
element wider than the band, so NavigationStack's edge pan, attached to the
stack container, began 5 px early. The edge zone still decides only the
touch-action; a touch outside every band still fails at once. The two
cases that pinned the 10 px decision go.
… 15 px whatever the element's width) into the experimental touch exports
…er's move keeps that finger until it lifts) into the experimental touch exports
…than the band (spec:AST-094 FR18, DEC-22)

FR18 as amended in meta#8631 (DEC-22): the band's pan-x claim and 15 px start
hold only where the screen-edge pan is attached to an element within the
band; on an element that reaches beyond it, whose touch-action cannot
claim per touch, a touch in the band decides at FR19's 10 px like every
other claim. This restores the 10 px decision 3d85c30 removed and keeps
15 px on an element within the band. The cases pin DEC-22 both ways (a wide
element with a touch at x=4 begins at 10, an in-band strip at 15, and from
several edges at 10 on a wide element); the 10 px cases fail on 3d85c30.
…an the edge band decides at 10 px again, DEC-22) into the experimental touch exports
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 27, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 27, 2026
vjeux added 3 commits October 27, 2026 03:09
…xperimental touch exports

The motion README's Files table is the union: main's rows, with meta#8663's
resolveSnapPoint.ts and selectPage.ts, plus this branch's, in main's
order.

# Conflicts:
#	packages/core/src/motion/README.md
The gesture README promises that usePressTracker rebuilds its tracker
when trackingExpansion, highlightDelay, cancelTravel or quickTapFlash
change, from the next touch. That fix (c248459) was lost in a later
merge of the press-tracking line: the tracker was built once, so a
changed option never applied. It is memoized on those four again; the
node attachment, keyed on the tracker, moves to the new one and disposes
the old. The callbacks keep being read through the ref on every touch.

The new test fails before this change (the same tracker after each
option change) and passes after it.
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 27, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 27, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approval waits on an engineering owner's decision about Slider's touch direction: spec:AST-094 leaves each component's touch presentation to that component's own record, and component:Slider states none yet (its FR5 still counts a track press, where these values make a tap on the track do nothing, and FR42 sets touch targets at 44 px unless that record sets its own), so these UISlider values need an engineering owner to identify or provide the governing spec, or to approve them as they stand. An engineering owner records that decision by commenting /approve-spec 82c49d3ddf88bb5a4af286342c261df9db380146 on this pull request, and the author may do so as an engineering owner. Separately, please land #8076 first or drop its merge so this pull request carries only its four slider files: the merged copy is a commit behind #8076, and its gesture host conflicts with spec:AST-094 FR18 (GestureHost.ts:497-528 writes over an author's touch-action) and FR20 (GestureHost.ts:1619-1653 lets any scroll take a still finger). slider.test.ts:11 cites an undefined “law P4”, and motion/README.md does not yet list uikit/slider.ts as the barrel's SYNC note asks.

[Automated review]

vjeux and others added 10 commits October 27, 2026 05:30
… s of wall clock

The two proofs that a Reduce Motion dip held before its first frame
still lands (after the hold is finished, and after it is resumed) polled
the box for 2 s of wall clock. On a loaded machine the page's main
thread ran the dip's next step late and the poll ran out first: one
WebKit run read {opacity: 0, translate: 'none'} with four WebKit
containers on the box, then passed in 530 ms on a rerun. They now wait
until the box runs no animation, on the animations' own finished
promises (including the fade back in the dip starts when its fade out
ends), and then assert the landed state. The test's own timeout still
bounds them.

With a 2.5 s main-thread block induced right after the release, both
proofs failed before this change (Timeout 2000ms exceeded while waiting
on the predicate) and pass after, 3 runs each in Chromium.
Main merged meta#8045 and meta#8046. The one conflict is utils/pressFeedback.ts:
it takes main's merged meta#8046 text (the finger and button slots, the mouse
and key press) and keeps this pull request's own additions, the one
writer of the press attribute (writePress, paintPress, readPressPaint)
and the header line naming them.
# Conflicts:
#	internal/interaction-harness/README.md
#	internal/interaction-harness/src/busy.test.ts
#	internal/interaction-harness/src/busy.ts
#	internal/interaction-harness/src/frames.ts
#	internal/interaction-harness/src/harness.interaction.browser.spec.ts
Main's button slot, merged with meta#8046, ends a press's release at once
when the next press starts, by clearing the press attribute directly. On
a row another painter holds, that clear erased the hold, which this pull
request's one writer refuses. A mouse press on a held row, released, then
a press elsewhere must leave the row held. Fails until the early end goes
through the one writer.
finish() writes none through writePress, as this pull request's
controller paints, so a held row stays its owner's when the next press
ends a release early, under the finger and the button slots alike.
Both upstream heads are folded onto main 70ea859 (her meta#8045 frame
evidence and meta#8046 coarse press): meta#8446 takes main's harness files, and
meta#8073 carries the press controller onto meta#8046's slots. meta#8076 has no change
of its own in either set of files, so the merge takes theirs with no hand
resolution, and meta#8076 is clean against main again.
…bute

From the review of meta#8076: the README said paintPress in
utils/pressFeedback.ts is the one writer of data-astryx-press, but the
action-group tracker on main (meta#8346) writes its groups' presses itself.
The sentence now says what holds at this head.
…ads it

Slider's touch presentation (meta#8190) reads the table, and a release that
ships both would print the old line in its notes. The changeset now says
only that the table is not exported.
@vjeux
vjeux marked this pull request as draft October 29, 2026 22:33
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 30, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 30, 2026
meta#8320), meta#8189 at ca43cee, meta#8168 at 1cb400e

# Conflicts:
#	packages/cli/test/__golden__/no-icon-set/search-icon-set.json
#	packages/cli/test/__golden__/no-icon-set/search-icon-set.txt

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Approval waits on an engineering owner's decision about Slider's touch direction: spec:AST-094 leaves each component's touch presentation to that component's own record, and component:Slider states none yet, so these UISlider values (a 48 pt thumb target where FR42 keeps 44 px, a track that ignores a tap where Slider's FR5 counts a track press, three springs FR4 admits as roles only through Slider's record, and an end haptic whose iOS Safari gap FR23 asks that record to state) need an engineering owner to identify or provide the governing spec, or to approve them as they stand. An engineering owner records that decision by commenting /approve-spec ca43ceece94bd061b233229c19e11f1a6ed5a7ba on this pull request, and the author may do so as an engineering owner. Separately, please land #8076 first or drop its merge so this pull request carries only its four slider files:

  • The merged #8076 gesture host conflicts with spec:AST-094 FR18 (GestureHost.ts:497-528 writes over an author's touch-action) and FR20 (GestureHost.ts:1619-1653 lets any scroll take a still finger).
  • slider.ts:41-42 says touch motion has no theme surface, which current AST-094 FR4 and DEC-15 and spec:AST-108 contradict.
  • Smaller: slider.test.ts:11 cites an undefined “law P4”, and motion/README.md does not yet list uikit/slider.ts as the barrel's SYNC note asks.

[Automated review]

Comment on lines +41 to +42
* Every value is an internal constant: touch motion has no theme surface,
* and `spec:AST-094` FR4 names no slider role.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

“touch motion has no theme surface” no longer matches current spec:AST-094: FR4 says a theme's tempo scales durations and its character offsets bounce through per-role weights (spec:AST-108 FR3), and DEC-15 makes those three knobs the theme's way into touch motion. Saying instead that these springs stay plain constants until Slider's record admits them as roles (FR4, DEC-5), after which tempo and character reach them, keeps a reader from playing them as literals FR4 forbids.

* simulator, capture b40): the value per `valueChanged` against the
* tracking rule, the thumb's lift and drop against its per-frame width,
* and the release coast against the per-frame value after a lift
* @position Testing; parity of the slider constants (law P4, unit layer).

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

“law P4” is defined nowhere in the repository or in current spec; citing spec:AST-094 FR2 and FR3, the claims this test checks, would point readers at the rule.

} from './gestures';
export {navigation, registerNavigationTable} from './navigation';
export {registerScrollTable, scroll} from './scroll';
export {slider} from './slider';

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This makes slider the first component table in the barrel. The branch's tableImports.test.ts (L156–186) fails any component entry that reaches a non-shared table only through a barrel, and motion/README.md:65 shows component authors importing springs from this barrel, so the first component to follow that example fails the guard. Importing slider by path where Slider uses it and leaving component tables out of the barrel (or changing the README example) avoids that. The SYNC note above also asks for uikit/slider.ts in motion/README.md's file table, which does not list it yet.

element.style.getPropertyValue(property),
);
}
element.style.setProperty(property, value);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This writes the recognizers' derived touch-action over the element's own value. Current spec:AST-094 FR18 requires the derived value to be “intersected with the element's own author touch-action” and never wider than it (DEC-8), so a tap recognizer on a pan-y element would hand horizontal panning and pinch-zoom back to the browser. This code comes from #8076, where the fix belongs.

}
}
if (taken.length > 0) {
this.arena.browserTookOver(taken, time);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Any scroll event hands every unclaimed touch inside the scroller to the browser, however far that finger has moved, and GestureHost.test.ts:823-832 asserts it for a finger that never moved. Current spec:AST-094 FR20 counts a native scroll as taking a touch “only once that finger has moved the scroll take distance”, 10 px, and DEC-8 rejects “cancelling at the first scroll event”. This code comes from #8076, where the fix belongs.

This branch was successfully deployed

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

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants