Skip to content

[OP-195] Icon improvements#272

Merged
Jeremy-Walton merged 9 commits intomainfrom
op-195-icon-changes-smaller-file-size-icon-font-default
Feb 12, 2025
Merged

[OP-195] Icon improvements#272
Jeremy-Walton merged 9 commits intomainfrom
op-195-icon-changes-smaller-file-size-icon-font-default

Conversation

@Jeremy-Walton
Copy link
Member

@Jeremy-Walton Jeremy-Walton commented Feb 11, 2025

Why?

In order to improve the out of the box Optics experience as well as the ease of customizing icons, changes to how the component was built were needed. Additionally some performance improvements were made to reduce initial page load time

What Changed

  • Update the API of icons to match other components and allow for easier customization
  • Add an .icon--small modifier
  • Extract .icon as a necessary class to be used in conjunction with .material-symbols-outlined. This make a clear separation from what is generally needed for an icon and what is specific for material symbols. This also sets the stage for future icon pack support.
  • Add documentation around those changes and how to override
  • Simplify the icon font import to only include the weight axis of the variable font.
  • Remove the layout shift while icons are loading
  • Make an addon to bring back in the full variable icon font to use emphasis and fill.
  • Add documentation around how to use the addon or variations of it.

Sanity Check

  • Have you updated any usage of changed tokens?
  • Have you updated the docs with any component changes?
  • Have you updated the dependency graph with any component changes?
  • Have you run linters?
  • Have you run prettier?
  • Have you tried building the css?
  • Have you tried building storybook?
  • Do you need to update the package version?

Screenshots

Screenshot 2025-02-11 at 1 54 37 PM Screenshot 2025-02-11 at 2 02 49 PM Screenshot 2025-02-11 at 2 03 15 PM

Old Icon loading

Kapture 2025-02-11 at 14 16 52

New Icon loading

Kapture 2025-02-11 at 14 15 06

@Jeremy-Walton Jeremy-Walton added Cleanup Clean up styles Breaking Change This will cause problems so be sure to indicate that in the release notes Components Changes to a component labels Feb 11, 2025
@Jeremy-Walton Jeremy-Walton self-assigned this Feb 11, 2025
@linear
Copy link

linear bot commented Feb 11, 2025

@Jeremy-Walton Jeremy-Walton mentioned this pull request Feb 11, 2025
10 tasks
@Jeremy-Walton Jeremy-Walton merged commit ac8740e into main Feb 12, 2025
1 check passed
@Jeremy-Walton Jeremy-Walton deleted the op-195-icon-changes-smaller-file-size-icon-font-default branch February 12, 2025 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Breaking Change This will cause problems so be sure to indicate that in the release notes Cleanup Clean up styles Components Changes to a component

Development

Successfully merging this pull request may close these issues.

3 participants