-
Notifications
You must be signed in to change notification settings - Fork 178
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
Custom color picker #180
Custom color picker #180
Conversation
@wassgha Since you've used @dvoytenko Any thoughts on the eyedropper? It should probably only work on the canvas area, which means your prior work at ampproject/amp-wp#4024 might become more relevant again |
Hmm. Just realized we have eyedropper. So, yeah, we'll probably have to do something like that. |
assets/src/edit-story/components/colorPicker/editableHexPreview.js
Outdated
Show resolved
Hide resolved
assets/src/edit-story/components/colorPicker/editableHexPreview.js
Outdated
Show resolved
Hide resolved
ff069b4
to
d6afad9
Compare
See #263 for new issue tracking that implementation
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.
Size Change: +50 B (0%) Total Size: 234 kB
ℹ️ View Unchanged
|
Done now in 09a4dd4. There wasn't an easy way to disable it only while dragging (react-color doesn't seem to offer that), so I disabled it now generally. |
Here it is with the alpha-pointer displaying color on top of white and the other pointers displaying the color without the alpha applied. I think that works pretty well: Maybe the hue picker pointer should only display the hue picked without brightness applied? It's pretty simple to add. @dvoytenko and @wassgha, you have requested changes. Are you able to convert those to a ✅ now? I really want this merged, so I can continue with #263. |
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.
Interesting, thanks for pointing out @wassgha! I believe |
Definitely not ideal. The hitboxes are bigger now than before FWIW, twice the size of the circle. |
More performant than creating hundreds of classes dynamically.
Excellent spotted. I did see some problems but di not investigate further. Great job on optimizing, @swissspidy, it seems to work a lot better now and profiling both overall app and react in particular seems to indicate, it's running a lot better now. @wassgha, can you re-evaluate? |
Great job! |
What this PR does:
Implement a color picker where one can change the hue and alpha channel of the color.
See #106.
What it does not:
To do:
Actually leverage color picker in design panel-> Implement form elements for the design panel #271Implement eyedropper (needs canvas, see DRAFT/Discovery: render elements to 2d canvas ampproject/amp-wp#4024)-> Implement eyedropper using SVG rendered page #262Implement gradient picker and controls-> Color Picker - Gradient Editing #263Current screenshot: