-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
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
Redesign on
state in menu and dropdowns
#16573
Conversation
425986c
to
14ceb90
Compare
Below are conclusions from manual testing I did (some relate to commercial features PR):
Some other thoughts that are not directly related to this PR and can be done as a follow-up:
|
@scofalik Thx! Will be fixed. |
One more thing @Comandeer @oleq. When I click the top-level menu item (like "Insert") it gets focus and the focus will follow the mouse hover. I wonder about this behavior. On one hand, it seems correct to show the focus when I clicked the top-level menu item. On the other hand, it is weird that the focus follows the mouse. But it would be also weird if it didn't. So I wonder if we have to show the focus on click and if we can hide it when hovering other items. It is also inconsistent with hovering items inside such menu. E.g. if I hover&click "Insert" it shows the focus but then I hover down and the focus is not shown anymore. But if I hover left&right, the focus is kept. See video. Screen.Recording.2024-06-24.at.16.19.27.mov |
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.
Other than what I commented, please try to use properties and methods name as short as possible. Maybe you'll find some room for improvement. I also dislike maybeXXX
approach. I get your point, but that's not really necessary if we have typed code and if the method is very short or you immediately early return like this:
const listView = pickListView();
if ( !listView ) {
return;
}
This comment was marked as resolved.
This comment was marked as resolved.
I tend to use the most descriptive names as I can, even if they are longer, so we can read them as a recipe step that shortly describes what the method does without looking at docs or types. Although it's my personal opinion, I'm perfectly fine with renaming. Can you point me which methods and variables should be renamed (and what is a preferable way to name them?). It'd helpful and save my time.
Sorry, I forgot about our discussions about these |
Replying to #16573 (comment): "Focus visible" SC requires focus only during keyboard operations. I would argue that it allows us to skip showing the focus indicator if the user hovers over a top-level menu item with a mouse. Skipping the indicator there would make the whole experience consistent. So:
|
👍
Of course, this is a good rule to follow. But sometimes these names get a bit too long and reading them line after line is tiring. Sometimes they do not fit convention. Some things I'd think about from this PR are:
Do you have to change these names? Honestly, these ones are deep and used slightly, so it isn't a critical thing. But I think you have slight tendency to overdescribe the names, so you can treat it as a general advice. |
@scofalik Replaced 👍🏻 |
One more example: |
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.
Almost there. One bug left.
Since this is the only place that acts this way, I wouldn't be worried. There are pros and cons of this approach.
AFAIR they are custom-made and don't share the same logic that makes up the menu bar. I don't know how to address this issue yet, though. Also, I suppose the same goes with in-toolbar dropdowns in general because they are different UI components and they are missing this mouse-to-keyboard logic. |
@scofalik imo, it's correct behavior. There could be situations where you focus an item using keyboard, like in multi-level lists, then tooltip shows and it overlaps another items. To get of rid of them, without closing dropdown,
|
Regarding tooltips: sometimes it is correct, sometimes not. I understand why we introduced closing tooltips on ESC and I don't discuss it - I agree that was an improvement. But in this case it was a UX degradation from my point of view and how I used it, I noticed it and wrote about it. There's probably no way to have both, so I am fine with how it is. It wouldn't be a problem if the list components were better integrated with the menu bar, i.e., if I was able to leave the list types grid by pressing arrow left or arrow up when in left column / top row. |
Suggested merge commit message (convention)
Fix (ui): Improve accessibility of menu bar toggle items by marking them as
menucheckbox
aria roles.Feature (ui): Redesign of menu items styling.
Closes #16572.
Additional information
Commercial PR: https://github.com/cksource/ckeditor5-commercial/pull/6339
Before
After