Skip to content

feat(contextual-help): S2 migration #3909

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: spectrum-two
Choose a base branch
from

Conversation

cdransf
Copy link
Member

@cdransf cdransf commented Jun 6, 2025

Description

CSS-819

S2 migration for contextual help

This migrates the contextual help component to the latest Spectrum 2 designs. Custom properties have been remapped and added per the design specification.

Typographic and color tokens have been updated per design specifications.

All existing popover positioning varations are supported.

New custom properties

--spectrum-contextual-help-body-color
--spectrum-contextual-help-body-line-height
--spectrum-contextual-help-body-sans-serif-font-family
--spectrum-contextual-help-body-sans-serif-font-style
--spectrum-contextual-help-body-sans-serif-font-weight
--spectrum-contextual-help-title-color
--spectrum-contextual-help-title-font-style
--spectrum-contextual-help-title-font-weight
--spectrum-contextual-help-title-line-height
--spectrum-contextual-help-title-sans-serif-font-family

New mods

--mod-contextual-help-body-line-height
--mod-contextual-help-body-sans-serif-font-family
--mod-contextual-help-body-sans-serif-font-style
--mod-contextual-help-body-sans-serif-font-weight
--mod-contextual-help-body-size
--mod-contextual-help-title-color
--mod-contextual-help-title-font-style
--mod-contextual-help-title-font-weight
--mod-contextual-help-title-line-height
--mod-contextual-help-title-sans-serif-font-family
--highcontrast-contextual-help-heading-color
--highcontrast-contextual-help-title-color

Removed mods

--highcontrast-contextual-help-heading-color

Screenshots

To-do list

  • I have read the contribution guidelines.
  • I have updated relevant storybook stories and templates.
  • I have tested these changes in Windows High Contrast mode.
  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • ✨ This pull request is ready to merge. ✨

@cdransf cdransf self-assigned this Jun 6, 2025
@cdransf cdransf added size-5 L ~30-42hrs; lots of effort or complexity, most of a sprint needed to complete. wip This is a work in progress, don't judge. skip_vrt Add to a PR to skip running VRT (but still pass the action) labels Jun 6, 2025
Copy link

changeset-bot bot commented Jun 6, 2025

🦋 Changeset detected

Latest commit: 75a08f1

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@spectrum-css/contextualhelp Major
@spectrum-css/bundle Patch
@spectrum-css/preview Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Contributor

github-actions bot commented Jun 6, 2025

🚀 Deployed on https://pr-3909--spectrum-css.netlify.app

Copy link
Contributor

github-actions bot commented Jun 6, 2025

File metrics

Summary

Total size: 1.42 MB*

Package Size Minified Gzipped
contextualhelp 4.16 KB 4.00 KB 0.95 KB

contextualhelp

Filename Head Minified Gzipped Compared to base
index.css 4.16 KB 4.00 KB 0.95 KB 🔴 ⬆ 1.96 KB
metadata.json 2.53 KB - - 🔴 ⬆ 1.26 KB
* Size is the sum of all main files for packages in the library.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

@cdransf cdransf force-pushed the cdransf/s2-migration-contextual-help branch from 3bdff09 to 1850227 Compare June 9, 2025 20:11
@cdransf cdransf changed the title WIP(contextual-help): S2 migration feat(contextual-help): S2 migration Jun 9, 2025
@cdransf cdransf force-pushed the cdransf/s2-migration-contextual-help branch from de08037 to 57323f8 Compare June 9, 2025 23:00
@cdransf cdransf marked this pull request as ready for review June 10, 2025 19:38
@cdransf cdransf force-pushed the cdransf/s2-migration-contextual-help branch from c56c432 to f237622 Compare June 10, 2025 19:39
@cdransf cdransf added ready-for-review and removed wip This is a work in progress, don't judge. labels Jun 10, 2025
@cdransf cdransf force-pushed the cdransf/s2-migration-contextual-help branch from f237622 to 40e2b6b Compare June 10, 2025 21:40
Copy link
Collaborator

@castastrophe castastrophe left a comment

Choose a reason for hiding this comment

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

This looking great. Well documented and thanks for the storybook clean-up. I left one small suggestion about how we document high contrast hooks.

Comment on lines +22 to +27
--spectrum-contextual-help-body-sans-serif-font-family: var(--spectrum-sans-font-family-stack);
--spectrum-contextual-help-body-sans-serif-font-weight: var(--spectrum-body-sans-serif-font-weight);
--spectrum-contextual-help-body-sans-serif-font-style: var(--spectrum-body-sans-serif-font-style);
--spectrum-contextual-help-body-line-height: var(--spectrum-line-height-200);

--spectrum-contextual-help-body-color: var(--spectrum-body-color);
Copy link
Collaborator

Choose a reason for hiding this comment

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

That's so funny this ties right into our conversation this morning in backlog grooming! I think this makes a lot of sense here for now but I am interested in exploring more how typography can inherit better from the cascade without requiring so much intervention.

Copy link
Member Author

Choose a reason for hiding this comment

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

Agreed — it struck me as being quite verbose. I'd love something simpler. ✨

@cdransf cdransf force-pushed the cdransf/s2-migration-contextual-help branch from 40e2b6b to 347868e Compare June 11, 2025 18:58
@cdransf cdransf force-pushed the cdransf/s2-migration-contextual-help branch from 1bceda1 to 75a08f1 Compare June 12, 2025 17:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review size-5 L ~30-42hrs; lots of effort or complexity, most of a sprint needed to complete. skip_vrt Add to a PR to skip running VRT (but still pass the action)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants