Skip to content

spec(Selector): record adaptive as the default presentation (DEC-1) - #6809

Merged
cixzhang merged 2 commits into
mainfrom
spec/selector-spec-adaptive
Oct 7, 2026
Merged

cixzhang merged 2 commits into
mainfrom
spec/selector-spec-adaptive

Conversation

@thedjpetersen

@thedjpetersen thedjpetersen commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

Important

Specification only. This records the decision the companion implementation PR depends on (Selector, MultiSelector and DropdownMenu default to adaptive presentation). That PR must not merge before this record is approved by the component owner, who fills in the DEC-1 decider and date.

Exact decision needed

When a caller omits presentation, should Selector resolve adaptive (a modal bottom sheet on compact coarse-pointer screens, the anchored popover everywhere else) instead of today's popover?

component:Selector is current. Its Compatibility section and Public concepts table both state presentation defaults to popover, so no implementation can change the default without this record changing first.

Existing authority searched

  • component:Selector (current): Compatibility and migration, Public concepts (presentation row), FR4, the representative compact-coarse state. All of them assume the popover default.
  • spec:AST-043 (current): unified date/time input presentation. There the zero-config call already picks its surface from the device, and an explicit value always wins. This record aligns Selector with that pattern. It deliberately leaves AST-043 OQ1 (pointer-only vs. width-and-pointer query) alone.
  • spec:AST-017 (current): a stable default change is a [breaking] change (a minor bump while on 0.x).
  • MultiSelector.spec.md and DropdownMenu.spec.md are drafts that don't record a default, so they need no change.
  • Paths: packages/core/src/Selector/Selector.tsx (presentation), packages/core/src/hooks/useAdaptivePresentation.ts (query (max-width: 768px) and (pointer: coarse)).

No current claim settles the default besides the one this record amends.

Decision

An omitted presentation resolves adaptive (FR4). On compact coarse-pointer screens the selection surface is the modal bottom sheet; on every other device it is the anchored popover, identical to today's output. popover and bottom-sheet remain explicit values that pin one surface on every device. Callers who need the pre-DEC-1 behavior pass presentation="popover". The decider and date are left for the component owner to fill in on approval.

Rejected alternatives

  • Keep popover as the default. A phone gets a mouse-sized anchored list unless the caller knows to opt in. In a 390px touch viewport the default list covers the field's own label, helper text and part of the next card.
  • Switch adaptive to the date inputs' pointer-only test. That changes what adaptive means for tablets and belongs to spec:AST-043 OQ1.
  • Ship a codemod that pins popover. It would undo the default for every project that runs astryx upgrade --apply.

Claim scope and non-goals

  • Governs only Selector's default presentation value and its compatibility note.
  • Doesn't change what adaptive, popover, or bottom-sheet render, the adaptive query, sheet anatomy, keyboard behavior, or MultiSelector/DropdownMenu contracts (drafts).

Evidence and implementation relationship

Implementation PR (Selector, MultiSelector, and data-driven DropdownMenu default to adaptive): opened alongside this one, and it must not merge first. Its evidence: at 390px touch the default Selector's anchored list covers its label, helper text and 69px of the next card, and the default DropdownMenu opens 97px wide with every label truncated. After the change both open as full-width bottom sheets. At 1440px the screenshots are byte-identical. In a blind agent-built UI benchmark (three AI coding models, 24 real product screens), Selector appeared in 40% of Astryx builds and DropdownMenu in 52%, and "panels covering content" was 8.8% of judge notes on Astryx pages.

This record stays valid without that implementation.

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.
  • Verification states the evidence layer and failure signal without prescribing CI job/workflow topology.
  • It records one intentional durable decision, not a review transcript or rescue for a separable tagalong.
  • The canonical knowledge owner, affected current claims, and overlapping open work are named; any ownership collision is resolved or called out for human decision.
  • 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: "Knowledge templates and records are aligned."
  • Prettier: clean.
  • git diff --check: clean.

Note

Rebased onto main @ 217f41d with no conflicts. At this head, the focused tests, core typecheck, ESLint and check:repo were re-run and pass, and the global-baseline receipt was regenerated (same matched claims). Screenshots and measurements were captured against main @ eedc844; the regression tests that encode them pass at this head.

Writing rubric results

R1 narration: Compatibility called the change "the default that DEC-1 changes" and "the pre-DEC-1 default"; both rewritten as present-tense statements of the default and its release treatment.
R2 research: DEC-1 carried benchmark-free reasoning only; no survey or measurements are in the record.
R3 evidence: no evidence cell names a pull request; FR4 evidence remains presentation-controller and adaptive-presentation tests.
R4 rejected alternatives: DEC-1 listed three in one paragraph; reduced to one Rejected: line (keeping popover). The pointer-only query is stated as owned by spec:AST-043 OQ1 rather than as an alternative; the codemod line was deleted.
R5 change references: none.
R6 open questions: none answered here; DEC-1 records the decision and its decider, cixzhang, 2026-10-06.

Selector's current contract says `presentation` defaults to `popover`. This
records the decision to make the zero-config default `adaptive`: the modal
bottom sheet on compact coarse-pointer screens, the anchored popover
everywhere else. Explicit `popover` and `bottom-sheet` are unchanged and pin
one surface on every device.

Specification only. The implementation ships separately and must not merge
before this record is approved by the component owner.
@vercel

vercel Bot commented Oct 1, 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 7, 2026 2:22pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 1, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Oct 1, 2026
@astracat-bot

astracat-bot Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
⏳ Waiting for review (for maintainers only) Oct 7, 2026, 3:57 PM UTC

@github-actions

github-actions Bot commented Oct 1, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

View Storybook for this PR · View Sandbox for this PR

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


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.

Approval needs a maintainer to update the existing Selector specification for this intentional default change before the companion implementation can follow it.

The current specification states that presentation defaults to popover; this change would make an omitted prop resolve adaptive instead (bottom sheet on compact coarse-pointer screens, popover otherwise, with explicit values unchanged). To settle it, the component owner needs to approve this exact change, complete the DEC-1 decider and date, and confirm the breaking stable-default release treatment for the implementation. Fine-pointer, large-screen, and explicitly pinned usage keep the same surface either way; callers who need today's popover on every device would pin presentation="popover".

No other actionable defect was found in this specification-only change.

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

Approved at this exact head. The component owner approved the decision and is recorded as DEC-1 decider: an omitted presentation resolves adaptive, so compact coarse-pointer screens get the modal bottom sheet and every other device keeps the anchored popover. The record states the release treatment: the implementation is a stable-default change that ships as [breaking] in a scheduled minor under AST-017, and presentation="popover" keeps the anchored list everywhere. The writing rubric passes with no change references or narration. Spec-owner approval follows on this head.

[Automated review]

@cixzhang

cixzhang commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 603cf2a

@github-actions github-actions Bot added spec-auto-merge Auto-merge was enabled by the spec owner gate and removed needs:spec-owner-review Current knowledge records await owner approval labels Oct 7, 2026
@cixzhang
cixzhang merged commit 384b82e into main Oct 7, 2026
41 checks passed
@github-actions
github-actions Bot deleted the spec/selector-spec-adaptive branch October 8, 2026 06:25

This branch was successfully deployed

1 active deployment
Preview — 603cf2a6 Deployed Oct 7, 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. spec-auto-merge Auto-merge was enabled by the spec owner gate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants