-
-
Notifications
You must be signed in to change notification settings - Fork 21.5k
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
ColorPicker UX #62910
ColorPicker UX #62910
Conversation
1826028
to
53b7bc1
Compare
561631e
to
95642ab
Compare
dc15035
to
fa991e1
Compare
Should the number of recent color presets be configurable? |
The size of ColorPicker doesn't go back when we hide presets, how to fix this? |
How about making it inherit |
df9474e
to
5dee451
Compare
From testing:
Other than that it looks really good, well done ;) |
I just noticed that recent colors are stored per-picker. I wonder if it's difficult to make them global for the editor. |
I can take reference from |
Yeah, they can be saved too. |
Might be a good idea to pause, commit and then open a new pr. This pr's feature backlog is growing a lot. |
67e5e94
to
5bbe60c
Compare
Found a crash:
Not sure how to reproduce, it happens when clicking recent colors, mixed with selecting colors in other ways and in different pickers (in editor). |
0493d97
to
84e3339
Compare
The crash with recent presets is fixed in the editor, but it can still happen at runtime (you can test with 2 ColorPickers next to each other). Maybe you just need to add Also you could squash the commits now. Be sure to use a descriptive commit message. |
Okay, will fix it. Do we need to cache recent presets at runtime or each picker should have their own recent presets? If we want to cache them, then I don't know when and how to call |
They can have their own presets for now. It can be improved later. |
aef51c1
to
7891b68
Compare
- Tabs and MenuButton for mode selection and enabling/disabling colorized sliders - MenuButton for shape selection with new icon for each shape - Drag and drop functionality for presets to arrange order - A chronological list of recently selected presets which are global for the editor - Presets are now highlighted as being active or inactive - Thicker sliders for easy targeting - `grabber_offset` theme constant for Slider - Uncolorized sliders
7891b68
to
1dce43d
Compare
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.
Doesn't seem to crash anymore and is probably good enough to go.
Some things to consider in the future:
- refactoring picker shapes similar to color modes (already planned AFAIK)
- removing the editor dependency from ColorPicker (I'm going to do it once this PR is merged, as I have an idea how)
- unifying preset lists. Right now each list has a static "cache" equivalent that is only used in the editor. Maybe we could change them all to statics, so all ColorPickes will share this automatically
- I might be forgetting one more thing 🤔
I remember now. The folding state of presets could be remembered somewhere. Someone might want to have presets always unfolded when they open the picker. |
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.
Looks great :)
Thanks! Great work 🎉 |
This PR covers the UX part of Refactor and UX Updates of ColorPicker GSoC'22 project with @akien-mga and @KoBeWi as mentors.
Wireframes for UX updates by @redlamp: here.
Refactoring PR: #62075