Skip to content

feat(Wheel): an owner's rest rule and turns from script for the picker wheel - #8527

Draft
vjeux wants to merge 1839 commits into
meta:mainfrom
vjeux:uikit/c21-wheel-rest-and-spin
Draft

vjeux wants to merge 1839 commits into
meta:mainfrom
vjeux:uikit/c21-wheel-rest-and-spin

Conversation

@vjeux

@vjeux vjeux commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #8366. Review only this PR's change: vjeux/astryx@f3ce064...56a113f

User need

The time and date-time sheets' touch columns need two things the date wheels don't: a rest rule of their own (an AM/PM column follows the hour it belongs to) and turns from code (the hour wheel turning when AM/PM changes). Without them, those columns can't be built on the touch wheel. This adds both, for the pull requests that build those columns on this one.

Problem and solution fit

What led to it: Astryx's UIKit-parity work (spec:AST-094). Both came with #8159, which uses neither, and review asked for them to arrive where an owner uses them, so they are split out here.

  • resolveRest(index): the row a wheel moves on to after resting on another, then commits. By default, the nearest enabled row (fix(Wheel): a wheel that stops outside the bounds rests on the nearest value inside them #8131's rule).
  • A ref with spinTo(index): turns the wheel onto a row and commits it as a rest would; it reports false if a finger or another turn interrupts it. With a mouse, the scrolling column commits the row at once.
  • A rest on the committed row commits nothing, before any rule is asked (component:DateInput FR13). Under Reduce Motion, a turn from code cross-fades, as a tap does.

Current specification

spec:AST-094 FR3, FR8, FR13; component:DateInput FR13; design:reduced-motion DR2.

Public delta and caller burden

No API change: Wheel is internal, and nothing in this stack passes either yet.

Design and alternatives

  • Bounds props for the rest. Simple, but can't say "follow the hour".
  • Chosen: a rule function, defaulting to the nearest enabled row, so an owner names any row.
  • A controlled offset for turns. Flexible, but the owner would drive the wheel's motion frame by frame.
  • Chosen: a handle, because a turn is a motion with an end: spinTo says whether it arrived, and the owner never writes the offset.

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

  1. Run pnpm exec vitest run packages/core/src/DateInput/PickerWheel.test.tsx packages/core/src/DateInput/Wheel.test.tsx. The new cases pass: a spin lands and commits, a finger interrupting it reports false, a wheel rests where its owner's rule says, a spin survives the owner re-rendering mid-turn, Reduce Motion fades every turn, and with a mouse a spin commits at once.
  2. No story uses them yet; the time columns that do come in later pull requests.
  3. Not this change: CI's root-entry bundle check fails on main's test, which test(core): a touch component's import carries its gesture code, and nothing else does #8671 fixes.

Merge order: #8366, then this PR, then #8480.

@vercel

vercel Bot commented Oct 26, 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 29, 2026 10:25pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 26, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Oct 29, 2026, 11:17 PM UTC

@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 a spec decision: the draft component:DateInput FR13 and DEC-1 and component:DateTimeInput FR8, which the new resolveRest default relies on, are not on main, so an engineering owner needs to approve or reject them as written at this head by commenting /approve-spec <full head SHA> here (the author can do this as an engineering owner). Whatever that decision, three changes are needed before approval:

  • Land #8366 and its predecessors first, then rebase so this pull request's diff against main is its one 296-line commit; today it carries 34,575 changed lines and conflicts with main.
  • Make spinTo report the same outcome under a finger and a mouse: under a finger it resolves true for a disabled row, for a row resolveRest moves off, and for an index past the list, where a mouse gets false or a different commit.
  • Settle a pending spinTo when the wheel unmounts mid-turn, for example by calling the running motion's onEnd from WheelMotion.dispose().

[Automated review]

if (outcome === 'arrived') {
arrive(end);
}
resolve(outcome === 'arrived');

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 resolves true as soon as the first turn arrives, even when arrive(end) then turns on to another row: spinTo(3) onto a disabled hour resolves true and commits 9, and with an even-hour resolveRest, spinTo(13) commits 14. An index past options is turned to off the strip's end (spinTo(30) on 24 rows leaves the band empty). TodayWheel refuses a disabled or missing row with false and ignores the rule, so the same call has a different outcome per pointer. One rule for both presentations (refuse, or resolve with whether the committed row is index) and cases for these three calls would close it.

Comment on lines +507 to +515
dispose(): void {
const motion = this.motion;
if (motion != null) {
const offset = this.offset();
this.finish(motion);
this.restingOffset = offset;
this.render(offset, true);
}
}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

dispose() finishes the running motion without calling its onEnd, so a spinTo in flight when the wheel unmounts never settles (still pending 5 s after an unmount at 100 ms), although the handle promises false when a turn is interrupted. Calling motion.onEnd?.('stopped', offset) here, as stop() does, would settle it.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 26, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026
# Conflicts:
#	packages/core/src/DateInput/wheelMotion.test.ts
#	packages/core/src/DateInput/wheelMotion.ts

@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 a spec decision: the draft component:DateInput FR13 and DEC-1 and component:DateTimeInput FR8, which the resolveRest default relies on, are not on main, so an engineering owner needs to approve or reject them as written at this head by commenting /approve-spec <full head SHA> here (the author can do this as an engineering owner). Whatever that decision, three changes are needed before approval:

  • Land #8366 and its predecessors first, then rebase so this pull request's diff against main is its one 296-line commit; today it carries 34,325 authored lines and conflicts with main.
  • Make spinTo report the same outcome under a finger and a mouse: under a finger it resolves true for a disabled row, for a row resolveRest moves off, and for an index outside options, where a mouse gets false or a different committed row.
  • Settle a pending spinTo when the wheel unmounts mid-turn, for example by calling the running motion's onEnd from WheelMotion.dispose().

[Automated review]

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026
The look's drum takes meta#8156's projection-aware hit test (rowExtent, and
rowAtPoint answering the row drawn under a point through the perspective),
keeping the look's own semantics: a position along the wheel, a copy at
every position of a looping wheel. Its drum tests add meta#8156's.

# Conflicts:
#	packages/core/src/DateInput/wheelDrum.ts

@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 a spec decision: the draft component:DateInput FR13 and DEC-1 and component:DateTimeInput FR8, which the resolveRest default relies on, are not on main, so approval waits on an engineering owner approving or rejecting them as written at this head by commenting /approve-spec <full head SHA> here (the author may do this as an engineering owner). Whatever that decision, three changes are needed before approval:

  • Land #8366 and its predecessors first (or retarget onto its branch) so this pull request's diff against main is its one 296-line commit; today it carries 34,434 authored lines.
  • Make spinTo report the same outcome under a finger and a mouse: under a finger it resolves true for a disabled row, for a row resolveRest moves off, and for an index outside options, where a mouse gets false or commits a different row.
  • Settle a pending spinTo when the wheel unmounts mid-turn, for example by calling the running motion's onEnd from WheelMotion.dispose().

[Automated review]

if (outcome === 'arrived') {
arrive(end);
}
resolve(outcome === 'arrived');

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 resolves true as soon as the first turn arrives, even when arrive(end) has just started a turn on to another row: on hours 09-17 with 12 committed, spinTo(3) resolves true and then commits 9, while under a fine pointer TodayWheel answers false for the same call. Resolving after the final commit (or refusing rows the wheel cannot rest on) would give both pointers one answer.

}

/** Release every resource; the rows stay where they are shown. */
dispose(): void {

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

dispose() cancels the running motion without calling its onEnd, so a spinTo still turning when the sheet closes never settles. Calling motion.onEnd?.('stopped', offset) here, as stop() does, would resolve it false.

@github-actions

github-actions Bot commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR

🧪 Sandbox Preview

View Sandbox for this PR

Modified Components

DateInput (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 266B 266B 0B
Lines of Code 3532 5687 -
Complexity Very High Very High (507) -

Component Size

Component Import before Import after Delta CSS before CSS after Delta
core/AlertDialog 56.9KB 57.2KB +294B 12.4KB 12.4KB 0B
core/AppShell 57.9KB 58.1KB +242B 11.6KB 11.6KB 0B
core/AvatarGroupOverflow 39.9KB 40.2KB +303B 6.4KB 6.4KB 0B
core/Banner 47.8KB 48.1KB +289B 9.9KB 9.9KB 0B
core/BaseTypeahead 54.3KB 54.6KB +251B 9.9KB 9.9KB 0B
core/BreadcrumbItem 66.4KB 66.6KB +297B 11.0KB 11.0KB 0B
core/Button 43.3KB 43.5KB +273B 9.2KB 9.2KB 0B
core/Calendar 54.9KB 55.2KB +290B 10.0KB 10.0KB 0B
core/Carousel 50.2KB 50.5KB +316B 10.2KB 10.2KB 0B
core/ChatComposer 60.6KB 60.9KB +270B 10.8KB 10.8KB 0B
core/ChatComposerInput 55.7KB 56.0KB +264B 10.1KB 10.1KB 0B
core/ChatComposerTokenElement 55.7KB 56.0KB +264B 10.1KB 10.1KB 0B
core/ChatDictationButton 46.5KB 46.8KB +264B 9.5KB 9.5KB 0B
core/ChatLayout 48.8KB 49.1KB +273B 9.9KB 9.9KB 0B
core/ChatLayoutScrollButton 46.4KB 46.6KB +255B 9.6KB 9.6KB 0B
core/ChatSendButton 45.8KB 46.1KB +265B 9.2KB 9.2KB 0B
core/CheckboxInput 49.9KB 50.2KB +273B 9.3KB 9.3KB 0B
core/CheckboxListItem 54.0KB 54.3KB +244B 10.5KB 10.5KB 0B
core/ClickableCard 12.8KB 13.1KB +289B 6.9KB 6.9KB 0B
core/CodeBlock 60.5KB 60.8KB +278B 10.7KB 10.7KB 0B
core/Collapsible 11.7KB 12.0KB +291B 4.2KB 4.2KB 0B
core/CommandPalette 50.9KB 51.2KB +281B 11.8KB 11.8KB 0B
core/CommandPaletteItem 8.4KB 8.7KB +280B 3.5KB 3.5KB 0B
core/ComplexSelector 55.8KB 56.1KB +318B 10.6KB 10.6KB 0B
core/ContextMenu 77.7KB 78.0KB +275B 14.6KB 14.6KB 0B
core/ContextMenuItem 16.6KB 16.8KB +280B 5.2KB 5.2KB 0B
core/DateInput 99.9KB 128.9KB +29.0KB ⚠️ 14.8KB 14.8KB +14B
core/DateRangeInput 69.4KB 69.6KB +266B 11.2KB 11.2KB 0B
core/DateTimeInput 110.1KB 138.5KB +28.4KB ⚠️ 15.2KB 15.2KB +15B
core/DialogHeader 48.8KB 49.1KB +280B 9.8KB 9.8KB 0B
core/DrawerHeader 48.9KB 49.2KB +249B 11.2KB 11.2KB 0B
core/DropdownMenu 72.7KB 73.0KB +278B 14.7KB 14.7KB 0B
core/DropdownMenuCheckboxItem 16.1KB 16.4KB +284B 5.6KB 5.6KB 0B
core/DropdownMenuItem 15.4KB 15.7KB +287B 5.2KB 5.2KB 0B
core/DropdownMenuRadioItem 16.2KB 16.5KB +275B 5.6KB 5.6KB 0B
core/DropdownMenuSubMenu 58.1KB 58.3KB +270B 9.5KB 9.5KB 0B
core/FileInput 54.1KB 54.4KB +262B 10.3KB 10.3KB 0B
core/IconButton 43.3KB 43.6KB +273B 9.2KB 9.2KB 0B
core/Item 11.4KB 11.6KB +273B 4.7KB 4.7KB 0B
core/LayerProvider 63.3KB 63.6KB +288B 10.1KB 10.1KB 0B
core/Lightbox 51.2KB 51.4KB +249B 9.8KB 9.8KB 0B
core/Link 43.5KB 43.8KB +288B 7.6KB 7.6KB 0B
core/ListItem 53.5KB 53.7KB +268B 10.5KB 10.5KB 0B
core/Markdown 144.5KB 144.7KB +247B 17.4KB 17.4KB 0B
core/MobileNav 51.0KB 51.3KB +264B 10.1KB 10.1KB 0B
core/MobileNavToggle 46.2KB 46.5KB +259B 9.4KB 9.4KB 0B
core/MoreMenu 72.9KB 73.2KB +278B 14.7KB 14.7KB 0B
core/MultiSelector 76.2KB 76.4KB +270B 14.6KB 14.6KB 0B
core/NumberInput 55.7KB 56.0KB +278B 10.7KB 10.7KB 0B
core/Outline 28.6KB 28.9KB +290B 4.0KB 4.0KB 0B
core/Pagination 87.7KB 88.0KB +263B 15.3KB 15.3KB 0B
core/Popover 49.8KB 50.1KB +238B 12.1KB 12.1KB 0B
core/PowerSearch 155.1KB 183.8KB +28.8KB ⚠️ 18.6KB 18.6KB +14B
core/RadioListItem 52.1KB 52.4KB +286B 9.7KB 9.7KB 0B
core/SegmentedControlItem 8.6KB 8.9KB +285B 3.9KB 3.9KB 0B
core/SelectableCard 12.8KB 13.1KB +294B 7.1KB 7.1KB 0B
core/Selector 79.1KB 79.4KB +268B 15.0KB 15.0KB 0B
core/SelectorOption 14.5KB 14.8KB +251B 5.1KB 5.1KB 0B
core/SideNav 58.0KB 58.3KB +272B 10.6KB 10.6KB 0B
core/SideNavCollapseButton 46.6KB 46.9KB +242B 9.5KB 9.5KB 0B
core/SideNavHeading 54.7KB 55.0KB +248B 10.1KB 10.1KB 0B
core/SideNavItem 54.5KB 54.8KB +266B 10.1KB 10.1KB 0B
core/Step 32.4KB 32.7KB +279B 5.3KB 5.3KB 0B
core/Stepper 47.4KB 47.7KB +265B 9.6KB 9.6KB 0B
core/Switch 48.4KB 48.7KB +285B 9.3KB 9.3KB 0B
core/Tab 9.7KB 10.0KB +294B 4.1KB 4.1KB 0B
core/TabMenu 51.6KB 51.9KB +276B 10.0KB 10.0KB 0B
core/Table 84.0KB 84.2KB +253B 15.1KB 15.1KB 0B
core/TableCell 78.8KB 79.1KB +267B 14.8KB 14.8KB 0B
core/TableHeaderCell 78.6KB 78.8KB +272B 14.8KB 14.8KB 0B
core/TableSelectionToolbar 52.4KB 52.6KB +278B 11.2KB 11.2KB 0B
core/TextInput 53.5KB 53.8KB +281B 10.5KB 10.5KB 0B
core/Thumbnail 50.7KB 50.9KB +274B 11.0KB 11.0KB 0B
core/TimeInput 86.8KB 114.7KB +27.9KB ⚠️ 13.8KB 13.8KB +30B
core/Timestamp 27.5KB 27.5KB -1B 9.5KB 9.5KB 0B
core/Toast 59.8KB 60.1KB +258B 9.7KB 9.7KB 0B
core/ToggleButton 44.1KB 44.4KB +243B 9.3KB 9.3KB 0B
core/Token 29.6KB 29.9KB +289B 4.5KB 4.5KB 0B
core/Tokenizer 64.8KB 65.1KB +306B 11.7KB 11.7KB 0B
core/TopNav 51.9KB 52.1KB +277B 10.4KB 10.4KB 0B
core/TopNavHeading 54.2KB 54.4KB +231B 9.9KB 9.9KB 0B
core/TopNavItem 9.0KB 9.3KB +283B 3.8KB 3.8KB 0B
core/TopNavMegaMenu 54.2KB 54.4KB +268B 10.8KB 10.8KB 0B
core/TopNavMegaMenuItem 9.1KB 9.4KB +281B 4.1KB 4.1KB 0B
core/TopNavMenu 53.6KB 53.8KB +258B 10.1KB 10.1KB 0B
core/TreeList 32.5KB 32.8KB +274B 4.7KB 4.7KB 0B
core/Typeahead 61.5KB 61.7KB +268B 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.

⚠️ Touch-only size budget

These components grew past the touch-only budget (2 KB gzip JavaScript or 1 KB gzip CSS per component). If the growth runs only on a coarse pointer, load its JavaScript lazily so the import does not carry it, or justify the cost in the pull request description; CSS stays in the package stylesheet, so justify it.

Component JavaScript CSS
core/DateInput +29.0KB ⚠️ +14B
core/DateTimeInput +28.4KB ⚠️ +15B
core/PowerSearch +28.8KB ⚠️ +14B
core/TimeInput +27.9KB ⚠️ +30B

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 +21B

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

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 26, 2026
The look's drum takes meta#8156's projection-aware hit test (rowExtent, and
rowAtPoint answering the row drawn under a point through the perspective),
keeping the look's own semantics: a position along the wheel, a copy at
every position of a looping wheel. Its drum tests add meta#8156's.

# Conflicts:
#	packages/core/src/DateInput/__snapshots__/PickerWheel.test.tsx.snap
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 26, 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 a spec decision: the draft component:DateInput FR13 and DEC-1 and component:DateTimeInput FR8, which the resolveRest default relies on, are not on main, so approval waits on an engineering owner approving or rejecting them as written at this head by commenting /approve-spec <full head SHA> here (the author may do this as an engineering owner). Whatever that decision, four changes are needed before approval:

  • Land #8366 and its predecessors first, reconciled with main (where Lab now reaches core's touch modules through @astryxdesign/core/internal/touch), so this pull request's diff is its one 296-line commit instead of 36,108 authored lines.
  • Make spinTo report the same outcome under a finger and a mouse: under a finger it resolves true for a disabled row, for a row resolveRest moves off, and for an index outside options, where a mouse gets false or commits a different row.
  • Settle a pending spinTo when the wheel unmounts mid-turn, for example by calling the running motion's onEnd from WheelMotion.dispose().
  • Take the turn's duration and curve as motion roles (or drop the overrides), since spec:AST-094 FR4 forbids playing literal motion and the tap spin's 300 ms constant is not a role.

[Automated review]

Comment on lines +238 to +239
spin.duration ?? picker.tapSpin.durationMs / 1000,
spin.curve ?? resolveMotion(column, timing.curves.move),

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-094 FR4 says every duration and curve a touch presentation plays is a motion role and a component "MUST NOT play a literal". Here an owner's duration and curve are played as passed, and the fallback duration picker.tapSpin.durationMs is, per motion/uikit/picker.ts, "an internal constant, not a motion role". Taking a role resolved through resolveMotion (as the curve already is), or dropping the overrides until an owner needs one, would conform.

# Conflicts:
#	packages/core/src/gestures/GestureHost.ts
vjeux added 14 commits October 29, 2026 13:15
The four Effects without a note now say what they synchronize: the latest
props for callbacks attached once, the band's mark with the row the motion
reports, the motion's end with the wheel's, and the latest touch-down
handler.
…nd its seam

- A rest on a disabled row measures the distance to the nearest enabled row
  around the loop, with a tie going toward the committed row, and turns the
  shorter signed way. It no longer walks the list as a straight line, which
  sent a rest beside the seam the long way round (a 4-row loop with :00 and
  :15 disabled, rested on :00 from :45, turned on to :30).
- A key's search for the next enabled row stops half a turn from where it
  started, so it never turns the long way round onto the far side of a
  disabled stretch (up from January, with only January and February
  enabled, stays on January).
- A short loop repaints the band's row when the options change, so a value
  whose enabled state changes under a resting wheel takes its new colour.
…les when the wheel goes away

- spinTo turns only onto a row a rest would keep: a disabled row, an index
  outside the rows, or a row the owner's resolveRest moves off resolves
  false at once and nothing turns, on the touch wheel as on the scrolling
  column. Before, the touch wheel resolved true on the first arrival and
  then turned on to another row (spinTo(3) onto a disabled hour committed 9).
- A turn still running when the wheel unmounts ends as stopped, so a
  pending spinTo resolves false instead of never settling.
- spinTo takes no duration or curve of its own: every spin plays the tap
  spin, so no caller passes literal motion.
The touch column's options lie under its drawn rows, so the proof taps the
PM row's place on the screen, where the column's tap recognizer takes it,
rather than asking for a tap on the option element.
…o their own changesets

In the same release meta#8179's time columns loop, so "no shipped column loops
yet" would contradict it; the columns that loop say so themselves.
…heirs) into uikit/c21-wheel-rest-and-spin

@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 a spec decision: the draft component:DateInput FR13 and DEC-1 and component:DateTimeInput FR8, which the resolveRest default relies on, are not on main, so approval waits on an engineering owner approving or rejecting them as written at this head by commenting /approve-spec <full head SHA> here (the author may do this as an engineering owner). Whatever that decision, three changes are needed before approval:

  • Land #8366 and its predecessors first, so this pull request's diff is its own 390-line change instead of 36,249 authored lines.
  • Make spinTo resolve with whether the row it was asked for is the committed one: a re-render mid-turn that disables the target, or makes resolveRest move off it, still resolves true while another row commits.
  • Take the turn's duration from a registered motion role, since spec:AST-094 FR4 forbids playing a literal and picker.tapSpin.durationMs is not a role.

[Automated review]

if (outcome === 'arrived') {
arrive(end);
}
resolve(outcome === 'arrived');

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 resolves true right after arrive(end), which re-reads the latest options and resolveRest. If the owner re-renders mid-turn so index is now disabled, or its rule moves off it, the same row nodes come back, the turn goes on, arrive starts a second turn and another row commits, yet the promise has already said true (WheelHandle promises “true once that row is the committed one”). Resolving with whether arrive committed index without a further turn, with a test that disables the target mid-turn, would close it.

return spinCurve(
from,
to,
picker.tapSpin.durationMs / 1000,

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

spinTo now plays this turn too, and picker.tapSpin.durationMs is, per motion/uikit/picker.ts, an internal constant that no table registers, so a theme's tempo never reaches it; spec:AST-094 FR4 asks every duration a touch presentation plays to be a motion role. Registering the tap spin's duration through the generated role table and resolving it here, as the curve already is, would conform.

isDisabled?: boolean;
}

/** Options for a programmatic turn. */

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Nit: this doc comment is left over from the removed spin options and documents nothing now; the next comment is WheelHandle's.

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 29, 2026
…nd, the clamped turn) into uikit/c21-wheel-look

The look draws the band's row through its copy, so the lower pull
requests' painted-mark cases become rest cases here, and the clamped turn
and the loop's rest play through the look's own play().
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 29, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 29, 2026
@vjeux

vjeux commented Oct 29, 2026

Copy link
Copy Markdown
Contributor Author

The three code changes are in 1d7ee3e:

  • spinTo gives the same answer under a finger and a fine pointer: a disabled row, an index outside options, or a row resolveRest moves off resolves false, and nothing turns or commits. spinTo(3) onto a disabled hour, the case that resolved true and committed 9, is a test in PickerWheel.test.tsx with the other refusals.
  • A spin still turning when the wheel unmounts ends as stopped (WheelMotion.dispose() calls its onEnd), so its promise resolves false.
  • spinTo takes no duration or curve: every spin plays the tap spin, so no caller passes literal motion. The tap spin's own duration is the open item on feat(Wheel): UIPickerView's motion under a finger, in today's look #8159.

The compare still carries #8366 and the pull requests below it until they land; this pull request's own change is the rest hook and spinTo. Approval of the draft FR13, DEC-1 and DateTimeInput FR8 stays with an engineering owner.

vjeux added a commit to vjeux/astryx that referenced this pull request Oct 29, 2026
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 29, 2026
…s own spin

meta#8527's `spinTo` no longer takes a duration or a curve, so a column the time wheels move by themselves turns on the wheel's own spin: an animated `setContentOffset`, 0.3 s on Core Animation's ease-in-ease-out (`picker.tapSpin`, the role `timing.curves.move`), resolved under the column when the turn starts (spec:AST-094 FR4). TimeWheels no longer plays the literal `datePicker.wheels.columnTurn`, and the browser proof samples the AM/PM column's turn against that spin.
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 29, 2026
…ay round its seam

Under min 13:00 and max 23:00 the hours 0 to 12 are disabled; one ArrowDown from 23 crosses the seam onto 0, and the nearest enabled hour around the loop is 23 itself, so nothing moves or commits. It rested on 13 before meta#8527's seam-aware rest (f4386c5).
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 30, 2026
…he wheel's own spin

meta#8527's `spinTo` no longer takes a duration or a curve: the month wheel turns onto the nearest reachable month on the wheel's own spin (`picker.tapSpin` on the role `timing.curves.move`, UIKit's animated `setContentOffset`), resolved when the turn starts (spec:AST-094 FR4), not on the literal `datePicker.wheels.columnTurn`.
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 30, 2026
…he nearest enabled month around the seam

With min 2025-11-01, max 2026-02-28 and January 25, 2026 chosen, one ArrowUp from January crosses the seam onto December 2026, past max; around the loop the nearest enabled month is January itself, so nothing moves or commits. It went to February 25 before meta#8527's seam-aware rest and key step (f4386c5).

This branch was successfully deployed

1 active deployment
Preview — 1d7ee3e2 Deployed Oct 29, 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