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

[polaris.shopify.com] Convert color contrast checker to proper React component #10787

Closed
tjonx opened this issue Sep 29, 2023 · 0 comments
Closed
Assignees

Comments

@tjonx
Copy link
Contributor

tjonx commented Sep 29, 2023

Issue summary

There's a new contrast checker tool I built in this PR: #10657

But it would require to be a proper React component, as it currently does things in the DOM that are not 100% React appropriate 😅

Screen.Recording.2023-09-22.at.5.52.04.PM.1.mov

Expected behavior

The UX is correct and works well, although that component needs to be build as a proper React component

  • It would also need to consume all 13 colors (12 colors + grayscale). It's currently buggy because it uses an mjs file that is generated and due to optimizations in token usage, some unused colors are being stripped out of that file.
  • Adding the name + number of the color in a tooltip above the hovered color in the palette grid would also be a great addition.
    image

Actual behavior

The current component reaches into the DOM directly and that can lead to errors down the line.

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

No branches or pull requests

3 participants