Skip to content

feat(illustrated-message): slot-based heading API + gen1 deprecation#6173

Merged
miwha-adobe merged 10 commits intos2/illustrated-messagefrom
swc-1835-illustrated-message-api-slot-refactor
Apr 17, 2026
Merged

feat(illustrated-message): slot-based heading API + gen1 deprecation#6173
miwha-adobe merged 10 commits intos2/illustrated-messagefrom
swc-1835-illustrated-message-api-slot-refactor

Conversation

@miwha-adobe
Copy link
Copy Markdown

Description

2nd-gen

  • Removes the heading-level prop from swc-illustrated-message. The consumer now provides an <h2><h6> element directly in the heading slot — the component no longer owns the heading tag or level.
  • Updates CSS to reset native heading styles via ::slotted(hN:not([class])) so component tokens can take over.
  • Adds @todo SWC-1943 (slot constraints) and @todo SWC-1944 (@status unsupported) to track follow-up work.
  • Rewrites tests to reflect the new slot-based API.
  • Updates stories to use <h2 slot="heading">.

1st-gen

  • Adds a firstUpdated deprecation warning on sp-illustrated-message pointing to https://s2.spectrum.adobe.com/.
  • Adds a deprecation test following the avatar/iconset pattern.

Motivation and context

The previous API had the shadow DOM own the heading tag (<h2><h6>), controlled via a heading-level prop. This is a breaking change that simplifies the API — consumers own their heading semantics, which is more consistent with how slots are used across the design system and gives teams direct control over document outline hierarchy.

The gen1 sp-illustrated-message is no longer maintained. The deprecation warning directs consumers to Spectrum 2.

Related issue(s)

  • SWC-1835

Screenshots (if appropriate)


Author's checklist

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

  • Heading slot renders correctly with consumer-provided heading element

    1. Open the Illustrated Message story in Storybook
    2. Verify the heading renders with <h2 slot="heading"> in light DOM
    3. Inspect the shadow DOM — confirm no <h2><h6> exists there
  • Deprecation warning fires for sp-illustrated-message in gen1

    1. Open the gen1 Storybook on port 8008
    2. Navigate to the Illustrated Message story
    3. Open browser devtools console
    4. Expect a [SWC] DEPRECATION NOTICE warning mentioning Spectrum 2

Device review

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

Accessibility testing checklist

  • Keyboard (required — document steps below)

    1. Open the Illustrated Message story in Storybook
    2. Tab into the component
    3. Verify focus moves logically through the heading, description, and any interactive content in slots
  • Screen reader (required — document steps below)

    1. Open the Illustrated Message story in Storybook with a screen reader active
    2. Navigate to the component
    3. Verify the heading level is announced correctly based on the element provided (e.g. <h2> announces as "heading level 2")
    4. Verify the description content is announced after the heading

@miwha-adobe miwha-adobe requested a review from a team as a code owner April 14, 2026 16:17
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 14, 2026

⚠️ No Changeset found

Latest commit: b1b5dc1

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
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 14, 2026

📚 Branch Preview Links

🔍 First Generation 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-6173

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.

@miwha-adobe miwha-adobe force-pushed the swc-1835-illustrated-message-api-slot-refactor branch from df19146 to b1b6d48 Compare April 15, 2026 19:12
Copy link
Copy Markdown
Contributor

@5t3ph 5t3ph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, just two minor things to consider!

Comment thread 1st-gen/packages/illustrated-message/src/IllustratedMessage.ts Outdated
Comment thread 1st-gen/packages/illustrated-message/src/IllustratedMessage.ts
Copy link
Copy Markdown
Contributor

@5t3ph 5t3ph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New warnings look good! One tiny suggestion on the new docs.

Comment thread CONTRIBUTOR-DOCS/02_style-guide/02_typescript/17_debug-validation.md Outdated
Comment thread 2nd-gen/packages/core/components/illustrated-message/IllustratedMessage.base.ts Outdated
Copy link
Copy Markdown
Contributor

@5t3ph 5t3ph left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@miwha-adobe miwha-adobe merged commit be639ad into s2/illustrated-message Apr 17, 2026
26 checks passed
@miwha-adobe miwha-adobe deleted the swc-1835-illustrated-message-api-slot-refactor branch April 17, 2026 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants