-
Notifications
You must be signed in to change notification settings - Fork 197
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
Restore canvas focus on properties panel focus change #1094
base: main
Are you sure you want to change the base?
Conversation
This allows components to hook into the properties panel focus state.
This ensures our standard editing behavior is preserved, i.e. when destructive properties panel operations force blur.
This ensure properties panel focus is not lost when I mouse down on, i.e. a label. On the other hand this remains unfocusable through keyboard navigation. We can consider to change that some day, just not today 😉.
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.
Should we test the canvas.restoreFocus()
integration? It is currently not tested.
After some more discussion with Nico, we decided that this is not needed. Restoring focus on the canvas covers an edge case, but doesn't make UX any more predictable. If user interacts with the properties panel, they should expect the focus to now be in the panel and not on the canvas. This PR is getting parked in the backlog until we decide to redesign UX around panel focus or there is some feedback from users. There is another PR implementing the minimal change to make properties panel container focusable: #1095 |
CC @lmbateman on the UX discussion. |
Proposed Changes
Related to https://github.com/bpmn-io/internal-docs/issues/1081
Original pull request #1093
This is a better solution to keep the canvas focused when user is only briefly interacting with properties panel, without focusing any input fields.
Original pull request was dropped due to reasons explain in this comment.
Screen.Recording.2024-11-20.at.12.53.56.mov
Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/sr
toolCloses {LINK_TO_ISSUE}
orRelated to {LINK_TO_ISSUE}