feat(icon): make swc-icon public with BYO SVG docs and private elements catalog#6415
feat(icon): make swc-icon public with BYO SVG docs and private elements catalog#6415TarunAdobe wants to merge 2 commits into
Conversation
Document go-public scope and remove @status internal from swc-icon JSDoc. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Document concrete how-to for export boundary, docs split, and ship checklist. Co-authored-by: Cursor <cursoragent@cursor.com>
📚 Branch Preview Links🔍 First Generation Visual Regression Test ResultsWhen 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: If the changes are expected, update the |
Description
Make
<swc-icon>a public 2nd-gen component: public Storybook docs, consumer migration guide, and npm export boundary — while keeping the internalelements/SVG catalog monorepo-only.Included in this PR:
@status internalfromswc-iconJSDoc (match badge/button:@sinceonly)Icononly fromcomponents/icon/index.ts(stop leaking factories via@adobe/spectrum-wc/icon)icon.stories.ts,icon.mdx, andmigration-guide.mdx(BYO SVG; no publicelements/import path)icon.internal.*to maintainer catalog (dev Storybook only; prod excludes*.internal.*)elements/paths@exampleto inline SVG only@adobe/spectrum-wcMotivation and context.
<swc-icon>already exists in 2nd-gen and is used internally (badge, patterns, etc.), but it is marked internal and excluded from production Storybook. Consumers upgrading from<sp-icon>need a documented public wrapper that accepts slotted SVG, not iconset registry lookup. The internalelements/factories stay a maintainer convenience for SWC development — not a public icon catalog.Related issue(s)
Screenshots (if appropriate)
N/A — docs and export-boundary change. Verify in Storybook after merge.
Author's checklist
PULL_REQUESTS documents.
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
yarn storybook:buildin2nd-gen/packages/swcelements/import guidance on the public pageyarn storybookin2nd-gen/packages/swcicon.internal.mdxstories)elements/reference still available locallysp-icon→swc-icon, slot SVG, no@adobe/spectrum-wc/.../elementsimport pathname,src,xxs/xxl,--mod-icon-*)components/icon/index.tsexportsIcononly@adobe/spectrum-wc/icondoes not re-exportChevron100Iconetc.<swc-icon>+aria-hiddenguidance@adobe/spectrum-wc/icon/elementsimports in source; icons render correctlyDevice review
Accessibility testing checklist
Icon a11y behavior is unchanged (slot SVG gets
role="img";labelsetsaria-label; no label →aria-hidden).Re-verify on public docs stories.
<swc-icon>is not focusable; no spurious focus stops on decorative iconslabel) hidden from the accessibility tree