Skip to content

feat(menu-separator): phase 3 api - #6887

Closed
blunteshwar wants to merge 2 commits into
menu-separator-migrationfrom
menu-separator-phase-3-api
Closed

blunteshwar wants to merge 2 commits into
menu-separator-migrationfrom
menu-separator-phase-3-api

Conversation

@blunteshwar

Copy link
Copy Markdown
Contributor

Description

Phase 3 (API) of the swc-menu-separator gen2 migration. Targets the menu-separator-migration feature branch. This branch is stacked on the Phase 2 PR (#6886), so the diff includes Phase 2 until that merges.

  • MenuSeparatorBase sets role="separator" in connectedCallback and exposes no properties, slots or events (B2, B5).
  • No size, vertical or staticColor: the base extends SpectrumElement, not DividerBase (Q2).
  • The migration plan checklist and decision log record Q2 and Q8 as implemented, pending reviewer confirmation.

Not done in this phase:

  • 1st-gen @deprecated JSDoc and window.__swc.warn() for B1 to B3. The breaking-change tickets are still missing (Q4), and size can't be detected as user-set without changing SizedMixin usage, which the migration rules forbid in 1st-gen. This needs a decision before it is done.
  • A1 (dev-mode placement warning) stays Additive (Q7).

Motivation and context

Locks the public contract (no public API, fixed role) before accessibility, styling and tests are added.

Related issue(s)

  • Epic SWC-2668

Screenshots (if appropriate)

N/A


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.

Validation

  • yarn workspace @spectrum-web-components/gen2 build: passed; compiled base contains the connectedCallback role.
  • npx eslint on the core folder: passed.
  • npx prettier --write on the plan and core folder: no changes needed.

@changeset-bot

changeset-bot Bot commented Nov 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 48ffdf9

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.

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

@github-actions

github-actions Bot commented Nov 2, 2026

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-6887

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.

@blunteshwar

Copy link
Copy Markdown
Contributor Author

Nothing blocking. Two notes: (1) connectedCallback unconditionally overwrites any consumer-set role. That matches 1st-gen, which sets it in firstUpdated, but the docs should say the role is forced, not overridable (see #6891). (2) The Divider base sets the role in firstUpdated. If the timing difference is intentional (role present before a parent menu inspects its children), it's worth confirming in review, since Q8 is still marked pending.

@blunteshwar

Copy link
Copy Markdown
Contributor Author

Combined into #6893.

@blunteshwar blunteshwar closed this Nov 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant