Skip to content

docs(spec): DateInput records its shipped contract as current - #9128

Merged
cixzhang merged 3 commits into
mainfrom
spec-backfill/DateInput
Oct 31, 2026
Merged

cixzhang merged 3 commits into
mainfrom
spec-backfill/DateInput

Conversation

@cixzhang

@cixzhang cixzhang commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Exact decision needed

Promote component:DateInput from draft to current, recording its shipped behavior. No behavior, API, default, or DOM change.

Existing authority searched

Decision

  • DateInput.spec.md becomes current (approved_by: cixzhang, approved_at: 2026-10-31), keeping its existing content, theming-anatomy map, and decisions owned by spec:AST-043; the disabled-reason Tooltip composition moves to Owns; FR10 records the shipped container* and control* targets; and the gaps below are written as "MUST … Implementation gap".
  • Edit outside *.spec.md: docs/families/input-fields.md loses 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 ships container* and control* 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, and themingTargets.test.ts; each verification row names its cases and lists its evidence gaps.

Current-state impact:

  1. Caller key, paste, and pointer handlers run on a disabled field on every surface (only onClick is skipped), against spec:AST-085 FR2; a clear control that unmounts under focus drops focus, against FR4.
  2. The field height is fixed, against spec:AST-102 FR4; typed dates parse only English month names and ASCII digits, against architecture:internationalization INV1a, INV8.
  3. PageUp and PageDown do not page the touch calendar by a month, as AR8 states.

Writing rubric results

  • R1 narration: none; present tense; gap notes say what happens now.
  • R2 research in the record: none.
  • R3 evidence naming a change: none.
  • R4 rejected alternatives over one line or outside a decision: none.
  • R5 pull request or issue references remaining: none.
  • R6 ruled open questions still listing options: none.

Scope

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Any named internal mechanism is intentionally public, names its dependent caller/system, and explains why an equivalent implementation would not satisfy the contract: none named.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; no ownership collision.
  • Adjacent API, visual, accessibility, composition, and implementation facts remain outside scope unless this exact decision depends on them.
  • Public text and artifacts contain no internal Meta context.

Validation

  • pnpm check:knowledge: aligned
  • Prettier: clean
  • git diff --check: clean

@vercel

vercel Bot commented Oct 31, 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 31, 2026 12:17pm UTC

Request Review

@astracat-bot

astracat-bot Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Oct 31, 2026, 12:33 PM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 31, 2026
@cixzhang
cixzhang marked this pull request as ready for review October 31, 2026 11:17
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 31, 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 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 caller onClick is 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 list spec:AST-020/FR15 and spec: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 |

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 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. |

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 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.

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

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:internationalization INV1a 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-020 FR15, 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

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-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.

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

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:internationalization INV8 asks for the provider locale passed to shared parser helpers.
  • AR8's PageUp/PageDown paging, which spec:AST-020 FR15 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` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

"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` |

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

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.

@cixzhang

Copy link
Copy Markdown
Contributor Author

/approve-spec 05767e0

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Oct 31, 2026
@cixzhang
cixzhang merged commit d29a109 into main Oct 31, 2026
51 checks passed
@github-actions
github-actions Bot deleted the spec-backfill/DateInput branch November 1, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — 05767e06 Deployed Oct 31, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant