Skip to content

Conversation

@reidbarber
Copy link
Member

Adds Colors to the search menu.

Open to feedback on if/how we want this implemented. IMO its a good addition to the "Resources" section of the search menu. We could also possibly link to the style macro docs here too.

✅ 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:

@LFDanLu
Copy link
Member

LFDanLu commented Nov 10, 2025

Copy link
Member

@snowystinger snowystinger left a comment

Choose a reason for hiding this comment

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

nice, pretty easy to use

], []);

return (
<Skeleton isLoading>
Copy link
Member

Choose a reason for hiding this comment

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

does it need a skeleton? what's it loading?

{mockSections.map(section => (
<div key={section.id} className={style({display: 'flex', flexDirection: 'column', gap: 8})}>
<Heading styles={style({font: 'heading-sm'})}>{section.name}</Heading>
<Virtualizer layout={GridLayout} layoutOptions={{minItemSize: new Size(100, 100), maxItemSize: new Size(100, 100), minSpace: new Size(12, 24), preserveAspectRatio: true}}>
Copy link
Member

Choose a reason for hiding this comment

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

it'd be nice if the items were a little smaller with a little more space between each other i think

];

const itemStyle = style({
...focusRing(),
Copy link
Member

Choose a reason for hiding this comment

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

the items need more padding between each other because the focus rings:

Image

);
}

function SkeletonColorItem({item}: {item: {id: string}}) {
Copy link
Member

Choose a reason for hiding this comment

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

Not sure how i can get these skeletons to appear, I've tried throttling but once you get access to the search menu the icons already seem to be loaded

size: 20,
borderRadius: 'sm',
borderWidth: 1,
borderColor: 'gray-1000/15',
Copy link
Member

Choose a reason for hiding this comment

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

TIL

return (
<div className={style({display: 'flex', alignItems: 'center', justifyContent: 'center', gap: 4})}>
<InfoCircle styles={iconStyle({size: 'XS'})} />
<span className={style({font: 'ui'})}>Press a color to copy its name</span>
Copy link
Member

Choose a reason for hiding this comment

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

would be nice to also have a link to the style macro reference when that is also merged

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants