Repository navigation
docs(spec): DateInput records its shipped contract as current - #9128
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
This promotion needs a spec decision before it can be approved. It makes component:DateInput current and adds two DateInput-level requirements that go further than the claims they cite: FR6 "Typed text MUST parse in the provider locale" and FR12 "Caller handlers MUST NOT run while the field is disabled". An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, or asks for those sentences to be narrowed; the author may do so as an engineering owner. Two record fixes are needed either way:
- The FR12 gap (
DateInput.spec.md:135, and the matching text at:50,:300, and:309) should say that only a calleronClickis skipped while disabled, since caller key, paste, and pointer handlers still run on every surface, the native field included (NativeDateField.tsx:639–640). - The Governing rules row (
DateInput.spec.md:52) should count four architecture records and listspec:AST-020/FR15andspec:AST-102/FR4.
[Automated review]
| | FR9 | A pointer-surface Calendar selection MUST commit and close its Popover; a bottom-sheet Calendar selection MUST remain editable in the open sheet until Save closes the surface. | Current source and pointer/touch tests | | ||
| | FR10 | Standalone mode MUST compose Field; admitted InputGroup mode MUST remove competing Field chrome while preserving name, description, value, keyboard, focus, and editing semantics. The field has no root styling props; `control*` reaches the control box on every surface, and `container*` reaches the Field box where one renders (in a horizontal-labels FormLayout none renders and `container*` warns; inside an InputGroup it is dropped) (`family:input-fields` FR10). The field height is the shared element size for its size and MUST grow with a set text size (`spec:AST-102` FR4). Implementation gap: the height is fixed. | `family:input-fields` FR3, FR10; `spec:AST-102` FR4; current source and tests | | ||
| | FR11 | Clear MUST emit `undefined` through the ordinary change pipeline. The pointer and bottom-sheet surfaces restore field focus using their shipped timing; the native surface MUST NOT reclaim focus because doing so reopens the OS picker. Implementation gap: when the field becomes disabled or busy while its clear control holds focus, the control unmounts and focus falls to the document body; `spec:AST-085/FR4` requires focus to stay or move to a destination this record names. | Current source and focused clear tests; `spec:AST-085/FR4` | | ||
| | FR12 | No surface renders native `disabled`. A disabled field MUST stay focusable with `aria-disabled`, block typing, picking, clearing, and opening, describe its disabled reason when one is given, and take disabled paint. While busy (`isLoading` or a pending Action) the pointer and bottom-sheet surfaces expose `aria-disabled` and `aria-busy`, stay focusable, and block new commits; the native surface does the same for `isLoading`, and during a pending Action stays editable so the OS picker remains attached but rejects additional commits until the Action settles. A busy field that is not disabled keeps its ordinary paint and Spinner, shows no hover ring while commits are blocked, and keeps its keyboard focus ring. Caller handlers MUST NOT run while the field is disabled (`spec:AST-085` FR2). Implementation gap: a caller `onClick` is skipped while disabled, but a caller `onKeyDown` still runs on the pointer and touch fields. | `spec:AST-085/FR1–FR6`; `family:input-fields/FR4–FR6`; `family:buttons/FR4`; current source and focused tests | |
There was a problem hiding this comment.
The FR12 gap understates shipped behavior: on every surface, the native field included, only a caller onClick is skipped while disabled, and caller onKeyDown, onKeyUp, onPaste, and onPointerDown still run (NativeDateField.tsx:639–640 spreads them with only onClick gated). Please widen the gap here and in the matching text at lines 50, 300, and 309.
| | Builder impact | None. `changeAction` runs after `onChange` with optimistic busy feedback on every surface. | | ||
| | Compatibility/readiness | Records shipped behavior; no API, default, or DOM change. Caller key handlers while disabled, fixed field height, the English-only typed parser, a clear control that drops focus, and month paging in the touch calendar are listed under Current-state impact. | | ||
| | Review checks | Reject a surface-mapping change, lost constraint, callback-order change, unlabeled field, native `disabled`, disabled paint on a busy-only field, unreachable disabled reason, changed close behavior, or a theming target placed on the wrong owner. | | ||
| | Governing rules | `spec:AST-043/FR1–FR5`; `spec:AST-085/FR1–FR6`; `spec:AST-086/FR3, FR4, FR6, FR8`; `family:input-fields/FR1–FR6, FR8–FR11`; `family:overlay-dismissal/FR1–FR7`, including its recorded BottomSheet adoption gap; the three architecture records linked above. | |
There was a problem hiding this comment.
The front matter now links four architecture records (adding internationalization), and spec:AST-020/FR15 and spec:AST-102 back the new gaps, but this row still says "the three architecture records linked above" and lists neither.
…s every governing record
There was a problem hiding this comment.
Thanks for the follow-up: the FR12 gap now names every caller handler that runs while the field is disabled, and the Governing rules row lists every linked record. Promoting component:DateInput to current still needs a spec decision, because three sentences go further than the specs they cite:
- FR6 "Typed text MUST parse in the provider locale" (
architecture:internationalizationINV1a and INV8 ask for catalog-backed strings and the provider locale passed through shared helpers). - FR12 "Caller handlers MUST NOT run while the field is disabled", which would also stop focus and blur handlers on a field that stays focusable.
- AR8's PageUp/PageDown paging, which the Current-state impact attributes to
spec:AST-020FR15, although FR15 lists only arrow keys, Home, and End and asks for other extras to be named exceptions.
An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, or asks for those sentences to be narrowed; the author may do so as an engineering owner. Nothing else blocks.
[Automated review]
| shown, against `architecture:internationalization` INV1a and INV8. | ||
| - **Clear control under focus (FR11).** A clear control that unmounts while | ||
| focused drops focus to the page, against `spec:AST-085` FR4. | ||
| - **Month paging (AR8).** PageUp and PageDown do not page the touch calendar by |
There was a problem hiding this comment.
spec:AST-020 FR15 lists only arrow keys, Home, and End as adopted extras and asks the owning record to name any other extra as an exception, so missing PageUp/PageDown is not a gap against FR15 as written. Either name the Page keys as an FR15 exception in AR8, or drop them; an engineering owner decides which.
…nd attributes the Page-key gap to AR8
There was a problem hiding this comment.
Thanks for the update: FR12 now exempts focus and blur, and the AR8 paging gap no longer cites spec:AST-020 FR15. Promoting component:DateInput to current still needs a spec decision on two readings that go further than the specs they cite:
- FR6 "Typed text MUST parse in the provider locale", which its gap defines as localized month names and digits, while
architecture:internationalizationINV8 asks for the provider locale passed to shared parser helpers. - AR8's PageUp/PageDown paging, which
spec:AST-020FR15 admits only as a named exception beyond arrow keys, Home and End.
An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request, or asks for those sentences to be narrowed; the author may do so as an engineering owner. Non-blocking: FR11 could also name where focus goes when the clear control unmounts, as spec:AST-085 FR4 asks of the component's record.
[Automated review]
| | FR3 | Explicit `presentation` MUST outrank deprecated `nativePicker`; the legacy values MUST retain their mappings and development-only warning from `spec:AST-043/FR3–FR4`. | Current source, docs, and Presentation tests | | ||
| | FR4 | Adaptive resolution MUST use the primary pointer rather than viewport width or any-pointer availability, so tablets receive a touch surface and touchscreen laptops retain the typable field. | Current source, consumer docs, and surface-selection tests | | ||
| | FR5 | Text, Calendar, bottom-sheet, and native commit paths MUST enforce `min`, `max`, and `dateConstraints`; a rejected value MUST NOT replace the controlled value. | Current source and all four focused suites | | ||
| | FR6 | Named committed formats MUST follow the InternationalizationProvider locale and shared Timestamp vocabulary; formatting MUST NOT rewrite in-progress typed text. Typed text MUST parse in the provider locale (`architecture:internationalization` INV1a, INV8). Implementation gap: the typed parser accepts only English month names and ASCII digits, using the locale only to order day and month. | `architecture:internationalization`; current source, docs, locale tests; `spec:AST-043/FR5` | |
There was a problem hiding this comment.
"Typed text MUST parse in the provider locale" goes further than architecture:internationalization INV8, which asks for the provider locale passed to a shared parser (DateInput already passes it, DateInput.tsx:747); INV1a covers Astryx-owned strings. Accepting localized month names and digits is a DateInput-level reading that an engineering owner approves with /approve-spec, or this sentence narrows.
| | FR8 | The pointer field MUST open its Calendar from the input, calendar toggle, ArrowDown, or Alt+ArrowDown; Popover dismissal and focus return MUST remain owned by the shared Popover path. | Current source, Popover composition, keyboard/focus tests | | ||
| | FR9 | A pointer-surface Calendar selection MUST commit and close its Popover; a bottom-sheet Calendar selection MUST remain editable in the open sheet until Save closes the surface. | Current source and pointer/touch tests | | ||
| | FR10 | Standalone mode MUST compose Field; admitted InputGroup mode MUST remove competing Field chrome while preserving name, description, value, keyboard, focus, and editing semantics. The field has no root styling props; `control*` reaches the control box on every surface, and `container*` reaches the Field box where one renders (in a horizontal-labels FormLayout none renders and `container*` warns; inside an InputGroup it is dropped) (`family:input-fields` FR10). The field height is the shared element size for its size and MUST grow with a set text size (`spec:AST-102` FR4). Implementation gap: the height is fixed. | `family:input-fields` FR3, FR10; `spec:AST-102` FR4; current source and tests | | ||
| | FR11 | Clear MUST emit `undefined` through the ordinary change pipeline. The pointer and bottom-sheet surfaces restore field focus using their shipped timing; the native surface MUST NOT reclaim focus because doing so reopens the OS picker. Implementation gap: when the field becomes disabled or busy while its clear control holds focus, the control unmounts and focus falls to the document body; `spec:AST-085/FR4` requires focus to stay or move to a destination this record names. | Current source and focused clear tests; `spec:AST-085/FR4` | |
There was a problem hiding this comment.
Non-blocking: spec:AST-085 FR4 says "When a component removes a focused control, that component's record names the destination." This row records the gap but names no destination, so it could name one (for example the field's input) and keep the implementation gap that focus falls to the body today.
|
/approve-spec 05767e0 |
Exact decision needed
Promote
component:DateInputfromdrafttocurrent, recording its shipped behavior. No behavior, API, default, or DOM change.Existing authority searched
pnpm specs:for packages/core/src/DateInput/DateInput.tsx→ current records that govern DateInput:family:input-fields,family:overlay-dismissal,spec:AST-020FR15,spec:AST-043,spec:AST-085,spec:AST-086,spec:AST-102,architecture:component-theming-surface,architecture:interaction-modality,architecture:internationalization,architecture:public-component-api, and the composed Field, FieldStatus, Calendar, Popover, BottomSheet, and Tooltip records.DateInput.spec.mdexisted as adraft.DateInput.spec.mdfor the wheel's trackpad and mouse-wheel pan). fix(DateInput): block changes from disabled open pickers #8813, fix(DateInput, DateRangeInput, DateTimeInput): mount the calendar only while the popover is open #8902, and fix(InputGroup): an error status on the group marks its members invalid #9030 touch DateInput source only.Decision
DateInput.spec.mdbecomes current (approved_by: cixzhang,approved_at: 2026-10-31), keeping its existing content, theming-anatomy map, and decisions owned byspec:AST-043; the disabled-reason Tooltip composition moves to Owns; FR10 records the shippedcontainer*andcontrol*targets; and the gaps below are written as "MUST … Implementation gap".*.spec.md:docs/families/input-fields.mdloses DateInput's row from the FR10 "Prop targets: current components do not yet meet FR10" gap table, a current-state line about this lane's component that is now stale (DateInput shipscontainer*andcontrol*with no root styling,DateInput.fr10.test.tsx). No rule, invariant, matrix, or decision is edited; Prettier re-flowed the table's column widths.Rejected alternatives
None.
Claim scope and non-goals
Shipped behavior only, traced from the DateInput sources, docs, and tests. No code is fixed.
Evidence and implementation relationship
DateInput.test.tsx,DateInput.fr10.test.tsx,DateInputTouch.test.tsx,NativeDateField.test.tsx,Presentation.test.tsx,MonthScrollerSettle.test.tsx,BusyOwnerAnnouncement.test.tsx, andthemingTargets.test.ts; each verification row names its cases and lists its evidence gaps.Current-state impact:
onClickis skipped), againstspec:AST-085FR2; a clear control that unmounts under focus drops focus, against FR4.spec:AST-102FR4; typed dates parse only English month names and ASCII digits, againstarchitecture:internationalizationINV1a, INV8.Writing rubric results
Scope
Validation
pnpm check:knowledge: alignedgit diff --check: clean