Skip to content

feat(menu): scaffold 2nd-gen file structure - #6596

Draft
Rajdeepc wants to merge 1 commit into
mainfrom
rajdeepchandra/chore-menu-2nd-gen-file-structure
Draft

feat(menu): scaffold 2nd-gen file structure#6596
Rajdeepc wants to merge 1 commit into
mainfrom
rajdeepchandra/chore-menu-2nd-gen-file-structure

Conversation

@Rajdeepc

@Rajdeepc Rajdeepc commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Description

Creates the core and SWC directory structure for Menu in the 2nd-gen package: base classes, concrete components, stub CSS, and swc-<tag>.ts registration entry points for swc-menu, swc-menu-item, swc-menu-group, and swc-menu-separator, bundled together in one components/menu package. Wires the new ./components/menu export into core's package.json. Adds a minimal Playground story for a Storybook smoke test.

MenuItem/MenuGroup/MenuSeparator are bundled into this same pass (rather than scaffolded separately) to match how Tabs (Tab/TabPanel) and Accordion (AccordionItem) structure their composite sub-parts — confirmed against the workstream status table, which tracks "Menu" as a single row with no separate rows for those three units.

No behavior is implemented yet: components extend SpectrumElement directly and render only a slot. Trigger wiring, swc-popover anchoring, ARIA/keyboard, and the full API surface are out of scope for this phase (2nd-gen swc-menu is a full menu-button host per the accessibility/rendering analysis docs — a larger departure from 1st-gen's list-only sp-menu than a typical port, so intentionally deferred rather than guessed at here).

Motivation and context

First step ("Set up file structure in 2nd-gen") of the Menu 1st-gen → 2nd-gen migration, so implementation work (API, a11y, styling) has a structure to build on.

Note for reviewer: no migration-plan.md exists yet for Menu under CONTRIBUTOR-DOCS/03_project-planning/03_components/menu/ — only the accessibility and rendering-and-styling analysis docs, which this scaffolding is based on. Worth closing out before the API migration phase starts.

Related issue(s)

  • SWC - 1983

Screenshots (if appropriate)

N/A — no visual output yet beyond an unstyled slot passthrough.

Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

No automated tests, changeset, or documentation were added: this is Phase 2 (file-structure) scaffolding only, with no publishable behavior change. Validation for this PR was yarn build (both packages), eslint/stylelint/prettier, and yarn storybook:build (confirms components-menu--playground renders). Dedicated tests land in the testing phase; docs land in the documentation phase.

Manual review test cases

  • Confirm the new components register and render
    1. Run yarn storybook in 2nd-gen/packages/swc
    2. Open the "Menu" story
    3. Expect swc-menu to render its slotted swc-menu-item/swc-menu-group/swc-menu-separator children with no console errors

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

Accessibility testing checklist

  • Keyboard — Not applicable yet. These components implement no interactive behavior in this PR (no trigger, no roving tabindex, no ARIA) — they are unstyled slot passthroughs pending the API and accessibility migration phases. Confirm there are no regressions elsewhere (these tags are new and not yet consumed by any other component).
  • Screen reader — Not applicable yet, for the same reason. No roles, names, or states are set on any of the four elements in this PR; that work is scoped to the accessibility migration phase, per CONTRIBUTOR-DOCS/03_project-planning/03_components/menu/accessibility-migration-analysis.md.

Creates base classes, concrete components, stub CSS, and swc-<tag>.ts
entry points for Menu, MenuItem, MenuGroup, and MenuSeparator, bundled
in one 2nd-gen package to match how Tabs and Accordion structure their
composite sub-parts. Wires the core package.json exports for the new
components and adds a Playground story for a Storybook smoke test.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@Rajdeepc
Rajdeepc requested a review from a team as a code owner August 10, 2026 12:33
@changeset-bot

changeset-bot Bot commented Aug 10, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 081f927

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@Rajdeepc Rajdeepc self-assigned this Aug 10, 2026
@Rajdeepc Rajdeepc added the skip_vrt Skip VRT build; mark UI Tests green without running Chromatic label Aug 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

📚 Branch Preview Links

🔍 Gen1 Visual Regression Test Results

When a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:

Deployed to Azure Blob Storage: pr-6596

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

@Rajdeepc
Rajdeepc marked this pull request as draft August 11, 2026 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip_vrt Skip VRT build; mark UI Tests green without running Chromatic

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant