Skip to content

docs(spec): AST-043 unify date/time input presentation, deprecate nativePicker - #6614

Merged
imdreamrunner merged 4 commits into
mainfrom
spec/presentation-native-picker
Sep 25, 2026
Merged

imdreamrunner merged 4 commits into
mainfrom
spec/presentation-native-picker

Conversation

@imdreamrunner

@imdreamrunner imdreamrunner commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Exact decision needed

Unify DateInput, DateTimeInput, and TimeInput on presentation instead of nativePicker, with values that distinguish Astryx's desktop surface, Astryx's bottom sheet, the native (browser/OS) surface, and a plain text field — while deprecating nativePicker without breaking it.

Existing authority searched

  • Code + docs on main@d07687a1d5: nativePicker in the three inputs ('touch'|'always'|'never', default touch); presentation in ContextMenu, DropdownMenu, MoreMenu, Selector, MultiSelector ('popover'|'bottom-sheet'|'adaptive'); shared resolver hooks/useAdaptivePresentation.ts.
  • Records: architecture:public-component-api, family:input-fields, spec:AST-017 (compatibility — FR4 preserved-alias, FR8 migration), spec:AST-013 (platform floor), docs/specs/AST-001..042 — no record owns the cross-component picker-surface vocabulary; new spec:AST-043 created for that distinct fact boundary.

Decision

