Repository navigation
spec(Selector): record adaptive as the default presentation (DEC-1) - #6809
Conversation
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.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis ReportView Storybook for this PR · View Sandbox for this PR
Generated by PR Enrichment workflow | View current CI run |
There was a problem hiding this comment.
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]
There was a problem hiding this comment.
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]
|
/approve-spec 603cf2a |
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 resolveadaptive(a modal bottom sheet on compact coarse-pointer screens, the anchored popover everywhere else) instead of today'spopover?component:Selectoriscurrent. Its Compatibility section and Public concepts table both statepresentationdefaults topopover, so no implementation can change the default without this record changing first.Existing authority searched
component:Selector(current): Compatibility and migration, Public concepts (presentationrow), FR4, the representative compact-coarse state. All of them assume thepopoverdefault.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.mdandDropdownMenu.spec.mdare drafts that don't record a default, so they need no change.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
presentationresolvesadaptive(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.popoverandbottom-sheetremain explicit values that pin one surface on every device. Callers who need the pre-DEC-1 behavior passpresentation="popover". The decider and date are left for the component owner to fill in on approval.Rejected alternatives
popoveras 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.adaptiveto the date inputs' pointer-only test. That changes whatadaptivemeans for tablets and belongs tospec:AST-043OQ1.popover. It would undo the default for every project that runsastryx upgrade --apply.Claim scope and non-goals
presentationvalue and its compatibility note.adaptive,popover, orbottom-sheetrender, 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
Validation
pnpm check:knowledge: "Knowledge templates and records are aligned."git diff --check: clean.Note
Rebased onto
main@217f41dwith no conflicts. At this head, the focused tests, core typecheck, ESLint andcheck:repowere re-run and pass, and the global-baseline receipt was regenerated (same matched claims). Screenshots and measurements were captured againstmain@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 (keepingpopover). The pointer-only query is stated as owned byspec:AST-043OQ1 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.