fix(illustrated-message): migrate CSS to S2 tokens#6181
Conversation
…nd add heading slot validation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.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 |
5t3ph
left a comment
There was a problem hiding this comment.
Great start here! We might hold until my PR addressing the docs styles merges so we can better validate any slotted typography conflicts.
| @@ -51,31 +152,38 @@ | |||
| ::slotted(h5:not([class])), | |||
| ::slotted(h6:not([class])) { | |||
There was a problem hiding this comment.
Let's try out the new typography protection technique I shared in Slack! You will need to add a wrapper around the heading slot that holds these styles as part of the update.
There was a problem hiding this comment.
Added! Wondering if I implemented that right though haha.
|
…-message-fidelity
Resolves conflicts from merging the shared s2 base branch: - 1st-gen: kept getter/setter deprecation warnings per property (heading + description) - 2nd-gen base: kept handleHeadingSlotChange (slotchange-based validation) - 2nd-gen component: kept inline @slotchange binding in render - 2nd-gen CSS: kept full @layer typography + revert-layer implementation - 2nd-gen tests: kept slotchange-based test structure Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
5t3ph
left a comment
There was a problem hiding this comment.
Looking good! Just a couple adjustments.
* feat(illustrated-message): slot-based heading API + gen1 deprecation * fix(illustrated-message): enable verbose mode for deprecation tests and add heading slot validation * feat(illustrated-message): update status to unsupported (SWC-1944) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(illustrated-message): register custom element in stories to unblock a11y tests * fix(illustrated-message): migrate CSS to S2 tokens and fix story illustration scaling * fix(illustrated-message): dry up cloud SVG and revert doc-story selector change * fix(illustrated-message): address CSS PR feedback * refactor(illustrated-message): scope heading slot validation to slotchange event * fix(illustrated-message): add Sizes and Orientation option stories * fix(illustrated-message): minor copy tweaks * fix(illustrated-message): css selector updates and jsdoc --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
* docs: illustrated message a11y migration docs (#6116) * docs(illustrated-message): add migration plan for SWC-1834 (#6124) * docs(illustrated-message): add migration plan for SWC-1834 * docs(illustrated-message): update migration plan with reviewer feedback for SWC-1834 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * docs(illustrated-message): add size variants s|m|l with m as default per React Spectrum --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(illustrated-message): file structure and initial API (#6150) * feat(illustrated-message): file structure and initial API pass * test(illustrated-message): add stories, interaction tests, and a11y spec Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(illustrated-message): update a11y snapshot to match current story heading Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(illustrated-message): extract headingClass const and fix Playground illustration slot * refactor(illustrated-message): remove heading and description attributes, rely on slots only * refactor(illustrated-message): update stories to use template pattern and simplify API docs * refactor(illustrated-message): update stories to use html template slot pattern with inline SVG --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(illustrated-message) - new size and orientation API (#6155) * feat(illustrated-message): file structure and initial API pass * test(illustrated-message): add stories, interaction tests, and a11y spec Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(illustrated-message): update a11y snapshot to match current story heading Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(illustrated-message): add size and orientation additive features Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(illustrated-message): re-add size and orientation additive API * feat(illustrated-message): add size and orientation additive API and css * fix(illustrated-message): add runtime validation and tighten const types * test(illustrated-message): add size and orientation attribute/property tests --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * feat(illustrated-message): slot-based heading API + gen1 deprecation (#6173) * feat(illustrated-message): slot-based heading API + gen1 deprecation * fix(illustrated-message): enable verbose mode for deprecation tests and add heading slot validation * feat(illustrated-message): update status to unsupported (SWC-1944) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(illustrated-message): register custom element in stories to unblock a11y tests * fix(illustrated-message): replace component-level deprecation with property-level warnings * docs(contributor-docs): add deprecation warning guidance to debug-validation guide * docs(contributor-docs): rename "Warning structure" to "Deprecation warning structure" for clarity * fix(illustrated-message): scope heading slot validation to slotchange instead of every updated() * test(illustrated-message): update heading slot test * fix(illustrated-message): register slotchange listener unconditionally, guard warn inside method --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(illustrated-message): migrate CSS to S2 tokens (#6181) * feat(illustrated-message): slot-based heading API + gen1 deprecation * fix(illustrated-message): enable verbose mode for deprecation tests and add heading slot validation * feat(illustrated-message): update status to unsupported (SWC-1944) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * fix(illustrated-message): register custom element in stories to unblock a11y tests * fix(illustrated-message): migrate CSS to S2 tokens and fix story illustration scaling * fix(illustrated-message): dry up cloud SVG and revert doc-story selector change * fix(illustrated-message): address CSS PR feedback * refactor(illustrated-message): scope heading slot validation to slotchange event * fix(illustrated-message): add Sizes and Orientation option stories * fix(illustrated-message): minor copy tweaks * fix(illustrated-message): css selector updates and jsdoc --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com> * chore(illustrated-message): conform to code style guides, storybook and tests (#6191) * style(illustrated-message): align source, stories, and tests with CONTRIBUTOR-DOCS code standards * chore(illustrated-message): add SWC-1992 ticket reference to Stackblitz todo * fix(illustrated-message): scope a11y spec locators to swc-illustrated-message instances * docs(illustrated-message): add 1st-gen to 2nd-gen migration guide (#6192) * style(illustrated-message): align source, stories, and tests with CONTRIBUTOR-DOCS code standards * chore(illustrated-message): add SWC-1992 ticket reference to Stackblitz todo * fix(illustrated-message): scope a11y spec locators to swc-illustrated-message instances * docs(illustrated-message): add 1st-gen to 2nd-gen migration guide * docs(illustrated-message): add consumer migration guide and @cssprop JSDoc tags * docs(illustrated-message): remove stale todo comment from consumer migration guide * docs(illustrated-message): mark all migration phases as complete in the status table * style(illustrated-message): fix prettier formatting in IllustratedMessage.ts * chore(illustrated-message): add changeset for S2 migration * docs(illustrated-message): add @default annotation to size property --------- Co-authored-by: Nikki Massaro <5090492+nikkimk@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Description
Migrates
illustrated-messageCSS from placeholder stubs to full S2 token-based styles. Replaces all@todo SWC-1838comments with implemented rules covering layout, illustration sizing, heading and description typography, size variants (s,m,l), horizontal orientation, CJK language support, slotted SVG fill handling, and forced-colors support. Also fixes illustration scaling in Storybook stories and consolidates the duplicate cloud SVG path into a sharedcloudSvghelper.Motivation and context
The component CSS was scaffolded with empty
@todostubs pending the S2 token migration. This PR fulfills that migration, aligning the component visually with the S2 Figma designs using tokens from the CSS repo's S2 branch.Related issue(s)
Screenshots (if appropriate)
Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Verify all size variants render correctly
sizebetweens,m, andls/m, 160px forl) and typography adjusts accordinglyVerify horizontal orientation
orientation="horizontal"Verify forced colors
CanvasTextcolor and is visibleDevice review
Accessibility testing checklist
Keyboard (required — document steps below)
Screen reader (required — document steps below)
aria-hidden="true"), and the heading and description are announced in order with correct roles