primer / prism

A tool for creating and maintaining cohesive, consistent, and accessible color palettes
https://primer.style/prism/
MIT License
671 stars 40 forks source link

Fix for selected index when switching scale #21

Closed pavelkeyzik closed 2 years ago

pavelkeyzik commented 2 years ago

This PR fixes the issue #19.

I've updated the code to check if our selected index is greater than our color scale, and if it is, then we just select the last color from the scale, but if we switch back, it will be the same selected color.

@rafaeltab Could you test it and let me know if everything works as expected? 😊

netlify[bot] commented 2 years ago

Deploy Preview for primer-prism ready!

Name Link
Latest commit 7d715606395cacf0fa3e4de5773195206fbd3336
Latest deploy log https://app.netlify.com/sites/primer-prism/deploys/62ace2096badcc000804c934
Deploy Preview https://deploy-preview-21--primer-prism.netlify.app/
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

netlify[bot] commented 2 years ago

A new user left a comment. This user must be approved by a Netlify team owner before comments can be displayed.

Approve this user

rafaeltab commented 2 years ago

I want to but I need to join Cole Bemis's before I can. I have requested access.

pavelkeyzik commented 2 years ago

Oh... Sorry! I've just realized that to test it we need the access 😄 Maybe Cole Bemis will came up with something that will allow us to test it.

colebemis commented 2 years ago

Oh... Sorry! I've just realized that to test it we need the access 😄 Maybe Cole Bemis will came up with something that will allow us to test it.

We actually switched from Netlify to GitHub Pages for deploys (still need to remove the Netlify integration 😅). I'll chat with @rezrah about how we can let contributors deploy previews of the app.

colebemis commented 2 years ago

@pavelkeyzik I'm happy to merge after the merge conflicts are resolved 👍

pavelkeyzik commented 2 years ago

@colebemis Thanks for review 😊 I've fixed merge conflicts