Unify focus and list items rendering in dropdown menus
Suggested merge commit message (convention)
Internal (ui): Unify dropdown menus focus behavior with menu bar and other menus.
Internal (ui): Use ListItemButtonView instead of ButtonView class as base for dropdown menu buttons.
Internal (ui): Add support for hasIconSpace attribute of ListItemButtonView and allocate space for check marks if there is at least one toggleable menu item in menu.
Additional information
- I marked this commit as internal because dropdown menu is not released yet.
- Focus behavior has been changed in order to make it unified with menu bar. After this change, hovering menu items moves focus from search input to menu items, and any keyboard interaction with the menu makes it show the focus border.
- Why is it based on ck/16311 branch? 3.1. We don't have manual tests for dropdown menu, and the only way to test that is AI. 3.2. The presence of search input is important to show how "hover focus" behaves with that kind of dropdown.
Part of PRs:
- https://github.com/ckeditor/ckeditor5/pull/16314
- https://github.com/ckeditor/ckeditor5/pull/16631
Screens
⚠️ Look at the focus placement.
Before:
After:
https://github.com/ckeditor/ckeditor5/assets/3949262/4570632f-56ed-474e-a861-dc20d9e7e170
@scofalik This one can be merged directly to core dropdown function. I rebased it on search branch just for tests. There should be no conflicts.
There has been no activity on this PR for the past year. We've marked it as stale and will close it in 30 days. We understand it may still be relevant, so if you're interested in the contribution, leave a comment or reaction under this PR.
We've closed your PR due to inactivity. While time has passed, the core of your contribution might still be relevant. If you're able, consider reopening a similar PR.