Skip to content

fix(DateInput, DateTimeInput): the sheet's calendar pages like UIDatePicker - #8200

Draft
vjeux wants to merge 2133 commits into
meta:mainfrom
vjeux:uikit/c22-month-pager
Draft

vjeux wants to merge 2133 commits into
meta:mainfrom
vjeux:uikit/c22-month-pager

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #8179, #8146 and #8496. Review only this PR's change: https://github.com/vjeux/astryx/compare/3478da6206..693fafc0c2

User need

Under a finger, the sheets' calendar is a native scroll-snap scroller: on iOS 26.2 a 300 pt flick can reach a second month. One touch model (spec:AST-094 FR13); a mouse keeps the scroller.

Evidence

Recorded on the iOS 26.2 simulator and the Android emulator (Chromium 158) from these heads; Overlays: JS clock, Reduce Motion, finger. No real device was available to the test rig. Before: #8179 + #8146 + #8496 with its story.

Path before this PR
300 pt flick
… on Android
30 % (stays), then 70 % (pages)
Next, twice
… on Android
35°, then 60°
… on Android (the sheet's drag drops two emulator frames, 100 and 82 ms, from its header too)
Past December
RTL: 70 % rightward, Next
Main thread blocked 600 ms
Reduce Motion

Before: native snap; slanted drags scroll the calendar. This PR pages one month; 35° stays, 60° moves the sheet; it rubber-bands, mirrors in RTL, moves while blocked, and dips under Reduce Motion (the base through #8496).

Problem and solution fit

Under a finger, MonthPager (#8146's usePager, #8178's values):

  • Release. One month by UIKit's paging rule (300 pt/s, or past half); ends rubber-band.
  • Title. Changes at half a month, not at the lift.
  • Arrows. setContentOffset's 0.3 s sinusoid; a second tap retargets.
  • Sheet split. UIKit's measured rule: at 10 px of travel either way, 10 px sideways makes it the grid's, else the sheet's.
  • Trackpad: a month per swipe.
  • Reduce Motion: steps and settles dip in 200 ms (design:reduced-motion).
  • Keys: PageUp/PageDown move a month (Shift: a year); only the shown month is tabbable.

Current specification

Settled (cixzhang, Oct 25): spec:AST-094 FR36, FR2, FR17. component:DateInput (draft): AR8's PageUp/PageDown gap closes.

Public delta and caller burden

  • No API change.
  • Size (INV6, analyze-pr.js), import gzip, base → head: DateInput 132.5 → 148.8 KB, DateTimeInput 143.8 → 161.6 KB, PowerSearch 199.0 → 215.6 KB; component CSS +10 to +11 B.

Design and alternatives

Rejected: scroll-snap-stop: always (keeps WebKit's deceleration).

Writing rubric results

R1 narration: AR8's gap sentence removed; PR2 and AR8's exception present tense. R2–R6: none.

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

Stack (merge in this order): … → #8159 → #8178 → #8179 → #8146 → #8496 → this PR (the full order is in #8156).

@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 Error Error Oct 30, 2026 12:44am 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
🟡 Reviewed (for maintainers only) Oct 30, 2026, 1:10 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

Modified Components

DateInput (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 266B 266B 0B
Lines of Code 3532 6425 -
Complexity Very High Very High (600) -
DateTimeInput (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 286B 286B 0B
Lines of Code 3609 3635 -
Complexity Very High Very High (561) -
TimeInput (@astryxdesign/core) · View in Storybook
Metric Before After Delta
Entry File (ESM) 411B 411B 0B
Lines of Code 1245 1728 -
Complexity Very High Very High (204) -

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/BottomSheet 34.0KB 33.9KB -9B 7.9KB 7.9KB -22B
core/BottomSheetSwitcher 14.8KB 14.8KB 0B 3.3KB 3.3KB 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 -13B
core/ContextMenuItem 16.6KB 16.8KB +280B 5.2KB 5.2KB 0B
core/DateInput 99.9KB 145.0KB +45.1KB ⚠️ 14.8KB 14.8KB +11B
core/DateRangeInput 69.4KB 69.6KB +266B 11.2KB 11.2KB 0B
core/DateTimeInput 110.1KB 157.7KB +47.6KB ⚠️ 15.2KB 15.2KB +10B
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 +277B 14.7KB 14.7KB -12B
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.3KB -14B
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 -12B
core/MultiSelector 76.2KB 76.4KB +270B 14.6KB 14.6KB -11B
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 -17B
core/Popover 49.8KB 50.1KB +238B 12.1KB 12.1KB -9B
core/PowerSearch 155.1KB 202.0KB +47.0KB ⚠️ 18.6KB 18.6KB +4B
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 +267B 15.0KB 15.0KB -14B
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 -12B
core/TableCell 78.8KB 79.1KB +267B 14.8KB 14.8KB -13B
core/TableHeaderCell 78.6KB 78.8KB +272B 14.8KB 14.8KB -13B
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 116.5KB +29.6KB ⚠️ 13.8KB 13.8KB +19B
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 +45.1KB ⚠️ +11B
core/DateTimeInput +47.6KB ⚠️ +10B
core/PowerSearch +47.0KB ⚠️ +4B
core/TimeInput +29.6KB ⚠️ +19B

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

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 review waits on an engineering owner: one month per release with the 45° sheet split, the reworded draft PR2 in DateInput.spec.md and the new draft spec:AST-094 have no current spec authority, so an engineering owner needs to approve or reject them by commenting /approve-spec 39408932bf15c4b71cf42bb94ee91e9fe674496f on this pull request, which the author may do as an engineering owner. Whatever that decision, please also make these changes:

  • Land the predecessor pull requests, or rebase onto them, so this one carries only its own commit.
  • Keep the usePager effects at lines 681-683 and 698-702 from calling onIndexChange, and name the system each synchronizes.
  • Correct the changeset's 45° line: drags between about 26.6° and 45° move neither the sheet nor the calendar.

[Automated review]

pager.pan.setEnabled(isPanEnabled);
}, [pager, isPanEnabled]);

useEffect(() => {

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 effect (and the setOptions effect at lines 681-683) can call the owner's onIndexChange through goTo(..., {reason: 'controlled'}), and neither names the system it synchronizes. Current architecture:react-component-runtime INV2 keeps consumer callbacks out of effects and INV3 asks each effect to name its external system: name the pager here and keep a 'controlled' move from calling onIndexChange, or drop the unused controlled index option.

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.

usePager is no longer copied here: at 68b7c0c this PR stacks on #8146 and imports it, so that Effect is #8146's (its head is 49564e7).

- A swipe moves at most one month, chosen at the lift by iOS's paging rule (a quick flick, or past half a month). It settles on iOS's paging curve instead of letting a fling run across several months.
- The month title follows the drag. It changes when the next month is more than half in view.
- The arrows scroll the month in 0.3 s; a second tap mid-scroll goes on to the month after.
- Inside the sheet, a drag steeper than 45° moves the sheet, and a flatter one stays with the calendar.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Drags between about 26.6° and 45° move neither the sheet nor the calendar (MonthScroller.tsx lines 457-464), so "a flatter one stays with the calendar" promises a response that does not happen. Suggest: "a drag steeper than 45° moves the sheet, one flatter than about 27° pages the calendar, and one in between moves neither, as on iOS."

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 changeset now says it: a drag steeper than 45° moves the sheet, one flatter than about 27° pages the calendar, and one in between moves neither, as on iOS.

}
} else if (state === 'ended' || state === 'cancelled') {
// The release has chosen its month by now.
report(pager.virtualIndex);

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 reports the release month synchronously at the end of the pan, so when a flick pages before the drag crossed half a month the owner's render runs inside the lift handler. usePager.ts lines 307-314 defer the pager's own report by two frames for exactly that Mobile Safari case; reporting from the deferred onIndexChange('drag') (lines 366-375) would keep the two consistent.

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 68b7c0c: the title changes at half a month, not at the lift (see the newer thread).

// Typed-field only: the wheels step by their own options and the sheet
// opens on tap, so neither reaches this surface.
increment: _increment,
increment,

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 comment above ("Typed-field only ... neither reaches this surface") no longer holds: increment now steps the sheet's minute wheel.

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 #8179's 662b5c5: the comment now says the sheet's minute wheel steps by increment under a finger, and that with a mouse today's wheels list every minute.

hourFormat = '12h',
// Desktop-only: mobile uses wheels instead of typed arrow stepping or a preset list.
timeIncrement: _timeIncrement,
timeIncrement,

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 comment above ("Desktop-only: mobile uses wheels instead of typed arrow stepping") no longer holds: timeIncrement now steps the sheet's minute wheel.

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 #8179's 662b5c5: the comment now says the sheet's minute wheel steps by timeIncrement under a finger, and that with a mouse today's wheels list every minute.

@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 review waits on an engineering owner: one month per release with the 45° sheet split, the reworded draft PR2 in DateInput.spec.md and the new draft spec:AST-094 have no current spec authority, so an engineering owner needs to approve or reject them by commenting /approve-spec <full head SHA> on this pull request, which the author may do as an engineering owner. Whatever that decision, these changes are still needed:

  • Land the predecessor pull requests or rebase onto them, so this one carries only its own commit.
  • Keep the usePager effects at lines 681-683 and 698-702 from calling onIndexChange, and name the system each synchronizes.
  • Stop naming the release month at the lift in MonthScroller.tsx (lines 418-421), which turns the title earlier than the measured UIKit behavior and the changeset describe.
  • Page on a horizontal trackpad or wheel gesture again (MonthScroller.tsx line 106), and correct the changeset's 45° line, the two stale increment/timeIncrement comments and the citation of a missing AST-090 in spec:AST-094.

[Automated review]

}
} else if (state === 'ended' || state === 'cancelled') {
// The release has chosen its month by now.
report(pager.virtualIndex);

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 names the release month at the lift, so a flick released before half a month turns the title then. The head's own UIKit table says the title changes "when the content crosses half a page, during the drag (and during a settle), not at the lift" (motion/uikit/datePicker.ts lines 64-67), and the changeset says it changes "when the next month is more than half in view". Letting the pager's deferred onIndexChange('drag') (lines 366-375) report the release would also keep the owner's render out of the touch handler, as usePager.ts lines 307-314 intend.

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 68b7c0c: under a finger the calendar is MonthPager. Its title follows the drag and the settle and changes at half a month, not at the lift (interaction spec: the title at half a month).

// nothing to fight over, and a downward drag on the calendar can go back
// to meaning swipe-to-dismiss.
touchAction: 'pan-x',
overflow: 'hidden',

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

With the viewport overflow: 'hidden' and no wheel handling in the pager or the gesture host, a two-finger trackpad swipe or Shift+wheel over the calendar no longer pages; on the base it scrolled the months natively. Mapping a horizontal wheel gesture onto pager.goTo one month at a time would keep that path.

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 68b7c0c: MonthPager pages one month per horizontal trackpad swipe or Shift+wheel gesture (interaction spec).

follows.
- **FR7 — Exits animate as UIKit's do.** A touch presentation MUST play the
exit its UIKit counterpart plays. **Proposed; pending owner review:** this
departs from the draft `spec:AST-090` FR1 (exits off by default) and FR10

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Neither main nor this branch has an AST-090 record, so this amendment (and the one at line 235) points at text a reader cannot open; cite it once the record exists, or drop 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.

At 68b7c0c this branch no longer edits docs/specs/AST-094; that record is #8316's.

@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 review waits on an engineering owner: one month per release with the 45° sheet split, the reworded draft PR2 in DateInput.spec.md and the new draft spec:AST-094 have no current spec authority, so an engineering owner needs to approve or reject them by commenting /approve-spec <full head SHA> on this pull request, which the author may do as an engineering owner. Whatever that decision, these changes are still needed:

  • Land the predecessor pull requests or rebase onto them, so this one carries only its own commit.
  • Keep the usePager effects at lines 681-683 and 698-702 from calling onIndexChange, and name the system each synchronizes.
  • Stop naming the release month at the lift in MonthScroller.tsx (lines 418-421), or document it, so the title, the changeset and the measured UIKit behavior agree.
  • Page on a horizontal trackpad or wheel gesture again (MonthScroller.tsx line 106), and correct the changeset's 45° line, the two stale increment/timeIncrement comments and the citation of a missing AST-090 in spec:AST-094.

[Automated review]

@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:

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
vjeux force-pushed the uikit/c22-month-pager branch from 161f142 to 68b7c0c Compare October 25, 2026 02:22
@vjeux

vjeux commented Oct 25, 2026

Copy link
Copy Markdown
Contributor Author

Converged in 68b7c0c: MonthPager stacks on #8146 (49564e7) and imports its usePager, so the copy is gone. Touch keys on the resolver, as in #8179.

vjeux added 20 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
…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.
…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
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 29, 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.

Changes are needed before this can be approved: the one-month paging direction is settled under spec:AST-094, and what remains is scope, one carried spec contradiction, real-device evidence and a one-line comment.

  • Land the predecessor pull requests (#8179, #8146, #8496 and the stacks under them), or rebase onto them, so this branch carries only its own 14 files; today it is about 46,700 authored lines, about 2,400 of them its own.
  • The carried time-wheel change from #8179 makes TimeInput's increment step the sheet's minute wheel under a finger, which the current TimeInput spec does not allow, so it needs settling in #8179.
  • Add real iPhone (Safari) and Android phone (Chrome) recordings of this head, since spec:AST-094 requires real-device evidence for touch behavior and the overshoot being fixed is an iOS Safari behavior.
  • Name what the pending-row layout Effect in MonthPager.tsx synchronizes, as the React runtime architecture's INV3 asks of every new Effect.

[Automated review]

Comment on lines +503 to +512
// Deliberately un-keyed: it runs after every render, costs a null check, and
// must fire on whichever render finally mounts the pending row's pane.
useLayoutEffect(() => {
const row = pendingRowRef.current;
if (row == null) {
return;
}
pendingRowRef.current = null;
pager.goTo(row, {animated: false});
});

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 Effect calls pager.goTo(row, {animated: false}), and with the default reason usePager reports synchronously, so onIndexChange runs setCenterRow inside the Effect. The comment says when it fires but not what it synchronizes; architecture:react-component-runtime INV3 asks every new Effect to name its external system. Naming the pager's track position, which waits for the pending pane to mount, would cover it.

time={parsedWheelTime}
hourFormat={hourFormat}
hasSeconds={hasSeconds}
minuteInterval={minuteIntervalOf(increment)}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Carried from #8179: under a finger this makes increment step the sheet's minute wheel, while the current TimeInput spec scopes increment to "Arrow-key step." on the typed surface. It needs settling in #8179 (an engineering owner amends component:TimeInput, or the sheet keeps listing every minute) before it reaches this branch.

vjeux added 2 commits October 29, 2026 17:34
…names what it synchronizes

The un-keyed layout effect that lands a far jump synchronizes the pager's position with the DOM: it can move only once the render that mounts the target's pane has committed it, and moves before paint (architecture:react-component-runtime INV3).
vjeux added a commit to vjeux/astryx that referenced this pull request Oct 30, 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.

Changes are needed before this can be approved: the one-month paging direction is settled under spec:AST-094, and the latest push resolves the Effect comment, so what remains is scope, one carried spec contradiction and real-device evidence.

  • Land the predecessor pull requests (#8179, #8146, #8496 and the stacks under them), or rebase onto them, so this branch carries only its own 14 files; today it is about 46,700 authored lines, and its own change is about 2,400 of them.
  • The carried time-wheel change from #8179 makes TimeInput's increment step the sheet's minute wheel under a finger, which the current TimeInput spec does not allow, so it needs settling in #8179.
  • Add real iPhone (Safari) and Android phone (Chrome) recordings of this head, since spec:AST-094 requires real-device evidence for touch behavior and the overshoot being fixed is an iOS Safari behavior.

[Automated review]

@vjeux

vjeux commented Oct 30, 2026

Copy link
Copy Markdown
Contributor Author
  • TimeInput's minute step: asked in fix(TimeInput, DateTimeInput): the sheet's time wheels follow UIDatePicker #8179's thread.
  • Real-device recordings: the test rig has the iOS 26.2 simulator and the Android emulator only, so the evidence comes from them.
  • The pending-row layout effect: 7f6102f names what it synchronizes, the pager's position with the DOM (a far jump moves once the render that mounts the target's pane has committed it, before paint).

This branch had an error being deployed

1 failed deployment
Preview — 693fafc0 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 needs:spec-owner-review Current knowledge records await owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants