Skip to content
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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

jarekdanielak
Copy link
Contributor

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:

  • Brief textual description of the changes present
  • Visual demo attached
  • Steps to try out present, i.e. using the @bpmn-io/sr tool
  • Related issue linked via Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}

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 😉.
Copy link
Member

@nikku nikku left a 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.

@bpmn-io-tasks bpmn-io-tasks bot added in progress Currently worked on and removed needs review Review pending labels Nov 20, 2024
@jarekdanielak
Copy link
Contributor Author

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

@jarekdanielak jarekdanielak added backlog Queued in backlog and removed in progress Currently worked on labels Nov 20, 2024
@jarekdanielak jarekdanielak marked this pull request as draft November 20, 2024 14:13
@bpmn-io-tasks bpmn-io-tasks bot added in progress Currently worked on and removed backlog Queued in backlog labels Nov 20, 2024
@nikku nikku requested a review from lmbateman November 20, 2024 14:20
@nikku
Copy link
Member

nikku commented Nov 20, 2024

CC @lmbateman on the UX discussion.

@nikku nikku added the backlog Queued in backlog label Nov 20, 2024 — with bpmn-io-tasks
@nikku nikku removed the in progress Currently worked on label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Queued in backlog
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants