-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Components: ColorPicker: replace global shortcut event handlers with local ones #34508
Conversation
Size Change: +16 B (0%) Total Size: 1.05 MB
ℹ️ View Unchanged
|
3a0981c
to
d245423
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.
Hi @ellatrix,
I noticed a regression previously I could move the color circle using arrow keys and now it does not seems to work:
We have a redesign of the color picker in progress and the roadmap involves basically removing all the current component code #34284 and using a third-party component. So if you prefer we can wait a little bit for the component update.
@jorgefilipecosta It seems to work fine if I move focus to the slider with TAB, but clicking on the slider does not move focus to the slider for some reason. |
Why are we replacing it with a third party component? What's wrong with the current one? |
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.
@jorgefilipecosta It seems to work fine if I move focus to the slider with TAB, but clicking on the slider does not move focus to the slider for some reason.
Yes I retested and it seems to move it arrows so I guess we can merge 👍
Good question. I'm not inside of the reasons; I know that a redesign is planned, maybe using the third-party component makes the new design simpler to implement? |
Thank you for the ping, @jorgefilipecosta ! We are not replacing the current ColorPicker with a third-party component; we are replacing it with a new, first-party version that aligns more closely with the design and the needs that were mostly outlined in the context of the Global Styles sidebar (see #27331 for more context) The new version of the Hope this clarifies your doubts! (cc'ing @mtias in case he wanted to add on top of my explanation) I wonder if, since the current version of the ColorPicker should soon be replaced by the new one and then deleted, we should make any changes to it. |
d245423
to
56093f0
Compare
Let's merge this. I plan to deprecate the KeyboardShortcuts component. Even if this component will be removed eventually, I assume at some point the new color picker component will also need keyboard shortcuts, so this will help with showing how to do it. |
Makes sense — thank you for the explanation, @ellatrix! |
Description
Remove whitespace to review more easily.
Related: #34498, #34500, #34503, #34505.
KeyboardShortcuts adds event handles globally, while these handlers could simply be added locally instead.
How has this been tested?
Screenshots
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).