Skip to content
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

Support icon in Select #1289

Merged
merged 8 commits into from
Feb 23, 2023
Merged

Support icon in Select #1289

merged 8 commits into from
Feb 23, 2023

Conversation

tesk9
Copy link
Contributor

@tesk9 tesk9 commented Feb 22, 2023

Context

Fixes A11-2310
Fixes #1264

🖼️ What does this change look like?

Screen Shot 2023-02-22 at 2 55 31 PM

Screen Shot 2023-02-22 at 2 55 02 PM

Screen Shot 2023-02-22 at 2 55 13 PM

cc @NoRedInk/design

Component completion checklist

  • I've gone through the relevant sections of the Development Accessibility guide with the changes I made to this component in mind
  • Changes are clearly documented
    • Component docs include a changelog
    • Any new exposed functions or properties have docs
  • Changes extend to the Component Catalog
    • The Component Catalog is updated to use the newest version, if appropriate
    • The Component Catalog example version number is updated, if appropriate
    • Any new customizations are available from the Component Catalog
    • The component example still has:
      • an accurate preview
      • valid sample code
      • correct keyboard behavior
      • correct and comprehensive guidance around how to use the component
  • Changes to the component are tested/the new version of the component is tested
  • Component API follows standard patterns in noredink-ui
    • e.g., as a dev, I can conveniently add an nriDescription
    • and adding a new feature to the component will not require major API changes to the comopnent

@linear
Copy link

linear bot commented Feb 22, 2023

@tesk9 tesk9 requested a review from charbelrami February 22, 2023 22:04
@bendansby
Copy link
Contributor

Ahh I love it, thank you! I was thinking about asking to make the icon azure, but first I double checked what we have for Menu, which in noredink-ui is the same as here (current color/gray20), but in the monolith is azure.

image

image

image

Do you know why the discrepancy?

@tesk9
Copy link
Contributor Author

tesk9 commented Feb 22, 2023

It looks like in the monolith, we're explicitly setting the icon color to azure for each menu trigger.

I don't remember why, in Menu.V4, I didn't make the icon color automatically azure -- maybe I was worried about it being hard to override? or something? I don't know. Or maybe I thought there was some case where it wasn't supposed to be azure? Or maybe it's just the text color is supposed to be black, and so it's tricky API-wise to get the svg to be azure? That's probably it -- tricky, from the API standpoint, to get the text color to be black and the icon color to be azure, since that's not a unique button theme.

Clearly, I should address that as a problem though, since I confused myself on this PR and thought the icon was supposed to be black!

@tesk9
Copy link
Contributor Author

tesk9 commented Feb 22, 2023

image

Azure looks nicer!

@bendansby
Copy link
Contributor

Great, let's go with that!

Copy link
Contributor

@charbelrami charbelrami left a comment

Choose a reason for hiding this comment

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

Looks good!

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.

Add optional icon for Nri.Ui.Select
3 participants