-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Color area #2483
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
Color area #2483
Conversation
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
Build successful! 🎉 |
# Conflicts: # packages/@react-aria/color/package.json # packages/@react-stately/color/package.json
Build successful! 🎉 |
Build successful! 🎉 |
@snowystinger @majornista remind me, what was the decision regarding HSL/HSB support? I seem to remember that we decided that we didn't want to be in the business of supporting those ourselves and that users of ColorArea would need to do that themselves (maybe I'm misremembering entirely)? I ask because it would be nice to get the changes @majornista has in #2570 for translations and other fixes, but not sure about the HSL/HSB stuff included in that PR |
@LFDanLu and @snowystinger We already support HSLA and HSBA in ColorSlider, and ColorWheel serves no purpose unless used in tandem with a Saturation/Brightness or Saturation/Lightness ColorArea. The conversion functions between RGB, HSL and HSB are already there. If you look at the Color class in #2570, very little has changed: https://github.com/adobe/react-spectrum/pull/2570/files#diff-2737484a486e2634802c43f60406fc1231698480673f4268bd1e8f029448bccc. To support HSL and HSB in ColorArea, I pretty much just added support for the different gradients in https://github.com/adobe/react-spectrum/pull/2570/files#diff-08d263feb9e1ca2c72c139d45f8b86c7288be44893f75e5cf202894ad6e46150. Most of the other changes are updating stories, tests and localizations. |
alpha isn't supporting hsl/hsb yet |
Why have a beta release of ColorWheel, that only changes to Hue value, without support for HSL/HSB in ColorArea? I understand the desire to handle color conversions differently, but we are already doing all the conversions we need within @react-stately/color/src/Color.ts |
Build successful! 🎉 |
Ah, that's a good point, hmmm |
Build successful! 🎉 |
Build successful! 🎉 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, confirmed the RTL behavior and new translations work as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Tested Chrome, FF, Safari, iOS Safari
Build successful! 🎉 |
Closes #1732 Closes #1118
This splits out the basic color area from the linked PR to make it a more manageable PR to review. The other two aspects that will come in followups will be Color conversions and Color names/translations.
✅ Pull Request Checklist:
📝 Test Instructions:
🧢 Your Project: