docs(tabs): Added consumer migration guide for swc-tabs#6267
Conversation
|
📚 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 |
2d9948c to
2d36351
Compare
1a42947 to
d97a8f1
Compare
Provides application developers with a complete migration guide from sp-tabs to swc-tabs, covering renamed attributes (value→tab-id, label→accessible-label), new enum properties (keyboard-activation, density), removed APIs, accessibility changes, and public styling hooks. Removes the legacy migration.md (non-standard format, only existed in tabs) in favor of the standardized consumer-migration-guide.mdx pattern used across all 2nd-gen components. Co-authored-by: Cursor <cursoragent@cursor.com>
d97a8f1 to
52007cf
Compare
| import '@spectrum-web-components/tabs/sp-tab-panel.js'; | ||
|
|
||
| // After (single import registers all three elements) | ||
| import '@adobe/spectrum-wc/tabs'; |
| import '@adobe/spectrum-wc/tabs'; | ||
| ``` | ||
|
|
||
| > `@adobe/spectrum-wc` is a monolithic package. Importing via subpath (e.g. `@adobe/spectrum-wc/tabs`) loads only that component's bundle. |
There was a problem hiding this comment.
update like you did on the docs:
@adobe/spectrum-wcis a monolithic package. Importing via subpath (e.g.@adobe/spectrum-wc/components/progress-circle/swc-progress-circle.js) registers and loads only that component's bundle.
| | ----------------------- | -------------------------------------------------------- | -------------------------------------------- | | ||
| | Tag names | `<sp-tabs>`, `<sp-tab>`, `<sp-tab-panel>` | `<swc-tabs>`, `<swc-tab>`, `<swc-tab-panel>` | | ||
| | Package | `@spectrum-web-components/tabs` | `@adobe/spectrum-wc` | | ||
| | Import | `@spectrum-web-components/tabs/sp-tabs.js` (per element) | `@adobe/spectrum-wc/tabs` (single import) | |
Co-authored-by: Cursor <cursoragent@cursor.com>
758ec83 to
6079943
Compare
Description
Adds a consumer-facing migration guide (
consumer-migration-guide.mdx) for theswc-tabscomponent suite, following the same structure established byillustrated-messageand other 2nd-gen components.The guide provides application developers with everything needed to migrate from
sp-tabs/sp-tab/sp-tab-paneltoswc-tabs/swc-tab/swc-tab-panel.Motivation and context
Consumers upgrading from Spectrum 1 to Spectrum 2 need clear, scannable documentation on what changed and what to update in their product code. This guide ships alongside the component source so it renders in Storybook at
Components/Tabs/Consumer migration guide.Related issue(s)
Screenshots (if appropriate)
N/A — documentation only
Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Verify the MDX renders correctly in Storybook
yarn storybook:2nd-genComponents > Tabs > Consumer migration guideVerify all before/after code examples are accurate
tab-id,accessible-label,keyboard-activation,density) match implementationauto,compact,quiet,emphasized,size) are correctly listedDevice review
Accessibility testing checklist
Keyboard — This is a documentation-only change with no interactive components. No keyboard testing required.
Screen reader — This is a documentation-only change. No screen reader testing required. The guide itself documents accessibility requirements for consumers (e.g.
accessible-labelusage,aria-labelfor icon-only tabs).Made with Cursor