Repository navigation
Conversation
…nts the menu The box a viewer sees as a pointer DropdownMenu is the popover surface: it paints the background, the corner radius and the elevation, and carries the theme scope. xstyle, className and style land on the role="menu" element inside it, which paints no background, so no per-menu style could reach the visible box. popoverXstyle is handed to usePopover's xstyle, which merges after the surface's own styles. The bottom-sheet presentation drops it; sub-menu flyouts keep their own surfaces. component:DropdownMenu gains the concept row, FR15 and DEC-8 (proposed, pending owner review).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
…part declares CI lint (no-hardcoded-styles) rejects a literal radius in core sources, tests included. A radius token would collide with parts that already declare it (Item rows use radius-element), which defeats the bottom-sheet case's class check, so the override reads a custom property no Astryx part declares.
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression23 of 442 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 3 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
Thanks for the focused proposal — the implementation and its evidence check out, and approval is now waiting on one maintainer decision.
popoverXstyle does what it claims: the style lands on the popover surface that paints the menu (24px measured in a real browser, against the theme's 12px without it), xstyle keeps styling the menu inside, and the bottom sheet and sub-menu flyouts are untouched. The new unit cases and the wider DropdownMenu suites pass, and existing callers see no change when the prop is omitted.
What remains is spec admission, not code changes. The governing DropdownMenu record on main is still a draft and no current spec admits a per-menu popover-surface styling seam; the FR15/DEC-8 text in this PR is explicitly proposed and pending owner review. Approval needs a maintainer to provide or identify the governing spec for this addition — for example by approving that proposed text — including the seam's breadth (any StyleX property merged after the surface's own styles, root pointer menu only), or to direct a different seam. No concrete defects were found in the implementation itself.
[Automated review]
cixzhang
left a comment
There was a problem hiding this comment.
Owner ruling, cixzhang: no popoverXstyle. The menu's visible box is styled by theming the popover, not by a prop on each DropdownMenu.
The box is the popover surface, and its background, radius and shadow belong to the popover theme target. A per-instance prop turns a product's one-off corner match into permanent shared API on every menu, and it opens the whole surface (background, shadow, padding, the tokens declared there) to callsite overrides. It also doesn't serve the case it was written for, since the bottom-sheet presentation ignores it.
What this means for the PR:
- Remove
popoverXstylefromDropdownMenu, its doc, story, tests and changeset. - Remove the proposed concept row, FR15 and DEC-8 from
DropdownMenu.spec.md. - If the
popovertheme target cannot express what a product needs on the menu's surface, open that as its own issue against the theme target, with the case, rather than as a component prop.
|
Follow-up to the ruling above: the styling rule behind it is now proposed as |
|
Thanks for the ruling. Following it: no |
User need
A builder who needs one menu's visible box to look different, say a phone sheet docked over a bar whose corners it must match, cannot style it. The box is the popover surface: it paints the background, radius and shadow, and declares the theme's tokens on itself.
xstyle,classNameandstyleland on the transparentrole="menu"inside it, so a 30px radius there paints nothing, and thepopovertheme target restyles every popover in the app.Problem and solution fit
popoverXstyle?: StyleXStylesonDropdownMenu, handed tousePopover'sxstyle, which merges after the surface's own styles.LayerProvider inset(spec:AST-059) widens it but cannot narrow it below spacing-4; that is a separate question for AST-059's owners. Sub-menu flyouts keep their own surfaces.Current specification
component:DropdownMenuis a draft. This PR adds the concept row, FR15 and DEC-8 as proposed, pending owner review: admittingpopoverXstyleis the one owner decision. Underspec:AST-002FR1 and FR4, a docked sheet and an ordinary menu need different boxes, the caller knows which it rendered, and no existing seam reaches one menu's box. Related: #6683 (merged) gavePopoverandusePopoverapaddingthat DropdownMenu's surface does not use; #6686 (closed) becameLayerProvider inset.Public delta and caller burden
popoverXstyleon bothDropdownMenumodes; omitted, nothing changes.xstyle,classNameandstylestill reach the menu.Design and alternatives
presentation="popover",menuWidth's "minimum popover width"), in the<part>Xstyleform ofComplexSelector.contentXstyle.xstyleto the surface, which breaks callers styling the menu's padding, gap or block size; adropdown-menu-popuptheme target like Selector's, which restyles every menu.Evidence
DropdownMenu.test.tsx: the style lands on the surface and replaces its radius;xstylestays on the menu and the surface keeps its radius; the bottom sheet ignores the prop. Two of three fail onmain.Popover stylestory: the opaque surface computes a 24px radius and the menu inside stays transparent; withmain's component the surface stays at the theme's 12px.Writing rubric results
R1 narration: none; FR15 and DEC-8 are in the present tense.
R2 research: none.
R3 evidence: FR15 cites DEC-8 and test files.
R4 rejected alternatives: two, on one line inside DEC-8.
R5 change references: none.
R6 open questions: none.
Scope
Testing