-
Notifications
You must be signed in to change notification settings - Fork 30
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
Introducing element navigation via keyboard #276
Conversation
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 @aylin-sarioglu!
Thanks for this contribution! 🚀
I didn't have a thorough look at the code yet, but I noticed some overall issues, which I summarized below. Could you have a quick look and let me know what you think? Thank you!
- Is there a reason why the navigation modes can only be activated if an element is selected? I find this a little confusing, because I have to use the mouse to select an element and then to switch to the keyboard if I prefer that. Also, if selection is lost and navigation mode is on it cannot be restored without the mouse. Also the navigation mode cannot be exited if selection is lost. Could you have another look a t this? Also, could you think of a way to jump to the very first element for example in this case and initially?
- I would be in favor of introducing visible grouping in the shortcut overview now, as we have multiple overlapping keybindings in different contexts. Either margins between the groups, adding the group name as line or something like that.
- The Help menu cannot be opened if navigation mode is active.
- Focus tracker does not reset focus if a creation tool was selected in the toolpalette and then one of the tools in the header is activated (which aborts the creation tool):
Another general comment:
- Please add documentation of this accessibility feature to the accessibility README. Could you please also add the information of the previous "help" feature (PR Introduce list of keyboard shortcuts #260)? TIA
packages/client/src/features/accessibility/element-navigation/diagram-navigation-tool.ts
Outdated
Show resolved
Hide resolved
packages/client/src/features/accessibility/element-navigation/local-element-navigator.ts
Show resolved
Hide resolved
c674004
to
f32815b
Compare
Hi @ndoschek, Thank you for your feedback.
Without selecting elements, activating the navigation wouldn't make sense, as its purpose is to move through those selected diagram elements.
As explained in 1.) , now you can focus on the diagram via TAB and then call the search, without the need for a mouse.
This is fixed now.
This was intentionally not added for this prototype, as there is no clear definition of what the first element of a diagram is, i.e. it could be the one positioned at the very top or left of the canvas, as this depends on the positioning of the user. But, by focusing on the diagram (which is now provided with the correction explained in 1.) and calling the search, the desired element could be selected. |
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.
Thank you very much @aylin-sarioglu for the fast update on this PR!
I added a few comments inline, but nothing major from my POV.
And I noticed one issue regarding the highlighting of navigable elements.
If you exit the navigation mode if navigable elements are highlighted, the CSS class is not reset after exiting the navigation mode (please see screenshot). Could you please doublecheck this? Thanks!
- Introduce tool and handler for element navigation via keyboard shortcut - Introduce tool and handler for tracking the current focus of the cursor - Introduce tool and handler for the creation of notification/toast - Introduce new reposition action for focusing on element without zooming in
9b77a9b
to
3902a8a
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.
Thanks @aylin-sarioglu LGTM 👍
This PR is part of my diploma research conducted at the Model Engineering lab of TU Wien in the Business Informatics Group. It introduces two navigation mechanisms for iterating through the given model.
Additionally, this PR also includes a Focus Tracker and Notifications.
The Focus Tracker displays the current focused element with a textual indicator on the bottom left corner of the canvas. The Notifications are used to provide user information, e.g. activated resize or navigation modes, displayed on the canvas. Both will be triggered automatically if applicable.
Example
Default Navigation (following directions of relations)
N
to activate default navigation.Position-based Navigation (following x and y coordinates)
ALT+N
to activate position-based navigation.@ndoschek @martin-fleck-at
Part of eclipse-glsp/glsp#1029