docs/specs/AST-043-input-presentation/spec.md (current/accepted, approved cixzhang 2026-09-24):

  • FR1: presentation?: 'text-input'|'popover'|'bottom-sheet'|'native'|'adaptive-bottom-sheet'|'adaptive-native', default adaptive-native, with per-component/pointer surface tables (six values).
  • FR2 fallback split: explicit native always shows native, no eligibility fallbacks; adaptive-native (incl. default) and deprecated nativePicker="always" (without explicit presentation) keep the released fallbacks (seconds, non-default step/increment, preset options, no usable native control → Astryx surface) — deprecated behavior unchanged.
  • FR3: nativePicker deprecated, keeps working exactly as released — touch→adaptive-native, always→native, never→adaptive-bottom-sheet (DateInput/DateTimeInput) and never→text-input (TimeInput, its released typed field); FR4: presentation wins when both are set. Nonbreaking under AST-017 FR4; migration tooling per AST-017 FR8.
  • DEC-3: forced popover-on-coarse / bottom-sheet-on-fine and a new TimeInput bottom sheet (time half of DateTimeInput's sheet) approved — implementation may rely on FR1.

Rejected alternatives

  • Literal rename keeping 'touch'|'always'|'never'; single astryx value collapsing desktop/sheet/text-field; shared adaptive for both adaptive policies; uniform never→adaptive-bottom-sheet (breaks TimeInput); removing nativePicker in the implementing change.

Claim scope and non-goals

Spec only — no implementation, no component .spec.md/.doc.mjs changes, no menu/selector rename (OQ1), no other eligibility/fallback change beyond FR2.

Evidence and implementation relationship

Current-state tables are derived from the code cited above; implementation follows in a separate PR relying on this record.

Scope

  • This PR contains specification records only.
  • It records observable behavior and preserves equivalent internal implementations.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • Public text and artifacts contain no internal Meta context.

Validation

  • Prettier: pass · git diff --check: pass · pnpm check:knowledge: no AST-043 findings locally (CI adjudicates)

AST-043 (draft): presentation = popover | bottom-sheet | native |
adaptive-bottom-sheet | adaptive-native (default) for DateInput,
DateTimeInput, and TimeInput. nativePicker stays working as a
deprecated alias (touch->adaptive-native, always->native,
never->adaptive-bottom-sheet); presentation wins when both are set.
@vercel

vercel Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Sep 25, 2026 5:35pm UTC

Request Review

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

astracat-bot Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Sep 25, 2026, 5:34 PM UTC

Drop native-picker implementation detail (surface mechanisms, pointer
test internals, eligibility fallbacks, codemod/changeset plumbing) and
stale FR cross-ref; spec now covers only prop, values, default, and the
deprecated-but-working nativePicker mapping/precedence.
@imdreamrunner
imdreamrunner marked this pull request as ready for review September 24, 2026 22:12
@github-actions github-actions Bot added the spec-auto-merge Auto-merge was enabled by the spec owner gate label Sep 24, 2026
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Current run: The current change has no visual or preview-producing scope. Visual checks are not applicable; preview links are not shown.

The exact-head preview is not available yet.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for drafting this as a standalone spec — the problem is clear: menus/selectors and the date/time inputs answer the same surface question with two different vocabularies, and nativePicker hides the desktop-versus-sheet distinction.

Approval needs a maintainer decision first. This proposal creates a new public-API vocabulary (presentation with five values on DateInput, DateTimeInput, and TimeInput) that no current governing record owns, and the draft itself cannot authorise it. A maintainer needs to approve and promote the governing spec for this addition — or identify a different governing record — and settle:

  • How nativePicker="never" on TimeInput resolves for unmigrated callsites (today: the typed field on every pointer, with no sheet) versus what a migration to adaptive-bottom-sheet would change on coarse pointers.
  • That the released native-eligibility fallbacks (seconds, non-default step/increment, preset time options, and no usable native control) are preserved normatively, with those states in the verification table.
  • Design confirmation for the forced popover/bottom-sheet surfaces and a TimeInput bottom sheet that do not exist today (the proposal's OQ1).

A few concrete fixes are also needed before promotion, regardless of that decision: FR3's mapping table currently reads as changing unmigrated TimeInput behaviour despite promising resolution "exactly as released"; FR1 names the TimeInput fine-pointer typed field popover without a per-component surface table; and the PR description still cites FR6/FR9/DEC-3 and a codemod that the trimmed spec no longer contains, so the migration position and numbering need to be made consistent.

No runtime behaviour changes in this PR, and the default-preservation and deprecate-don't-remove approach is the right compatibility shape once the points above are settled.

[Automated review]

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested — the direction is settled, but this revision of the spec does not yet record the maintainer decisions it depends on.

A maintainer has promoted this presentation vocabulary as the governing record once it is revised for three recorded decisions, and implementation can rely on it once those fixes are in. None of the three is in the current text:

  • Add text-input and fix the TimeInput mapping. FR1 lists five values and FR3 maps nativePicker="never" to adaptive-bottom-sheet for every input. For TimeInput — whose released never behaviour is the typed field on every pointer, with no sheet — never must map to the new text-input value (typed field, no picker opening) for unmigrated and migrated callsites alike, with text-input's resolution defined per component and pointer. A sheet for TimeInput belongs only behind explicit presentation="bottom-sheet".
  • Write the fallback split normatively. presentation="native" must always show native, with no eligibility fallbacks; presentation="adaptive-native" (including the default) keeps the released fallbacks — seconds, non-default step/increment, preset time options, and no usable native control — and falls back to the Astryx surface in those states. The current FR1 states neither half, the verification table omits those states, and the non-goal saying eligibility/fallback behaviour is "unchanged" contradicts the native half.
  • Record OQ1 as approved and complete the promotion. Forced popover on coarse and bottom-sheet on fine and a new TimeInput bottom sheet (extracting the time half of the DateTimeInput sheet) are approved, yet OQ1 still reads as an open question that blocks FR1's forced values, and the record still shows as an unapproved draft. Close OQ1 on those terms and, with the revisions above in, record the promotion so implementation reliance is clear.

One consistency update alongside: the PR description cites FR6/FR9/DEC-3 and a codemod that the trimmed record (FR1–FR5, DEC-1–DEC-2) no longer contains, and restates the old five-value/uniform-mapping position — it should match the revised record.

No runtime behaviour changes in this PR, and the deprecate-don't-remove shape and preserved default remain the right compatibility approach once the points above are incorporated.

[Automated review]

… split, promotion)

- Add text-input value; TimeInput nativePicker=never maps to it
  (released typed field on every pointer), sheet only via explicit
  bottom-sheet/adaptive-bottom-sheet; per-component surface table.
- FR2 fallback split: native always native (no fallbacks);
  adaptive-native/default keeps released fallbacks, with verification.
- DEC-3 closes forced-surface/TimeInput-sheet question as approved;
  promote record to current/accepted (cixzhang, 2026-09-24).
@github-actions github-actions Bot added needs:spec-owner-review Current knowledge records await owner approval and removed spec-auto-merge Auto-merge was enabled by the spec owner gate labels Sep 25, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved — this revision now records the maintainer decisions the promotion depended on, so the spec can govern the follow-on implementation.

The promotion was conditional: "As maintainer, I promote AST-043 (once revised for the recorded decisions on OQ1, the text-input presentation value, and the native/adaptive-native fallback split) as the governing record for the presentation vocabulary on DateInput, DateTimeInput, and TimeInput — implementation can rely on it once those fixes are in." All three are now in the text:

  • FR1 adds text-input (typed field, no picker) with a per-component surface table, and FR3 maps nativePicker="never" on TimeInput to text-input with no behaviour change for unmigrated callsites; a TimeInput sheet comes only from explicit bottom-sheet/adaptive-bottom-sheet.
  • FR2 writes the fallback split normatively: native always shows native with no eligibility fallbacks, while adaptive-native (including the default) keeps the released fallbacks — seconds, non-default step/increment, preset time options, and no usable native control — and the verification table now covers those states.
  • DEC-3 records forced popover on coarse / bottom-sheet on fine and the new TimeInput bottom sheet as approved, and the record is promoted to current/accepted, so implementation reliance is clear.

Two small wording tidies for the implementing change, neither blocking: the Platform line saying no value renders no picker should be reconciled with text-input's no-picker definition, and the coarse-pointer TimeInput popover resolution should be made explicit in FR1's table.

No runtime behaviour changes in this PR, and the deprecate-don't-remove shape with the preserved default remains the right compatibility approach.

[Automated review]

FR2/FR3: explicit presentation=native never falls back, but
nativePicker=always without explicit presentation retains its released
eligibility fallbacks (seconds/step/presets/no usable native), so the
deprecated behavior is unchanged; only migrating to native changes it.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved — this revision completes the fallback picture, so the spec can govern the follow-on implementation.

The one substantive change since the last review separates two cases the record previously equated:

  • Explicit presentation="native" always shows native, with no eligibility fallbacks.
  • Deprecated nativePicker="always" (without an explicit presentation) keeps its released fallbacks — seconds, non-default step/increment, preset time options, and no usable native control keep the Astryx surface on the time-bearing inputs — so unmigrated callsites behave exactly as released. Migrating a callsite to presentation="native" is the deliberate step that changes those states, and the verification table now covers the deprecated always case as well.

Everything approved previously is unchanged: text-input with the TimeInput never mapping and no behaviour change for unmigrated callsites, forced popover on coarse / bottom-sheet on fine and the new TimeInput bottom sheet, and the record promoted to current/accepted so implementation can rely on it.

Two small wording tidies for the implementing change, neither blocking: the Platform line saying no value renders no picker should be reconciled with text-input's no-picker definition, and the coarse-pointer TimeInput popover resolution should be made explicit in FR1's table.

No runtime behaviour changes in this PR, and the deprecate-don't-remove shape with the preserved default remains the right compatibility approach.

[Automated review]

@imdreamrunner

Copy link
Copy Markdown
Contributor Author

/approve-spec 002f360

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Sep 25, 2026
@imdreamrunner
imdreamrunner merged commit 0899f21 into main Sep 25, 2026
41 checks passed
@github-actions
github-actions Bot deleted the spec/presentation-native-picker branch September 26, 2026 06:21

This branch was successfully deployed

1 active deployment
Preview — 002f3608 Deployed Sep 25, 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