Skip to content

chore(close-button): migration guide#6322

Open
TarunAdobe wants to merge 4 commits into
mainfrom
ttomar/close-button
Open

chore(close-button): migration guide#6322
TarunAdobe wants to merge 4 commits into
mainfrom
ttomar/close-button

Conversation

@TarunAdobe
Copy link
Copy Markdown
Contributor

@TarunAdobe TarunAdobe commented May 19, 2026

Description

  • Adds the close-button Phase 1 planning artifacts under CONTRIBUTOR-DOCS:
    • CONTRIBUTOR-DOCS/03_project-planning/03_components/close-button/migration-plan.md
    • CONTRIBUTOR-DOCS/03_project-planning/03_components/close-button/rendering-and-styling-migration-analysis.md
  • Removes the previously added consumer-facing guide:
    • 2nd-gen/packages/swc/components/close-button/migration-guide.mdx
  • Updates CONTRIBUTOR-DOCS/03_project-planning/03_components/README.md to index the new close-button plan + roadmap docs.
  • Captures confirmed design inputs in the plan/docs:
    • S2 Web Desktop Figma node for close button
    • S2 close-button anatomy doc
    • spectrum-css spectrum-two closebutton source

Motivation and context

This work corrects scope and artifact type for the close-button epic.
The prior MDX was consumer migration documentation, but this stage requires internal migration planning docs (washing-machine Phase 1 style) before implementation.

This PR establishes the review surface for:

  • 1st-gen API inventory
  • must-ship vs additive migration scope
  • core vs SWC architecture direction
  • sequencing/checklist for setup → API → styling → a11y → testing → docs → review

Related issue(s)

  • Epic SWC-2087 — Close button migration
  • SWC-2088 — Accessibility recommendations (already documented)
  • SWC-2089 — Analyze component and create migration plan (this PR)

Screenshots (if appropriate)

  • N/A (documentation-only change)

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.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • Verify close-button migration planning docs were added and consumer guide was removed

    1. Open migration plan and migration roadmap
    2. Confirm both files exist and contain close-button-specific content
    3. Confirm 2nd-gen/packages/swc/components/close-button/migration-guide.mdx is removed
  • Verify phase-1 planning scope and design references

    1. In migration-plan.md, review TL;DR, Changes overview, Migration checklist, and Blockers and open questions
    2. Confirm the Figma link, S2 anatomy link, and spectrum-css closebutton source are present
    3. Confirm the plan captures must-ship and additive items plus core/SWC split
  • Verify contributor docs index was updated

    1. Open components README
    2. Under Close Button, confirm links exist for:
      • close-button accessibility migration analysis
      • close-button migration plan
      • close-button migration roadmap

Device review

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

Accessibility testing checklist

  • Keyboard (required — document steps below)

    1. N/A for this PR (documentation-only; no runtime UI behavior changed)
  • Screen reader (required — document steps below)

    1. N/A for this PR (documentation-only; no runtime UI behavior changed)

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 19, 2026

⚠️ No Changeset found

Latest commit: c733530

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

📚 Branch Preview Links

🔍 First Generation 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-6322

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.

@TarunAdobe TarunAdobe force-pushed the ttomar/close-button branch from d580fd2 to f9b9450 Compare May 20, 2026 11:42
@TarunAdobe TarunAdobe marked this pull request as ready for review May 20, 2026 14:24
@TarunAdobe TarunAdobe requested a review from a team as a code owner May 20, 2026 14:24
@pfulton pfulton added Status:Ready for review PR ready for review or re-review. 2nd gen These issues or PRs map to our 2nd generation work to modernizing infrastructure. Component:Button Includes ButtonBase, Clear Button, and Close Button labels May 20, 2026
Comment thread CONTRIBUTOR-DOCS/03_project-planning/03_components/close-button/migration-plan.md Outdated
Copy link
Copy Markdown
Contributor

@Rajdeepc Rajdeepc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keeping this blocking for the below question since it is not reflected in your plan.

Given that ButtonBase already provides disabled, pending, accessible-name, size, slot observation, and delegated focus — what does CloseButton.base.ts actually own? The plan should answer:

  • Does it extend ButtonBase? (yes, presumably)
  • What new properties or behavior does it add? (likely just staticColor typing at core level, if anything)
  • Should types reuse BUTTON_STATIC_COLORS from Button.types.ts or define CLOSE_BUTTON_STATIC_COLORS?

If CloseButton.base.ts is effectively empty (only extending ButtonBase with no additions), consider whether the core layer is even needed — the SWC class could extend ButtonBase directly.

@TarunAdobe
Copy link
Copy Markdown
Contributor Author

@Rajdeepc yes we would need a close button base file to handle

  • staticColor: 'white' | 'black' | undefined (close button specific)
  • deprecation code for variant -> close button specific

so even if it is thin its preferable to keep the base file to match 2nd gen structure + these 2 specifics
(and allow for a better future planning)

@TarunAdobe TarunAdobe force-pushed the ttomar/close-button branch from a6e0e34 to e71224c Compare May 26, 2026 08:42
@TarunAdobe TarunAdobe added Status:Ready for re-review PR has had its feedback addressed and is once again ready for review. and removed Status:Ready for review PR ready for review or re-review. labels May 26, 2026
@TarunAdobe TarunAdobe requested review from Rajdeepc and cdransf May 26, 2026 09:53
Copy link
Copy Markdown
Contributor

@rubencarvalho rubencarvalho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, have left one question. I know we've discussed what to do with the default being or not reflected, but not sure if we landed on a decision.


| Property | Type | Default | Attribute | Confidence |
| --- | --- | --- | --- | --- |
| `size` | `'s' \| 'm' \| 'l' \| 'xl'` | `'m'` | `size` | Confirmed |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

are we reflecting the default size? I don't know where we landed on this

@TarunAdobe TarunAdobe force-pushed the ttomar/close-button branch from e71224c to d6ba276 Compare June 1, 2026 05:56
Copy link
Copy Markdown
Contributor

@Rajdeepc Rajdeepc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work!

@TarunAdobe TarunAdobe enabled auto-merge (rebase) June 1, 2026 09:35
@TarunAdobe TarunAdobe requested review from cdransf and removed request for cdransf June 1, 2026 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

2nd gen These issues or PRs map to our 2nd generation work to modernizing infrastructure. Component:Button Includes ButtonBase, Clear Button, and Close Button Status:Ready for re-review PR has had its feedback addressed and is once again ready for review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants