Skip to content

chore(icons): add workflow icons generator - #6572

Open
cdransf wants to merge 1 commit into
cdransf/2nd-gen-icon-repointfrom
cdransf/2nd-gen-icon-public-workflow
Open

chore(icons): add workflow icons generator#6572
cdransf wants to merge 1 commit into
cdransf/2nd-gen-icon-repointfrom
cdransf/2nd-gen-icon-public-workflow

Conversation

@cdransf

@cdransf cdransf commented Aug 3, 2026

Copy link
Copy Markdown
Member

Description

Adds scripts/generate-workflow-icons.mjs: converts A4U workflow SVGs into a per-icon function (StarIcon(): string) and a per-icon element (<swc-icon-star> extending IconBase), reusing Phase 0's shared icon-source/utils/. Staged in swc/components/workflow-icons/ for now; packaging into @adobe/spectrum-wc-icons is Phase 4. Filename regex (S2_Icon_<Name>_20_N.svg) is derived from a public sibling repo's manifest, not a confirmed real A4U sample, flagged as such in the file header. Validated against synthetic fixtures only; no real icon art is included or committed.

Motivation and context

Implements Phase 3 of the icon RFC (SWC-2442): public workflow icons as a Lit-free function plus a custom element.

Related issue(s)

  • Jira: SWC-2442
  • Depends on SWC-2439 (Phase 2 gate) · feeds SWC-2441 (Phase 4 packaging)

Screenshots (if appropriate)

N/A — build script only, no UI.

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

  • Drop a fixture SVG (S2_Icon_Star_20_N.svg, --iconPrimary fill) into icon-source/workflow/, run yarn generate:workflow-icons, confirm both output files are generated, fill is rewritten to var(--swc-icon-color, currentColor), and lint/prettier pass. Delete the fixture and output after.
  • Confirm running with an empty icon-source/workflow/ throws instead of deleting anything.

Device review

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

Accessibility testing checklist

  • Keyboard: N/A, no UI in this PR.
  • Screen reader: N/A, no UI in this PR. Generated elements extend IconBase (existing, already-tested a11y contract: decorative by default, role="img" + aria-label when accessible-label is set); no new behavior introduced.

@cdransf cdransf self-assigned this Aug 3, 2026
@cdransf cdransf added the Spectrum 2 Issues related to Spectrum 2 label Aug 3, 2026
@changeset-bot

changeset-bot Bot commented Aug 3, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1f31550

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

github-actions Bot commented Aug 3, 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-6572

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-public-workflow branch 2 times, most recently from 9f272c0 to 5f7a3ac Compare August 3, 2026 20:35
@cdransf
cdransf marked this pull request as ready for review August 3, 2026 20:50
@cdransf
cdransf requested a review from a team as a code owner August 3, 2026 20:50
@cdransf
cdransf requested a review from caseyisonit August 3, 2026 21:18
@cdransf
cdransf force-pushed the cdransf/2nd-gen-icon-public-workflow branch from d68ef6c to 5f7a3ac Compare August 4, 2026 17:38
@cdransf
cdransf force-pushed the cdransf/2nd-gen-icon-public-workflow branch from 5f7a3ac to 0ffc6bf Compare August 4, 2026 17:40
@cdransf
cdransf force-pushed the cdransf/2nd-gen-icon-public-workflow branch from 0ffc6bf to 7ecaa90 Compare August 5, 2026 19:01
@cdransf
cdransf force-pushed the cdransf/2nd-gen-icon-public-workflow branch from 7ecaa90 to 1f31550 Compare August 6, 2026 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Spectrum 2 Issues related to Spectrum 2

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant