Repository navigation
[Component Audit] DropdownMenuSubMenu: docs match the shipped props and RTL flyout placement is measured - #8227
Merged
cixzhang merged 6 commits intoOct 24, 2026
Conversation
…and exact-head audit browser evidence
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
AI review status for this pull request.
|
Contributor
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewNo new or modified components detected. Bundle Size Summary
Accessibility AuditStatus: No accessibility violations detected. Visual Regression46 of 502 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 26 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
… read direction from the trigger when the menu closes
…and accept a closed menu's single box
…Id, and cover the open callback
…-audit/DropdownMenuSubMenu/2026-10-24
vjeux
added a commit
to vjeux/astryx
that referenced
this pull request
Oct 24, 2026
…et's levels Main added component:DropdownMenuSubMenu (meta#8227), whose Regions concept says that without a surface host the regions are not rendered. The bottom sheet renders no surface host, and with this pull request each of its levels shows its own row's header and footer in place of the menu's (proposed component:DropdownMenu FR23). The concept's invalid-value cell now says sheet levels still show them, a Sheet state names what a level shows, and the family list gives the bottom sheet and its levels to component:DropdownMenu. Record only.
vjeux
added a commit
to vjeux/astryx
that referenced
this pull request
Oct 24, 2026
…et's levels Main added component:DropdownMenuSubMenu (meta#8227), whose Regions concept says that without a surface host the regions are not rendered. The bottom sheet renders no surface host, and with this pull request each of its levels shows its own row's header and footer in place of the menu's (proposed component:DropdownMenu FR23). The concept's invalid-value cell now says sheet levels still show them, a Sheet state names what a level shows, and the family list gives the bottom sheet and its levels to component:DropdownMenu. Record only.
vjeux
added a commit
to vjeux/astryx
that referenced
this pull request
Oct 24, 2026
…surface host Main's component:DropdownMenuSubMenu (meta#8227) gives a sub-menu's regions to a DropdownMenu root and the surface host to component:DropdownMenu alone. With this pull request a ContextMenu renders the same host beside its menu (proposed component:ContextMenu FR12), so the Regions concept is available inside a DropdownMenu or ContextMenu root, the ownership boundary gives a ContextMenu's host to component:ContextMenu, and the family list names it. Record only.
github-actions
Bot
deleted the
night-watch-component-audit/DropdownMenuSubMenu/2026-10-24
branch
October 25, 2026 06:20
vjeux
added a commit
to vjeux/astryx
that referenced
this pull request
Oct 26, 2026
…surface host Main's component:DropdownMenuSubMenu (meta#8227) gives a sub-menu's regions to a DropdownMenu root and the surface host to component:DropdownMenu alone. With this pull request a ContextMenu renders the same host beside its menu (proposed component:ContextMenu FR12), so the Regions concept is available inside a DropdownMenu or ContextMenu root, the ownership boundary gives a ContextMenu's host to component:ContextMenu, and the family list names it. Record only.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
User impact
Builders using
DropdownMenuSubMenuget documentation that matches the shipped API:labelandchildrenare marked required,menuDataTestId(the test id for the sub-menu's own menu) is documented, and thepresentationdefault is declared where editors show it. People using the menu in a right-to-left layout gain measured browser evidence that the flyout opens on the correct side. No runtime behavior or pixels change.Change type
Documentation and evidence only. The component's runtime code is unchanged: the source edits are JSDoc and file-header comments. A
[docs]changeset covers the consumer-visible documentation.What changed
DropdownMenuSubMenu.doc.mjs:labelandchildrenmarked required;menuDataTestIddocumented (English and dense docs). Three prop-doc drift entries are removed.DropdownMenuSubMenu.tsxcomments: thepresentationJSDoc declares@default 'adaptive'; the file header no longer names a predecessor outside this repository, and thehasSpinnerJSDoc no longer narrates history.onOpenChangereports each flyout open and close once;menuDataTestIdnames the flyout menu. Both are mutation-sensitive (dropping the close report or the flyout test id makes them fail).RowStatesstory, a curated RTL flyout-side (D4) target, and a title-gated browser-evidence step.DropdownMenuSubMenu.spec.md.Testing
DropdownMenuSubMenu,DropdownMenu,ContextMenu,Menu.a11y,Breadcrumbs, CLI prop-doc and doc-type checks,docPropReferences,themingTargets— 9 files, 815 tests pass on the frozen head.pnpm lint:strict, core typecheck, core docs typecheck, Storybook typecheck (no errors in touched files),sync-exports --check,check:knowledge,check:changesets.2e1ae30(run): every check green, including scoped axe (0 violations), the RTL audit, and stable visual regression.Component audit
core/DropdownMenuSubMenu· Mode: nightly · Rubric: 1.16.6 · Date: 2026-10-24a8ef89f26ef9f0254e103018802c85ffbf227ded. Unchanged-source before arm7a0d9f20c3b1bed10ceabb0a8de44d46e5907d8a: fixture, harness, and RTL target only; the component, docs, and tests are byte-identical to base. Frozen head2e1ae3031b3f224fc8f8beb910e4a7caa5e7cb9f. It merges currentmain(no DropdownMenu changes) so the pull-request workflow and checkout agree.limited. Non-vacuous items: §7 14 of 22 (C1, C3, C4, C5, C6, C11, C12, C13, C14, C16, C19, C20, C21, C22); §9 11 of 21 (I2, I3, I6, I8, I9, I10, I13, I14, I15, I17, I18); §10 4 of 11 (R1, R4, R5, R11).What moved: §3 (presentation default declared), §6 (open-callback and test-id coverage), §8 (doc drift and public-text fixes), §9 (coverage gap → measured D1 and D4), §10 (narrow and long-text fixture).
Visual evidence. 33 frames per arm, each with a fail-closed sensor receipt: build SHA, story, theme, mode, direction, viewport, pointer, forced colors, reduced motion, fonts, overflow, settled geometry (re-read after two animation frames), expanded state, focus target, flyout side and viewport bounds, caret mirror, spinner and disabled semantics, row geometry, rendered contrast pairs, callback counters, and page errors.
Arm and head match on every sensor except Build, and all 33 PNG SHA-256 values are identical.
State and contrast matrix (head; identical on the arm)
aria-expanded=falsearia-disabled, no tab stop, default cursor, no openingClosed public-surface evidence inventory (spec:AST-029/FR5)
DropdownMenuSubMenu/Props/Presentation(+ ContextMenu, Breadcrumbs aliases)label(required),icon,descriptionchildren(required)isDisabledaria-disabled, no tabindexhasSpinnermenuWidthonOpenChangepresentationflyout/drill-in/adaptiveheader/footerdata-testid/menuDataTestIdref, root inputs, composed handlersrtlStyles.mirror:focusand open overlay tintObservational draft contract
packages/core/src/DropdownMenu/DropdownMenuSubMenu.spec.mdis a newdraftrecord of current behavior. It settles no product decision.onOpenChangerequirement (FR6) states the full contract and records the drill-in root-close gap as objective, owned by DropdownMenu.Needs Review
onOpenChange(false); the flyout path reports it. Shown in jsdom: the flyout reports[true, false]while the drilled view reports[true]. The fix belongs to DropdownMenu's drill-in stack (draft OQ1).dropdown-menu-itemtarget does not reflect the open or disabled state the row paints (theming-surface INV6); a theme-contract decision for DropdownMenu.aria-expanded/aria-controlsandclosest('[popover]')instead of React ownership; a structural refactor, not a narrow fix.Writing rubric results
R1 narration: the new record describes current behavior in the present tense; none found.
R2 research: none in the record.
R3 evidence: basis and verification cells name source, tests, browser evidence, WCAG criteria, and current records; no pull request or commit is cited.
R4 rejected alternatives: none.
R5 change references: none.
R6 open questions: OQ1 is unanswered and lists no settled options.
Pending scorecards (before / after) and eligibility report
Before (unchanged-source arm):
{ "component": "DropdownMenuSubMenu", "package": "core", "status": "audited", "score": 78.2, "grade": "C", "sections": { "a11y": { "score": 3, "weight": 16, "state": "scored", "note": "Non-vacuous 15 of 21. One component-owned BLOCK caps the section: A15/A14 focus tint 1.11-1.15:1, nothing under forced colors. Menu-item role, aria-haspopup menu/dialog, aria-expanded, aria-controls, labelled flyout, level-scoped Escape and arrows, focus return, decorative caret and spinner with a once-only loading announcement, disabled default cursor and no disabled hover all hold; scoped axe 0. A4 disabled traversal is advisory (shared navigation)." }, "theming": { "score": 4.5, "weight": 14, "state": "scored", "note": "Non-vacuous 14 of 34. Semantic tokens; the dropdown-menu target paints the flyout or the regions frame, dropdown-menu-item the row with size, dropdown-menu-indicator-icon the caret; theming guards pass. 300px block cap and 160px minimum width are sanctioned layout constraints. Advisory INV6: the shared row target does not reflect open or disabled." }, "api": { "score": 4, "weight": 14, "state": "scored", "note": "Non-vacuous 24 of 42. BaseProps, rest on the row, composed onClick/onKeyDown/onPointerMove/onMouseEnter/onMouseLeave with documented precedence, React 19 ref, displayName, boolean names, onOpenChange. FIX P31: the presentation prop's JSDoc lost its @default tag. Advisory: the drill-in close is not reported to onOpenChange when the root closes (shared stack)." }, "behavior": { "score": 4, "weight": 12, "state": "scored", "note": "Non-vacuous 12 of 15. Closed, hover-open, keyboard-open, pressed, nested, drill-in with Back row, header/footer dialog, loading, disabled, long label, sizes, nested selection closing the whole stack, RTL flip, and viewport-capped narrow flyout all render correctly. FIX B4: no pressed feedback on the row (shared row visual). Cross-reference: drill-in onOpenChange advisory." }, "design_objective": { "score": 5, "weight": 6, "state": "scored", "note": "Non-vacuous 7 of 11. Role tokens for spacing, radius (container on the flyout, derived on the row), color, low shadow, fast standard motion with reduced-motion handled by the layer animations. NIT: dead opacity transition on a surface whose opacity never changes; NIT: row radius fallback is a spacing token." }, "design_rendered": { "score": 3.5, "weight": 4, "state": "scored", "note": "33 Chromium frames with settled-geometry sensor receipts. Labels 15-21:1, descriptions 6.0-9.3:1. Focus reuses the hover overlay (cross-reference A15); the open row keeps the same tint as focus; pressed equals hover. At 320px the flyout shifts over the parent row to stay in the viewport (layer runtime)." }, "testing": { "score": 4, "weight": 8, "state": "scored", "note": "Non-vacuous 11 of 16. 71 focused tests covering keyboard, hover intent, safe triangle, typeahead, nesting, press model, drill-in, header/footer, light dismiss, ref, host attributes and handlers. FIX V3: the onOpenChange contract and menuDataTestId are untested." }, "code_health": { "score": 4, "weight": 8, "state": "scored", "note": "Non-vacuous 14 of 22. Composes useLayer, useListFocus, useMenuHover, useTypeahead, useMenuPress, useMenuOverflow, useBusyAnnouncement; two guarded single-fire focus Effects after drill-in commit; stable callback ref; timers bounded. FIX C14: closing nested regioned flyouts walks aria-expanded/aria-controls and closest('[popover]') instead of React ownership (react-component-runtime DOM boundary); a structural refactor, not changed here." }, "docs": { "score": 3.5, "weight": 8, "state": "scored", "note": "Non-vacuous 14 of 21. FIX X5b: label and children not marked required, menuDataTestId undocumented (known drift); FIX: the file header names a predecessor outside this repository and the hasSpinner JSDoc narrates history, contrary to the repository's public-text rule; FIX: the presentation default is not declared in JSDoc (cross-reference P31). usage/anatomy/bestPractices absent: rubric gap with no current owner, not scored." }, "i18n_rtl": { "score": 4, "weight": 5, "state": "scored", "note": "Non-vacuous 11 of 21. Back and loading strings through the translator with ICU interpolation; logical properties; caret and Back chevron mirror once; arrow keys flip from a lazy direction read. FIX I17: the RTL audit reported core/DropdownMenuSubMenu as a coverage gap." }, "responsive": { "score": 4, "weight": 5, "state": "scored", "note": "Non-vacuous 4 of 11. Viewport-capped flyout, adaptive drill-in on coarse pointers sampled at open, scrollable overflow. FIX R11: no component-owned narrow or long-text fixture." } }, "blocks": { "count": 1, "open": [ { "id": "A15/A14", "summary": "Keyboard focus on the sub-menu row is a 5% overlay tint only (1.11-1.15:1 against the menu surface in Neutral and Butter) and paints nothing under forced colors: WCAG 2.2 SC 2.4.7/1.4.11. Component-owned paint; the remediation is a shared row-visual decision with DropdownMenuItem (OQ2).", "issue": null } ] }, "distinct_defects": 1, "fixes": 8, "nits": 2, "lastAudited": "2026-10-24", "rubricVersion": "1.16.6", "mode": "N", "commit": "7a0d9f20c3b1bed10ceabb0a8de44d46e5907d8a", "evidence": [ { "label": "Unchanged-source before arm run", "note": "https://github.com/facebook/astryx/actions/runs/40095624898" } ], "notes": "Advisories (shared owners, not scored against this component): A4 disabled rows are skipped by shared DropdownMenu navigation (component:DropdownMenu OQ1); the drill-in stack resets on root close without the row reporting onOpenChange(false) (react-component-runtime INV2; owner DropdownMenu; draft spec OQ1); the shared dropdown-menu-item target does not reflect the open or disabled state the row paints (theming-surface INV6)." }After (pending; the landed commit replaces
commitafter merge):{ "component": "DropdownMenuSubMenu", "package": "core", "status": "audited", "score": 86.2, "grade": "C", "sections": { "a11y": { "score": 3, "weight": 16, "state": "scored", "note": "Non-vacuous 15 of 21. One component-owned BLOCK caps the section: A15/A14 focus tint 1.11-1.15:1, nothing under forced colors. Menu-item role, aria-haspopup menu/dialog, aria-expanded, aria-controls, labelled flyout, level-scoped Escape and arrows, focus return, decorative caret and spinner with a once-only loading announcement, disabled default cursor and no disabled hover all hold; scoped axe 0. A4 disabled traversal is advisory (shared navigation)." }, "theming": { "score": 4.5, "weight": 14, "state": "scored", "note": "Non-vacuous 14 of 34. Semantic tokens; the dropdown-menu target paints the flyout or the regions frame, dropdown-menu-item the row with size, dropdown-menu-indicator-icon the caret; theming guards pass. 300px block cap and 160px minimum width are sanctioned layout constraints. Advisory INV6: the shared row target does not reflect open or disabled." }, "api": { "score": 5, "weight": 14, "state": "scored", "note": "Non-vacuous 24 of 42. Every convention holds and the presentation default is declared in JSDoc, doc.mjs, and dense docs. Advisory: drill-in onOpenChange on root close (shared stack, draft OQ1)." }, "behavior": { "score": 4, "weight": 12, "state": "scored", "note": "Non-vacuous 12 of 15. Closed, hover-open, keyboard-open, pressed, nested, drill-in with Back row, header/footer dialog, loading, disabled, long label, sizes, nested selection closing the whole stack, RTL flip, and viewport-capped narrow flyout all render correctly. FIX B4: no pressed feedback on the row (shared row visual). Cross-reference: drill-in onOpenChange advisory." }, "design_objective": { "score": 5, "weight": 6, "state": "scored", "note": "Non-vacuous 7 of 11. Role tokens for spacing, radius (container on the flyout, derived on the row), color, low shadow, fast standard motion with reduced-motion handled by the layer animations. NIT: dead opacity transition on a surface whose opacity never changes; NIT: row radius fallback is a spacing token." }, "design_rendered": { "score": 3.5, "weight": 4, "state": "scored", "note": "33 Chromium frames with settled-geometry sensor receipts. Labels 15-21:1, descriptions 6.0-9.3:1. Focus reuses the hover overlay (cross-reference A15); the open row keeps the same tint as focus; pressed equals hover. At 320px the flyout shifts over the parent row to stay in the viewport (layer runtime)." }, "testing": { "score": 5, "weight": 8, "state": "scored", "note": "Non-vacuous 11 of 16. 73 focused tests; the new onOpenChange and menuDataTestId tests are mutation-sensitive (dropping the close report or the flyout test id fails them). 33/33 exact-head receipts on both the unchanged-source arm and the head; scoped axe 0; every exact-head check green." }, "code_health": { "score": 4, "weight": 8, "state": "scored", "note": "Non-vacuous 14 of 22. Composes useLayer, useListFocus, useMenuHover, useTypeahead, useMenuPress, useMenuOverflow, useBusyAnnouncement; two guarded single-fire focus Effects after drill-in commit; stable callback ref; timers bounded. FIX C14: closing nested regioned flyouts walks aria-expanded/aria-controls and closest('[popover]') instead of React ownership (react-component-runtime DOM boundary); a structural refactor, not changed here." }, "docs": { "score": 4.5, "weight": 8, "state": "scored", "note": "Non-vacuous 14 of 21. Required props, menuDataTestId, and the presentation default are documented; the predecessor reference and history narration are removed; three prop-doc drift entries removed; the RowStates fixture reaches every row state. usage/anatomy remain an unowned rubric gap." }, "i18n_rtl": { "score": 5, "weight": 5, "state": "scored", "note": "Non-vacuous 11 of 21. Measured: D1 caret mirror passes, and the new D4 target shows the flyout flipping from the inline end of the root menu (1.18) in LTR to its other side (-0.18) in RTL." }, "responsive": { "score": 5, "weight": 5, "state": "scored", "note": "Non-vacuous 4 of 11. 320px light/dark frames: no horizontal overflow, long label truncated, flyout kept inside the viewport; coarse frame renders the row unchanged; component-owned fixture covers narrow and long text." } }, "blocks": { "count": 1, "open": [ { "id": "A15/A14", "summary": "Keyboard focus on the sub-menu row is a 5% overlay tint only (1.11-1.15:1 against the menu surface in Neutral and Butter) and paints nothing under forced colors: WCAG 2.2 SC 2.4.7/1.4.11. Component-owned paint; the remediation is a shared row-visual decision with DropdownMenuItem (OQ2).", "issue": null } ] }, "distinct_defects": 1, "fixes": 2, "nits": 2, "lastAudited": "2026-10-24", "rubricVersion": "1.16.6", "mode": "N", "commit": "2e1ae3031b3f224fc8f8beb910e4a7caa5e7cb9f", "evidence": [ { "label": "Exact-head CI run", "note": "https://github.com/facebook/astryx/actions/runs/40097116707" } ], "notes": "Advisories (shared owners, not scored against this component): A4 disabled rows are skipped by shared DropdownMenu navigation (component:DropdownMenu OQ1); the drill-in stack resets on root close without the row reporting onOpenChange(false) (react-component-runtime INV2; owner DropdownMenu; draft spec OQ1); the shared dropdown-menu-item target does not reflect the open or disabled state the row paints (theming-surface INV6). Sensitivity: resolving A15/A14 alone projects 92.6 / A." }Eligibility report:
{ "schemaVersion": 1, "report": "night-watch-audit-eligibility", "component": "core/DropdownMenuSubMenu", "mode": "N", "rubricVersion": "1.16.6", "repository": { "base": "a8ef89f26ef9f0254e103018802c85ffbf227ded", "beforeArm": "7a0d9f20c3b1bed10ceabb0a8de44d46e5907d8a", "head": "2e1ae3031b3f224fc8f8beb910e4a7caa5e7cb9f", "mergedMain": "3dd95a04604" }, "componentContract": { "path": "packages/core/src/DropdownMenu/DropdownMenuSubMenu.spec.md", "authority": "draft", "head": "2e1ae3031b3f224fc8f8beb910e4a7caa5e7cb9f", "approval": "pending exact-head owner approval" }, "inventoryClosed": true, "unresolved": { "objective": [ "A15/A14 component-owned focus paint 1.11-1.15:1, nothing under forced colors (shared row visual decision, DropdownMenuItem OQ2)", "drill-in onOpenChange(false) missing when the root menu closes (owner DropdownMenu drill-in stack; draft OQ1)" ], "manual": [ "A4 disabled traversal (component:DropdownMenu OQ1, advisory)", "dropdown-menu-item open/disabled reflection (theming-surface INV6, advisory)", "B4 pressed feedback (shared row visual)", "C14 DOM-attribute traversal when closing nested regioned flyouts (structural refactor)" ] }, "remediations": [ { "id": "X5b/P31", "kind": "doc-drift fix", "before": "label/children not required, menuDataTestId undocumented, presentation default missing from JSDoc", "after": "documented; 3 known-drift entries removed" }, { "id": "public text", "kind": "doc fix", "before": "a predecessor outside this repository named in the file header; history narration in hasSpinner JSDoc", "after": "removed" }, { "id": "V3", "kind": "tests", "before": "onOpenChange contract and menuDataTestId untested", "after": "mutation-sensitive tests" }, { "id": "I17/R11", "kind": "evidence", "before": "RTL coverage gap; no component-owned fixture", "after": "D1 and new D4 measured; RowStates fixture" } ], "approvals": { "specOwner": "pending", "reviewLoop": "parent private exact-head self-review pending" }, "checks": { "head": "2e1ae3031b3f224fc8f8beb910e4a7caa5e7cb9f", "allGreen": true }, "verdict": { "eligibleForUnattendedAutoMerge": false, "reasons": [ "spec:AST-029 FR11 activation is not shipped", "component contract is draft pending owner approval", "one retained pre-existing BLOCK" ] } }