Skip to content

chore(icons): repoint ui icon consumers - #6567

Open
cdransf wants to merge 2 commits into
mainfrom
cdransf/2nd-gen-icon-repoint
Open

chore(icons): repoint ui icon consumers#6567
cdransf wants to merge 2 commits into
mainfrom
cdransf/2nd-gen-icon-repoint

Conversation

@cdransf

@cdransf cdransf commented Jul 30, 2026

Copy link
Copy Markdown
Member

Description

Repoints CloseButton, MessageSources, and ResponseStatus off the pre-RFC icon/elements/ module onto <swc-ui-icon>, matching the Accordion POC. Deletes the now-unused iconForSize Storybook helper (Badge stories now call icon/elements functions directly). Removes <swc-icon>'s stale @status internal tag. Adds close-button's first VRT coverage (base + custom-properties). icon/elements/ itself is kept for now, it still backs <swc-icon>'s public export and docs; full retirement is a later phase.

Motivation and context

RFC Phase 1: repoint any component rendering a UI icon internally onto <swc-ui-icon>, no unsafeSVG remaining.

Related issue(s)

  • Jira: SWC-2438, Phase 1

Screenshots (if appropriate)

No API changes. Note: CloseButton's cross icon now uses the RFC's fixed size-to-step map instead of its old ad hoc numbering, so l/xl may render a slightly different glyph. Check the new close-button.vrt.ts snapshot against Golden Hash.

Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed the Accessibility Practices for this feature.
  • 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

  • Close Button: check cross icon at every size, and under hover/focus/active, no distortion or regression.
  • Conversational AI/Message sources and Response status: toggle expand/collapse, chevron rotates as before.
  • Badge Playground: select each icon-slot option (Checkmark, Cross, Alert), confirm render, 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: Tab to Close Button, expect focus ring; Enter/Space fires click (unchanged). Same for the Message sources/Response status toggle buttons; expand/collapse works, focus stays put.
  • Screen reader: Close Button announces accessible-label only, icon stays silent (aria-hidden by default via IconBase). Toggle buttons announce label + aria-expanded; chevron stays silent. No behavior change from before this PR.

@cdransf
cdransf requested a review from caseyisonit July 30, 2026 23:31
@cdransf cdransf self-assigned this Jul 30, 2026
@cdransf
cdransf requested a review from a team as a code owner July 30, 2026 23:31
@cdransf cdransf added Component:Icon Spectrum 2 Issues related to Spectrum 2 labels Jul 30, 2026
@changeset-bot

changeset-bot Bot commented Jul 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8bf9cbe

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

@cdransf cdransf added the run_vrt Triggers the Chromatic VRT run for 2nd-gen label Jul 30, 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-6567

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.

@cdransf
cdransf force-pushed the cdransf/2nd-gen-icon-repoint branch 4 times, most recently from 64a3740 to faf07d0 Compare August 5, 2026 19:01
@cdransf
cdransf force-pushed the cdransf/2nd-gen-icon-repoint branch from faf07d0 to e21e74a Compare August 6, 2026 17:28
@cdransf
cdransf force-pushed the cdransf/2nd-gen-icon-repoint branch from e21e74a to 8bf9cbe Compare August 10, 2026 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component:Icon run_vrt Triggers the Chromatic VRT run for 2nd-gen Spectrum 2 Issues related to Spectrum 2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant