Skip to content

feat(icons)!: s2 icons - use latest workflow and ui icon sets #3001

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

Merged
merged 14 commits into from
Feb 18, 2025

Conversation

jawinn
Copy link
Collaborator

@jawinn jawinn commented Aug 16, 2024

Description

Uses and updates to the latest icon sets for S2.

🚨 This is a breaking change.

CSS-1096, CSS-1115, and CSS-1116

Workflow icons

Uses the latest version of this package. There is a large difference between the set of icons available for S1 and S2. These differences are documented separately from this work.

UI icons

Updates the ui-icons package with the latest set of icons. This includes deprecations and some new icons. See the change set in this PR for a full list of changes.

The UI icons no longer contain both a medium and a large SVG asset. The file structure and loading have been changed to use the single asset.

Icon component CSS

  • Now makes use of custom property for color --iconPrimary that comes along with some of the SVGs
  • .spectrum-UIIcon--medium and .spectrum-UIIcon--large classes are removed. These were previously used for the "combined" assets that no longer exist.

Icon component storybook and template updates

This PR cleans up some of the Icon template logic and utilities with some refactoring. Some of the logic has been split out into documented utility functions such as cleanWorkflowIconName and getSpriteSheetName. Additional documentation has been added throughout to make the code easier to understand.

Two stories are added that show all of the icons for in each icon set. Additional templates for displaying and testing the different icon sets have also been added. This includes a grid with sizing numbers in the Default story Chromatic template that displays UI icons. See screenshots below.

The useRef control is no longer hidden, to allow for testing both ways of rendering.

Follow-up to-do work / known issues:

The following follow-up issues have been created:

  • CSS-1115: S2 Icons Follow-up: missing UI icon tokens and classes
    Now completed in this PR. UI icons that are not yet used within designs (and don't have their associated tokens) were decided to be excluded for now.
  • CSS-1116: S2 Icons Follow-up: how to handle 22x20 icons
    Now completed in this PR. There were a handful of oddly sized and named icons within the workflow icons package, that have "22x20" in their names. This sizing did not match workflow sizing tokens and documentation. It was decided to exclude these icons for the time being, as they are not currently handled within the design system. Within this PR, those icons are excluded from the Icon Loader and from the generated list of icons within Storybook.
  • ⏭️ CSS-1117: S2 Icons Follow-up: Remove fallback for UI Icon sizing number
    Will be worked on after this PR merges. This is best as separate work as there are other components that will need changes to their Storybook templates. Expect the "Fallback UI Icon sizing number" section of the Icon template.js code to be removed as part of this.
  • 🐛 Opened Issue 45 - MediaOffline ID and file name does not match naming convention
    There is one workflow icon that is not rendering ("MediaOffline").

Note on Branch History

This branch started as a rebased and updated version of Cassondra's initial work in #2836 that

  • Resolved major differences between main and the s2 icons branch after rebase.
  • Added additional error handling and logging.
  • Fixed a few issues with UI icons rendering the wrong size, some missing S1 icons, and sorting.

Additional refactoring, cleanup, new utility functions, and more have been added since then. Workflow icons have also been updated to the latest v4.0.0.

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

  • Review new UI icons story [@castastrophe]
  • Review new Workflow icons story [@castastrophe]
  • Workflow icons with "22x20" in their names are not appearing in Storybook (rendered workflow icons story or control to select from list of workflow icons) [@castastrophe]
  • Review Chromatic / testing preview template [@castastrophe]
  • Test rendering of icons with useRef true. Icon rendered should have a <use> pointed to the sprite sheet. [@castastrophe]
  • Test rendering of icons with useRef false. Icon rendered should have the actual SVG file markup inserted. [@castastrophe]
  • Test the Icon default story, and that its selection of icon set and icon name is working. [@castastrophe]
  • Click through a handful of additional components to confirm that they are still displaying icons. [@castastrophe]

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

Default story's updated Chromatic template (testing preview):
Screenshot 2025-02-13 at 12 53 05 PM

Story: list of workflow icons:
Screenshot 2024-09-19 at 11 37 18 AM

Story: list of UI icons:
Screenshot 2024-09-19 at 11 37 42 AM

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

@jawinn jawinn added the wip This is a work in progress, don't judge. label Aug 16, 2024
Copy link

changeset-bot bot commented Aug 16, 2024

🦋 Changeset detected

Latest commit: 82080bd

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

This PR includes changesets to release 57 packages
Name Type
@spectrum-css/preview Major
@spectrum-css/ui-icons Major
@spectrum-css/icon Major
@spectrum-css/accordion Major
@spectrum-css/actionbutton Major
@spectrum-css/actionmenu Major
@spectrum-css/alertbanner Major
@spectrum-css/alertdialog Major
@spectrum-css/assetlist Major
@spectrum-css/badge Major
@spectrum-css/breadcrumb Major
@spectrum-css/button Major
@spectrum-css/card Major
@spectrum-css/checkbox Major
@spectrum-css/clearbutton Major
@spectrum-css/closebutton Major
@spectrum-css/dropindicator Major
@spectrum-css/fieldlabel Major
@spectrum-css/helptext Major
@spectrum-css/infieldbutton Major
@spectrum-css/inlinealert Major
@spectrum-css/menu Major
@spectrum-css/miller Major
@spectrum-css/pagination Major
@spectrum-css/picker Major
@spectrum-css/pickerbutton Major
@spectrum-css/radio Major
@spectrum-css/rating Major
@spectrum-css/search Major
@spectrum-css/sidenav Major
@spectrum-css/steplist Major
@spectrum-css/stepper Major
@spectrum-css/table Major
@spectrum-css/tabs Major
@spectrum-css/tag Major
@spectrum-css/toast Major
@spectrum-css/tooltip Major
@spectrum-css/tray Major
@spectrum-css/treeview Major
@spectrum-css/actiongroup Major
@spectrum-css/calendar Major
@spectrum-css/coachmark Major
@spectrum-css/contextualhelp Major
@spectrum-css/dropzone Major
@spectrum-css/popover Major
@spectrum-css/buttongroup Major
@spectrum-css/dialog Major
@spectrum-css/assetcard Major
@spectrum-css/fieldgroup Major
@spectrum-css/actionbar Major
@spectrum-css/progressbar Major
@spectrum-css/textfield Major
@spectrum-css/combobox Major
@spectrum-css/datepicker Major
@spectrum-css/slider Major
@spectrum-css/taggroup Major
@spectrum-css/meter 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

Copy link
Contributor

github-actions bot commented Aug 16, 2024

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

Copy link
Contributor

github-actions bot commented Aug 16, 2024

File metrics

Summary

Total size: 1.42 MB*
Total change (Δ): 🔴 ⬆ 0.03 KB (0.00%)

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

Package Size Minified Gzipped Δ
icon 11.41 KB - - 🔴 ⬆ 0.03 KB

File change details

icon

Filename Head Minified Gzipped Compared to base
index.css 11.41 KB - - 🔴 ⬆ 0.03 KB
metadata.json 5.77 KB - - 🟢 ⬇ 0.21 KB

ui-icons

Filename Head Minified Gzipped Compared to base
icons.json 0.66 KB - - 🆕 0.66 KB
spectrum-css-icons.svg 10.08 KB - - 🟢 ⬇ 13.58 KB
svg/Arrow100.svg 0.56 KB - - 🆕 0.56 KB
svg/Arrow400.svg 0.35 KB - - 🆕 0.35 KB
svg/Asterisk100.svg 0.58 KB - - 🆕 0.58 KB
svg/Asterisk200.svg 0.58 KB - - 🆕 0.58 KB
svg/Asterisk300.svg 0.60 KB - - 🆕 0.60 KB
svg/Checkmark100.svg 0.29 KB - - 🆕 0.29 KB
svg/Checkmark200.svg 0.33 KB - - 🆕 0.33 KB
svg/Checkmark300.svg 0.36 KB - - 🆕 0.36 KB
svg/Checkmark400.svg 0.33 KB - - 🆕 0.33 KB
svg/Checkmark50.svg 0.31 KB - - 🆕 0.31 KB
svg/Checkmark75.svg 0.31 KB - - 🆕 0.31 KB
svg/Chevron100.svg 0.51 KB - - 🆕 0.51 KB
svg/Chevron200.svg 0.41 KB - - 🆕 0.41 KB
svg/Chevron300.svg 0.30 KB - - 🆕 0.30 KB
svg/Chevron400.svg 0.29 KB - - 🆕 0.29 KB
svg/Chevron50.svg 0.34 KB - - 🆕 0.34 KB
svg/Chevron75.svg 0.28 KB - - 🆕 0.28 KB
svg/CornerTriangle100.svg 0.25 KB - - 🆕 0.25 KB
svg/CornerTriangle200.svg 0.25 KB - - 🆕 0.25 KB
svg/CornerTriangle300.svg 0.26 KB - - 🆕 0.26 KB
svg/CornerTriangle75.svg 0.25 KB - - 🆕 0.25 KB
svg/Cross100.svg 0.36 KB - - 🆕 0.36 KB
svg/Cross200.svg 0.36 KB - - 🆕 0.36 KB
svg/Cross300.svg 0.36 KB - - 🆕 0.36 KB
svg/Cross400.svg 0.36 KB - - 🆕 0.36 KB
svg/Cross500.svg 0.38 KB - - 🆕 0.38 KB
svg/Cross600.svg 0.36 KB - - 🆕 0.36 KB
svg/Cross75.svg 0.34 KB - - 🆕 0.34 KB
svg/Dash100.svg 0.20 KB - - 🆕 0.20 KB
svg/Dash200.svg 0.23 KB - - 🆕 0.23 KB
svg/Dash300.svg 0.23 KB - - 🆕 0.23 KB
svg/Dash50.svg 0.23 KB - - 🆕 0.23 KB
svg/Dash75.svg 0.22 KB - - 🆕 0.22 KB
combined/Arrow100.svg 🚨 deleted/moved - - ⬇ 0.51 KB (NaN%)
combined/Arrow200.svg 🚨 deleted/moved - - ⬇ 0.50 KB (NaN%)
combined/Arrow300.svg 🚨 deleted/moved - - ⬇ 0.51 KB (NaN%)
combined/Arrow400.svg 🚨 deleted/moved - - ⬇ 0.60 KB (NaN%)
combined/Arrow500.svg 🚨 deleted/moved - - ⬇ 0.51 KB (NaN%)
combined/Arrow600.svg 🚨 deleted/moved - - ⬇ 0.53 KB (NaN%)
combined/Arrow75.svg 🚨 deleted/moved - - ⬇ 0.48 KB (NaN%)
combined/Asterisk100.svg 🚨 deleted/moved - - ⬇ 1.01 KB (NaN%)
combined/Asterisk200.svg 🚨 deleted/moved - - ⬇ 1.01 KB (NaN%)
combined/Asterisk300.svg 🚨 deleted/moved - - ⬇ 1.03 KB (NaN%)
combined/Asterisk75.svg 🚨 deleted/moved - - ⬇ 1.01 KB (NaN%)
combined/Checkmark100.svg 🚨 deleted/moved - - ⬇ 0.45 KB (NaN%)
combined/Checkmark200.svg 🚨 deleted/moved - - ⬇ 0.49 KB (NaN%)
combined/Checkmark300.svg 🚨 deleted/moved - - ⬇ 0.50 KB (NaN%)
combined/Checkmark400.svg 🚨 deleted/moved - - ⬇ 0.50 KB (NaN%)
combined/Checkmark50.svg 🚨 deleted/moved - - ⬇ 0.48 KB (NaN%)
combined/Checkmark500.svg 🚨 deleted/moved - - ⬇ 0.50 KB (NaN%)
combined/Checkmark600.svg 🚨 deleted/moved - - ⬇ 0.51 KB (NaN%)
combined/Checkmark75.svg 🚨 deleted/moved - - ⬇ 0.47 KB (NaN%)
combined/Chevron100.svg 🚨 deleted/moved - - ⬇ 0.46 KB (NaN%)
combined/Chevron200.svg 🚨 deleted/moved - - ⬇ 0.45 KB (NaN%)
combined/Chevron300.svg 🚨 deleted/moved - - ⬇ 0.48 KB (NaN%)
combined/Chevron400.svg 🚨 deleted/moved - - ⬇ 0.46 KB (NaN%)
combined/Chevron50.svg 🚨 deleted/moved - - ⬇ 0.47 KB (NaN%)
combined/Chevron500.svg 🚨 deleted/moved - - ⬇ 0.46 KB (NaN%)
combined/Chevron600.svg 🚨 deleted/moved - - ⬇ 0.48 KB (NaN%)
combined/Chevron75.svg 🚨 deleted/moved - - ⬇ 0.45 KB (NaN%)
combined/CornerTriangle100.svg 🚨 deleted/moved - - ⬇ 0.39 KB (NaN%)
combined/CornerTriangle200.svg 🚨 deleted/moved - - ⬇ 0.40 KB (NaN%)
combined/CornerTriangle300.svg 🚨 deleted/moved - - ⬇ 0.38 KB (NaN%)
combined/CornerTriangle75.svg 🚨 deleted/moved - - ⬇ 0.38 KB (NaN%)
combined/Cross100.svg 🚨 deleted/moved - - ⬇ 0.54 KB (NaN%)
combined/Cross200.svg 🚨 deleted/moved - - ⬇ 0.52 KB (NaN%)
combined/Cross300.svg 🚨 deleted/moved - - ⬇ 0.55 KB (NaN%)
combined/Cross400.svg 🚨 deleted/moved - - ⬇ 0.54 KB (NaN%)
combined/Cross500.svg 🚨 deleted/moved - - ⬇ 0.54 KB (NaN%)
combined/Cross600.svg 🚨 deleted/moved - - ⬇ 0.56 KB (NaN%)
combined/Cross75.svg 🚨 deleted/moved - - ⬇ 0.50 KB (NaN%)
combined/Dash100.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
combined/Dash200.svg 🚨 deleted/moved - - ⬇ 0.31 KB (NaN%)
combined/Dash300.svg 🚨 deleted/moved - - ⬇ 0.30 KB (NaN%)
combined/Dash400.svg 🚨 deleted/moved - - ⬇ 0.30 KB (NaN%)
combined/Dash50.svg 🚨 deleted/moved - - ⬇ 0.30 KB (NaN%)
combined/Dash500.svg 🚨 deleted/moved - - ⬇ 0.31 KB (NaN%)
combined/Dash600.svg 🚨 deleted/moved - - ⬇ 0.31 KB (NaN%)
combined/Dash75.svg 🚨 deleted/moved - - ⬇ 0.27 KB (NaN%)
combined/DoubleGripper.svg 🚨 deleted/moved - - ⬇ 0.43 KB (NaN%)
combined/SingleGripper.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
combined/TripleGripper.svg 🚨 deleted/moved - - ⬇ 0.59 KB (NaN%)
large/Arrow100.svg 🚨 deleted/moved - - ⬇ 0.27 KB (NaN%)
large/Arrow200.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
large/Arrow300.svg 🚨 deleted/moved - - ⬇ 0.27 KB (NaN%)
large/Arrow400.svg 🚨 deleted/moved - - ⬇ 0.37 KB (NaN%)
large/Arrow500.svg 🚨 deleted/moved - - ⬇ 0.27 KB (NaN%)
large/Arrow600.svg 🚨 deleted/moved - - ⬇ 0.27 KB (NaN%)
large/Arrow75.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
large/Asterisk100.svg 🚨 deleted/moved - - ⬇ 0.52 KB (NaN%)
large/Asterisk200.svg 🚨 deleted/moved - - ⬇ 0.53 KB (NaN%)
large/Asterisk300.svg 🚨 deleted/moved - - ⬇ 0.54 KB (NaN%)
large/Asterisk75.svg 🚨 deleted/moved - - ⬇ 0.50 KB (NaN%)
large/Checkmark100.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
large/Checkmark200.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
large/Checkmark300.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
large/Checkmark400.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
large/Checkmark50.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
large/Checkmark500.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
large/Checkmark600.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
large/Checkmark75.svg 🚨 deleted/moved - - ⬇ 0.24 KB (NaN%)
large/Chevron100.svg 🚨 deleted/moved - - ⬇ 0.24 KB (NaN%)
large/Chevron200.svg 🚨 deleted/moved - - ⬇ 0.24 KB (NaN%)
large/Chevron300.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
large/Chevron400.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
large/Chevron50.svg 🚨 deleted/moved - - ⬇ 0.22 KB (NaN%)
large/Chevron500.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
large/Chevron600.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
large/Chevron75.svg 🚨 deleted/moved - - ⬇ 0.24 KB (NaN%)
large/CornerTriangle100.svg 🚨 deleted/moved - - ⬇ 0.20 KB (NaN%)
large/CornerTriangle200.svg 🚨 deleted/moved - - ⬇ 0.20 KB (NaN%)
large/CornerTriangle300.svg 🚨 deleted/moved - - ⬇ 0.18 KB (NaN%)
large/CornerTriangle75.svg 🚨 deleted/moved - - ⬇ 0.19 KB (NaN%)
large/Cross100.svg 🚨 deleted/moved - - ⬇ 0.28 KB (NaN%)
large/Cross200.svg 🚨 deleted/moved - - ⬇ 0.27 KB (NaN%)
large/Cross300.svg 🚨 deleted/moved - - ⬇ 0.29 KB (NaN%)
large/Cross400.svg 🚨 deleted/moved - - ⬇ 0.28 KB (NaN%)
large/Cross500.svg 🚨 deleted/moved - - ⬇ 0.28 KB (NaN%)
large/Cross600.svg 🚨 deleted/moved - - ⬇ 0.28 KB (NaN%)
large/Cross75.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
large/Dash100.svg 🚨 deleted/moved - - ⬇ 0.15 KB (NaN%)
large/Dash200.svg 🚨 deleted/moved - - ⬇ 0.16 KB (NaN%)
large/Dash300.svg 🚨 deleted/moved - - ⬇ 0.16 KB (NaN%)
large/Dash400.svg 🚨 deleted/moved - - ⬇ 0.16 KB (NaN%)
large/Dash50.svg 🚨 deleted/moved - - ⬇ 0.16 KB (NaN%)
large/Dash500.svg 🚨 deleted/moved - - ⬇ 0.16 KB (NaN%)
large/Dash600.svg 🚨 deleted/moved - - ⬇ 0.16 KB (NaN%)
large/Dash75.svg 🚨 deleted/moved - - ⬇ 0.14 KB (NaN%)
large/DoubleGripper.svg 🚨 deleted/moved - - ⬇ 0.24 KB (NaN%)
large/SingleGripper.svg 🚨 deleted/moved - - ⬇ 0.15 KB (NaN%)
large/TripleGripper.svg 🚨 deleted/moved - - ⬇ 0.34 KB (NaN%)
medium/Arrow100.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
medium/Arrow200.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
medium/Arrow300.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
medium/Arrow400.svg 🚨 deleted/moved - - ⬇ 0.24 KB (NaN%)
medium/Arrow500.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
medium/Arrow600.svg 🚨 deleted/moved - - ⬇ 0.27 KB (NaN%)
medium/Arrow75.svg 🚨 deleted/moved - - ⬇ 0.24 KB (NaN%)
medium/Asterisk100.svg 🚨 deleted/moved - - ⬇ 0.49 KB (NaN%)
medium/Asterisk200.svg 🚨 deleted/moved - - ⬇ 0.51 KB (NaN%)
medium/Asterisk300.svg 🚨 deleted/moved - - ⬇ 0.52 KB (NaN%)
medium/Asterisk75.svg 🚨 deleted/moved - - ⬇ 0.52 KB (NaN%)
medium/Checkmark100.svg 🚨 deleted/moved - - ⬇ 0.21 KB (NaN%)
medium/Checkmark200.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
medium/Checkmark300.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
medium/Checkmark400.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
medium/Checkmark50.svg 🚨 deleted/moved - - ⬇ 0.24 KB (NaN%)
medium/Checkmark500.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
medium/Checkmark600.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
medium/Checkmark75.svg 🚨 deleted/moved - - ⬇ 0.23 KB (NaN%)
medium/Chevron100.svg 🚨 deleted/moved - - ⬇ 0.23 KB (NaN%)
medium/Chevron200.svg 🚨 deleted/moved - - ⬇ 0.21 KB (NaN%)
medium/Chevron300.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
medium/Chevron400.svg 🚨 deleted/moved - - ⬇ 0.23 KB (NaN%)
medium/Chevron50.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
medium/Chevron500.svg 🚨 deleted/moved - - ⬇ 0.22 KB (NaN%)
medium/Chevron600.svg 🚨 deleted/moved - - ⬇ 0.24 KB (NaN%)
medium/Chevron75.svg 🚨 deleted/moved - - ⬇ 0.22 KB (NaN%)
medium/CornerTriangle100.svg 🚨 deleted/moved - - ⬇ 0.19 KB (NaN%)
medium/CornerTriangle200.svg 🚨 deleted/moved - - ⬇ 0.20 KB (NaN%)
medium/CornerTriangle300.svg 🚨 deleted/moved - - ⬇ 0.20 KB (NaN%)
medium/CornerTriangle75.svg 🚨 deleted/moved - - ⬇ 0.19 KB (NaN%)
medium/Cross100.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
medium/Cross200.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
medium/Cross300.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
medium/Cross400.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
medium/Cross500.svg 🚨 deleted/moved - - ⬇ 0.27 KB (NaN%)
medium/Cross600.svg 🚨 deleted/moved - - ⬇ 0.29 KB (NaN%)
medium/Cross75.svg 🚨 deleted/moved - - ⬇ 0.25 KB (NaN%)
medium/Dash100.svg 🚨 deleted/moved - - ⬇ 0.12 KB (NaN%)
medium/Dash200.svg 🚨 deleted/moved - - ⬇ 0.16 KB (NaN%)
medium/Dash300.svg 🚨 deleted/moved - - ⬇ 0.15 KB (NaN%)
medium/Dash400.svg 🚨 deleted/moved - - ⬇ 0.15 KB (NaN%)
medium/Dash50.svg 🚨 deleted/moved - - ⬇ 0.15 KB (NaN%)
medium/Dash500.svg 🚨 deleted/moved - - ⬇ 0.16 KB (NaN%)
medium/Dash600.svg 🚨 deleted/moved - - ⬇ 0.16 KB (NaN%)
medium/Dash75.svg 🚨 deleted/moved - - ⬇ 0.14 KB (NaN%)
medium/DoubleGripper.svg 🚨 deleted/moved - - ⬇ 0.20 KB (NaN%)
medium/SingleGripper.svg 🚨 deleted/moved - - ⬇ 0.12 KB (NaN%)
medium/TripleGripper.svg 🚨 deleted/moved - - ⬇ 0.26 KB (NaN%)
spectrum-css-icons-large.svg 🚨 deleted/moved - - ⬇ 12.13 KB (NaN%)
spectrum-css-icons-medium.svg 🚨 deleted/moved - - ⬇ 11.44 KB (NaN%)
* 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.

@jawinn jawinn force-pushed the refactor-s2-icons-workflow-and-ui-v2 branch from 988aa3a to 420eb92 Compare August 16, 2024 20:17
@Rajdeepc
Copy link
Collaborator

@jawinn Can we do a dry run in SWC?

@jawinn
Copy link
Collaborator Author

jawinn commented Aug 19, 2024

@jawinn Can we do a dry run in SWC?

This was a part of the foundations tasks for the followup #3007 . If you need anything else for that, let me know in the Foundations channel, Jira issue, or Foundations Slack list.

@Rajdeepc
Copy link
Collaborator

Rajdeepc commented Aug 20, 2024

#3007

Typically we don't import @adobe/spectrum-tokens as a package in SWC. The icons in SWC are served separately via @spectrum-css/ui-icons and @adobe/spectrum-css-workflow-icons packages. So for the above S2 inheritance do you feel you can surface up some assets so that we can generate S2 icons on our end and test?

@jawinn jawinn force-pushed the refactor-s2-icons-workflow-and-ui-v2 branch 3 times, most recently from 1c4f08b to 8ddbce0 Compare September 19, 2024 19:44
@jawinn
Copy link
Collaborator Author

jawinn commented Sep 19, 2024

I've made a bunch of updates here to help prepare this for going into foundations:

  • Squashed the commits, to remove some of the noise from after the rebase that wasn't necessary to see
  • Fixed an issue with icon's Chromatic template grids due to <br> tags coming from Typography. They're now wrapped in a div to maintain the grid layout.
  • Added a more thorough PR description, with screenshots
  • Added changesets for icon and preview (Storybook)

@jawinn jawinn changed the title feat(icons): s2 icons (workflow + ui) v2 feat(icons)!: s2 icons (workflow + ui) v2 Oct 8, 2024
@jawinn jawinn force-pushed the refactor-s2-icons-workflow-and-ui-v2 branch from 8ddbce0 to c9694a0 Compare October 8, 2024 19:43
@castastrophe castastrophe changed the base branch from main to s2-foundations-redux December 3, 2024 23:58
@castastrophe castastrophe force-pushed the refactor-s2-icons-workflow-and-ui-v2 branch from c9694a0 to 6b70fd9 Compare December 4, 2024 00:06
@castastrophe castastrophe force-pushed the s2-foundations-redux branch 4 times, most recently from d29eaf2 to eb20c09 Compare December 4, 2024 03:41
@castastrophe castastrophe force-pushed the s2-foundations-redux branch 3 times, most recently from 2eebf01 to 711d4cd Compare December 16, 2024 23:49
@castastrophe castastrophe force-pushed the s2-foundations-redux branch 2 times, most recently from c56b926 to 79eb129 Compare December 29, 2024 18:29
@castastrophe castastrophe force-pushed the s2-foundations-redux branch 3 times, most recently from 9c3a625 to d6c8c69 Compare January 6, 2025 18:47
jawinn and others added 14 commits February 18, 2025 09:52
Uses and updates to the latest icon sets for S2.

==== Workflow icons ====
Uses the latest version of this package. There is a large difference
between the set of icons available for S1 and S2. These differences are
documented separately from this work.

==== UI icons ====
Updates the ui-icons package with the latest set of icons. This includes
deprecations and some new icons. See the change log for a full list of
changes.

The UI icons no longer contain both a medium and a large SVG asset. The
file structure and loading have been changed to use the single asset.

Co-authored-by: [ Cassondra ] <castastrophe@users.noreply.github.com>
Previous work has updated components to provide the icon set. Removes
code that tries to determine which icon set an icon is in, if the icon
set was not provided.
Clean up and simplify some logic in the icon template and make sure
missing SVG data string is logged as a warning.
- Fixes issue with loading icons when useRef is false, with improved
  warning logging.
- Fixes issue with some sprite sheet icons not loading with v4.0. Adds
  some new utility functions such as getSpriteSheetName to clarify and
  fix some of the logic associated with generated the sprite sheet ID.
- Refactors and cleans up some more of the template logic.
The ui-icons dist folder contains all the SVGs which are committed.
Some of the new UI icons pulled in are currently not used and do not
have tokens for their sizing available yet. It was decided in
discussions between engineering and design teams to exclude these until
they are needed. Otherwise they would be incorrectly sized with the
missing tokens and associated individual UI icon classes.

CSS-1115
It was decided to hide these new 22x20 icons which are exceptions to the
current sizing of workflow icons. They are not yet handled within the
design system. This only affects a handful of icons with names starting
with "CloudState".

CSS-1116
Removes the need for fetchIconDetails; it was processing and returning
data that we already had access to through utilities, and a few parts
of it were refactored out into different places.

- The list of ui icon sizes was moved into its own utility function.
- The processing that changes the keys of the IconLoader from file names
  to icon names now happens within the loader itself, so that processing
  only needs to be done once.

The templates now all properly pass along context, so they are able to
access the global loader icon data that lives in context.loaded.icons .

The loader icon data also being stored in window.icons was removed, as
it is no longer needed after the context fixes. This should help
performance by not storing this in two places.
The fill color control now works when the useRef control is false.
Also adds two more icons to VRTs that have elements with varying
opacities.
- Use dynamic number of columns for icon list stories.
- Remove ui and workflow icon list stories from chromatic. All UI icons
  are already in the Default story and we do not need to capture all
  workflow icons.
- add figma design link to icon in storybook
- refactor: use Container in icon tests template
- small formatting adjustments to icon docs, including added subheadings
@castastrophe castastrophe force-pushed the refactor-s2-icons-workflow-and-ui-v2 branch from 37db4d3 to 82080bd Compare February 18, 2025 14:52
Copy link
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

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

Looks great! Let's get these icons in!

@jawinn jawinn merged commit 545df43 into spectrum-two Feb 18, 2025
14 checks passed
@jawinn jawinn deleted the refactor-s2-icons-workflow-and-ui-v2 branch February 18, 2025 20:12
@jawinn jawinn removed run_vrt For use on PRs looking to kick off VRT ready-for-review labels Feb 24, 2025
castastrophe pushed a commit that referenced this pull request Feb 24, 2025
* feat(icon): updated s2 icons - workflow and ui

Uses and updates to the latest icon sets for S2.

==== Workflow icons ====
Uses the latest version of this package. There is a large difference
between the set of icons available for S1 and S2. These differences are
documented separately from this work.

==== UI icons ====
Updates the ui-icons package with the latest set of icons. This includes
deprecations and some new icons. See the change log for a full list of
changes.

The UI icons no longer contain both a medium and a large SVG asset. The
file structure and loading have been changed to use the single asset.

Co-authored-by: [ Cassondra ] <castastrophe@users.noreply.github.com>

Also includes:
* build(storybook): use latest 4.0.0 version of workflow icons
* feat(icon): remove guessing of icon set if not provided
* refactor(icon): refactors, cleans up, and documents template logic and utilities
* feat(icon): exclude new ui icons not yet ready for production (CSS-1115)
* feat(icon): exclude 22x20 workflow icons (CSS-1116)
castastrophe pushed a commit that referenced this pull request Feb 24, 2025
* feat(icon): updated s2 icons - workflow and ui

Uses and updates to the latest icon sets for S2.

==== Workflow icons ====
Uses the latest version of this package. There is a large difference
between the set of icons available for S1 and S2. These differences are
documented separately from this work.

==== UI icons ====
Updates the ui-icons package with the latest set of icons. This includes
deprecations and some new icons. See the change log for a full list of
changes.

The UI icons no longer contain both a medium and a large SVG asset. The
file structure and loading have been changed to use the single asset.

Co-authored-by: [ Cassondra ] <castastrophe@users.noreply.github.com>

Also includes:
* build(storybook): use latest 4.0.0 version of workflow icons
* feat(icon): remove guessing of icon set if not provided
* refactor(icon): refactors, cleans up, and documents template logic and utilities
* feat(icon): exclude new ui icons not yet ready for production (CSS-1115)
* feat(icon): exclude 22x20 workflow icons (CSS-1116)
castastrophe pushed a commit that referenced this pull request Feb 25, 2025
* feat(icon): updated s2 icons - workflow and ui

Uses and updates to the latest icon sets for S2.

==== Workflow icons ====
Uses the latest version of this package. There is a large difference
between the set of icons available for S1 and S2. These differences are
documented separately from this work.

==== UI icons ====
Updates the ui-icons package with the latest set of icons. This includes
deprecations and some new icons. See the change log for a full list of
changes.

The UI icons no longer contain both a medium and a large SVG asset. The
file structure and loading have been changed to use the single asset.

Co-authored-by: [ Cassondra ] <castastrophe@users.noreply.github.com>

Also includes:
* build(storybook): use latest 4.0.0 version of workflow icons
* feat(icon): remove guessing of icon set if not provided
* refactor(icon): refactors, cleans up, and documents template logic and utilities
* feat(icon): exclude new ui icons not yet ready for production (CSS-1115)
* feat(icon): exclude 22x20 workflow icons (CSS-1116)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Results in a breaking API change high priority An important PR or issue requiring immediate attention S2 Spectrum 2 size-5 L ~30-42hrs; lots of effort or complexity, most of a sprint needed to complete.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants