spectrum-css icon indicating copy to clipboard operation
spectrum-css copied to clipboard

feat(tooltip): S2 migration

Open mdt2 opened this issue 1 year ago • 4 comments

Description

This migration includes updated colors, rounding, a bigger tip, and the removal of variants (only neutral is available in Spectrum 2). As a result of the deprecation of variants, icons have also been removed.

The redesign of the tip, specifically the rounding, required a reworking of how we use clip-path and transform.

Some custom property mods have been removed:

  • --mod-tooltip-background-color-informative
  • --mod-tooltip-background-color-negative
  • --mod-tooltip-background-color-positive
  • --mod-tooltip-icon-spacing-block-start
  • --mod-tooltip-icon-spacing-inline-end
  • --mod-tooltip-icon-spacing-inline-start
  • --mod-tooltip-icon-width

And one mod has been added:

  • --mod-tooltip-tip-corner-radius

How and where has this been tested?

Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.

Validation steps

  • [ ] Design review (@mdt2)
    • Specifically check on the new distance of tooltip from edge. This needed adjusted because of the new corner rounding. It looks funky when the tooltip text is only one line.
  • [x] Check out Tooltip in Storybook, specifically the testing preview will be helpful. The variants should align with the token changes in the design spec (@rise-erpelding)
  • [x] Now turn on RTL. All the tips should be in the correct place. (@rise-erpelding)
  • [x] Any controls for the deprecated variants (informative, positive, negative) have been removed from storybook (@rise-erpelding)
  • [x] Now let's spin up the docs site to check that the "show on hover" functionality is still looking good. You'll have to do this locally because of the difference in tokens package:
    • First update the site/package.json tokens version to be >=14.0.0-next.7
    • Then you can run a yarn install
    • And finally a yarn dev
    • Check on that hover functionality and make sure it's looking good
  • [x] And still in the docs site, turn on RTL and make sure the hover functionality looks good there too

Regression testing

Validate:

  1. The documentation pages for at least two other components are still loading, including:
  • [ ] The pages render correctly, are accessible, and are responsive.
  1. If components have been modified, VRTs have been run on this branch:
  • [ ] VRTs have been run and looked at.
  • [ ] Any VRT changes have been accepted (by reviewer and/or PR author), or there are no changes.

Screenshots

Screen Shot 2024-05-09 at 3 29 34 PM

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. ✨

mdt2 avatar May 09 '24 19:05 mdt2

🦋 Changeset detected

Latest commit: 47676be1df084391e3ec10d3f6ef7d3744db8dcc

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

This PR includes changesets to release 2 packages
Name Type
@spectrum-css/tooltip Major
@spectrum-css/steplist Major

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

changeset-bot[bot] avatar May 09 '24 19:05 changeset-bot[bot]

File metrics

Summary

Total size: 4.22 MB* Total change (Δ): ⬇ 11.78 KB (-0.27%)

Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.

Package Size Δ
tooltip 30.64 KB ⬇ 3.39 KB
tokens 210.08 KB ⬆ 0.14 KB

Details

tooltip

File Head Base Δ
index-base.css 30.38 KB 33.77 KB ⬇ 3.39 KB (-10.05%)
index-theme.css 0.86 KB 0.86 KB -
index-vars.css 30.64 KB 34.03 KB ⬇ 3.39 KB (-9.97%)
index.css 30.64 KB 34.03 KB ⬇ 3.39 KB (-9.97%)
metadata.json 22.17 KB 24.04 KB ⬇ 1.87 KB (-7.79%)
themes/express.css 0.73 KB 0.73 KB -
themes/spectrum.css 0.73 KB 0.73 KB -

tokens

File Head Base Δ
css/dark-vars.css 36.72 KB 36.72 KB -
css/express/custom-dark-vars.css 0.59 KB 0.59 KB -
css/express/custom-darkest-vars.css 0.59 KB 0.59 KB -
css/express/custom-large-vars.css 0.50 KB 0.50 KB -
css/express/custom-light-vars.css 0.63 KB 0.63 KB -
css/express/custom-medium-vars.css 0.48 KB 0.48 KB -
css/express/custom-vars.css 0.04 KB 0.04 KB -
css/global-vars.css 54.79 KB 54.79 KB -
css/large-vars.css 28.77 KB 28.77 KB -
css/light-vars.css 36.71 KB 36.71 KB -
css/medium-vars.css 28.70 KB 28.70 KB -
css/spectrum/custom-dark-vars.css 3.40 KB 3.40 KB -
css/spectrum/custom-darkest-vars.css 3.40 KB 3.40 KB -
css/spectrum/custom-large-vars.css 4.76 KB 4.68 KB ⬆ 0.08 KB (1.73%)
css/spectrum/custom-light-vars.css 3.40 KB 3.40 KB -
css/spectrum/custom-medium-vars.css 4.98 KB 4.92 KB ⬆ 0.06 KB (1.15%)
css/spectrum/custom-vars.css 2.18 KB 2.18 KB -
index.css 210.08 KB 209.95 KB ⬆ 0.14 KB (0.07%)
* Size determined by adding together the size of the main file for all packages in the library.
* Results are not gzipped or minified.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

github-actions[bot] avatar May 09 '24 19:05 github-actions[bot]

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

github-actions[bot] avatar May 09 '24 19:05 github-actions[bot]

@rise-erpelding great callout about the strange rotation. This was caused by trying to account for antialiasing in the clip-path. When I moved that to the positioning properties instead, this resolved 🎉

mdt2 avatar May 15 '24 17:05 mdt2