Skip to content

chore: Update icon sizes with new design intent - #10414

Open
snowystinger wants to merge 6 commits into
mainfrom
new-icon-sizes
Open

chore: Update icon sizes with new design intent#10414
snowystinger wants to merge 6 commits into
mainfrom
new-icon-sizes

Conversation

@snowystinger

@snowystinger snowystinger commented Aug 3, 2026

Copy link
Copy Markdown
Member

Closes

Updates from design. Testing for chromatic and checking breadth of changes. The intent of design was to have the icon match the line height of the text. This works perfectly with the widely available lh unit. I had to make a few small changes to Avatar to also support it, but overall it simplifies our code.

https://www.chromatic.com/build?appId=5f0dd5ad2b5fc10022a2e320&number=1285

The question we'll need to answer, is this breaking, from a design point of view. It's not breaking any APIs since I'm not changing how fontRelative works. I did add to our existing API for Avatar, but that should be non-breaking. The question about breaking is, does anyone use fontRelative(20) already and will it be noticeable next to our components.

✅ Pull Request Checklist:

  • Included link to corresponding React Spectrum GitHub Issue.
  • Added/updated unit tests and storybook for this change (for new code or code which already has tests).
  • Filled out test instructions.
  • Updated documentation (if it already exists for this component).
  • Looked at the Accessibility Practices for this feature - Aria Practices

📝 Test Instructions:

🧢 Your Project:

@snowystinger
snowystinger marked this pull request as ready for review August 11, 2026 03:43
@rspbot

rspbot commented Aug 11, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Aug 12, 2026

Copy link
Copy Markdown

@rspbot

rspbot commented Aug 12, 2026

Copy link
Copy Markdown
## API Changes

@react-spectrum/s2

/@react-spectrum/s2:Avatar

 Avatar {
   UNSAFE_className?: UnsafeClassName
   UNSAFE_style?: CSSProperties
   alt?: string
   id?: string
   isOverBackground?: boolean
   size?: number | number | number | number | number | number | number | number | number | number | number | number | number | number | (number & {
   
-}) = 24
+}) | `${number}lh` = 24
   slot?: string | null
   src?: string
   styles?: StylesPropWithoutWidth
 }

/@react-spectrum/s2:AvatarProps

 AvatarProps {
   UNSAFE_className?: UnsafeClassName
   UNSAFE_style?: CSSProperties
   alt?: string
   id?: string
   isOverBackground?: boolean
   size?: number | number | number | number | number | number | number | number | number | number | number | number | number | number | (number & {
   
-}) = 24
+}) | `${number}lh` = 24
   slot?: string | null
   src?: string
   styles?: StylesPropWithoutWidth
 }

@rspbot

rspbot commented Aug 12, 2026

Copy link
Copy Markdown

Agent Skills Changes

Modified (3)
Install

React Spectrum S2:

npx skills add https://d1pzu54gtk2aed.cloudfront.net/pr/4fcc6cdb7e96a4f9978aa3a387f4b1ee5be59c62/

React Aria:

npx skills add https://d5iwopk28bdhl.cloudfront.net/pr/4fcc6cdb7e96a4f9978aa3a387f4b1ee5be59c62/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants