dotCMS / core

Headless/Hybrid Content Management System for Enterprises
http://dotcms.com
Other
863 stars 468 forks source link

Allow for keyboard navigation on NG dropdowns #22835

Closed wezell closed 1 year ago

wezell commented 2 years ago

Acceptance Criteria:

Example of Dropdowns in NG app

Note: If you do "Inspect" on your browser and find css class "dijit", then it's a DOJO dropdown (implementation not included on this task) image

alfredo-dotcms commented 2 years ago

PR: https://github.com/dotCMS/core/pull/23005/files

nollymar commented 2 years ago

Internal QA: Needs work

  1. When I tested the up/down arrows in the PP modal, it selected more than one user after hitting Enter. However, when I used the mouse, it just selected one

https://user-images.githubusercontent.com/8741395/192639894-bb03e44c-9847-4e61-ab3c-e0bbb05b8338.mov

  1. The keys don't work on these popups: A- Content Type creation (Workflow dropdown) Screen Shot 2022-09-27 at 4 38 10 PM

B- Content type edition (Icon dropdown)

https://user-images.githubusercontent.com/8741395/192652277-ba46419b-deea-410f-8e95-ce05aab5bda0.mov

  1. There is no way to select an option from a dropdown when you add/edit a content type because the ENTER performs the Create/Update actions and the popup is closed.

https://user-images.githubusercontent.com/8741395/192652869-cc01c7ad-8b2e-4d99-8a37-853f18d2cee9.mov

  1. I can't keep moving up/down when I try to create a rule

https://user-images.githubusercontent.com/8741395/192656799-6b956aa0-b4e5-47d6-915b-dd4f3f6ce5ab.mov

alfredo-dotcms commented 2 years ago

Notes for new findings on https://github.com/dotCMS/core/issues/22835#issuecomment-1260078706 1) that is a DOJO dropdown and is out of scope. A new bug was created for that https://github.com/dotCMS/core/issues/23070

image

2.A ) A style was added to show when the user focus on an option item in the dropdown. In this field a native PrimeNG component is being used, so the behavior is the same as it was designed by the authors (you can compare the behavior here). Note: if the behavior needs to meet others components, then a major refactor needs to be done, it will be out of scope and a new task will be required.

4 ) this won't be fixed on this task, the way that component was built in Rules is too attached and trying to fix it has lots of potentials to break rules. Explanation: every time an option is pick from the dropdown, the whole Rule Action components get re-rendered so you endup with new html components that makes you loose focus and can not continue navigating with the keyboard

alfredo-dotcms commented 2 years ago

PR: https://github.com/dotCMS/core/pull/23079

nollymar commented 2 years ago

Internal QA: Passed

According to the comment left here, I tested cases 2.B and 3 which are working as expected.

josemejias07 commented 1 year ago

Approved QA - Tested on 22.11_4889b92f_SNAPSHOT // Docker // macOS 12.6 FF v106.0.3

Related to #23289