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

Make keyboard binding implicit / remove ability to bind to any element #661

Closed
nikku opened this issue Aug 15, 2022 · 6 comments · Fixed by #662
Closed

Make keyboard binding implicit / remove ability to bind to any element #661

nikku opened this issue Aug 15, 2022 · 6 comments · Fixed by #662
Assignees
Labels
enhancement New feature or request ux

Comments

@nikku
Copy link
Member

nikku commented Aug 15, 2022

Is your feature request related to a problem? Please describe.

For historical reasons our users had to bind keyboard to any element on the page, may it be document, or the diagram container. With #662 we make the diagram canvas browser selectable; as such we can safely figure out if the canvas has focus and keyboard bindings shall be accounted for.

Because of that we want to remove the bind anywhere keyboard#bindTo / keyboard#bind(element) APIs.

Describe the solution you'd like

  • Keyboard can be bound and unbound, however it will always be bound to the canvas
  • Binding keyboard to a particular element is removed
  • Configuring element to be bound to via keyboard.bindTo is removed
  • Proper error messages indicate old use
  • API to focus the diagram (canvas.focus(), and potentially diagram.focus() as a proxy) exist
  • To be considered: The canvas fires focus and blur events that I can hook into to register global keyboard shortcuts
  • Once the canvas is focused, then we spend reasonable amount of effort to keep it focused / restore focus once on canvas edit operations happened (Make canvas selectable / keyboard binding implicit #662 (comment))

Describe alternatives you've considered

Keep stuff and magic as is.

Additional context

This is a major improvement UX wise.

@nikku nikku added the enhancement New feature or request label Aug 15, 2022
@nikku nikku changed the title Remove ability to bind keyboard to any element Bind keyboard implicitly / remove ability to bind to any element Aug 15, 2022
@nikku nikku changed the title Bind keyboard implicitly / remove ability to bind to any element Make keyboard binding implicit / remove ability to bind to any element Aug 15, 2022
@nikku nikku added the ready Ready to be worked on label Aug 17, 2022 — with bpmn-io-tasks
@nikku nikku self-assigned this Aug 17, 2022
@bpmn-io-tasks bpmn-io-tasks bot added in progress Currently worked on and removed ready Ready to be worked on labels Aug 18, 2022
@nikku nikku added the backlog Queued in backlog label Aug 19, 2022 — with bpmn-io-tasks
@nikku nikku removed the in progress Currently worked on label Aug 19, 2022
@nikku nikku removed their assignment Aug 19, 2022
@nikku nikku added the ready Ready to be worked on label Jan 30, 2024 — with bpmn-io-tasks
@nikku nikku removed the backlog Queued in backlog label Jan 30, 2024
@marstamm
Copy link
Contributor

@nikku , assigned to you for now to clarify what is needed to enable HTO team

@nikku
Copy link
Member Author

nikku commented Mar 1, 2024

@vsgoulart I'll not be able to follow up on this in the next days, but will revisit end of March.

@nikku nikku added backlog Queued in backlog and removed ready Ready to be worked on labels Mar 1, 2024
@barmac barmac added ready Ready to be worked on and removed backlog Queued in backlog labels Aug 27, 2024
@barmac barmac assigned jarekdanielak and unassigned nikku Aug 27, 2024
@barmac
Copy link
Member

barmac commented Aug 27, 2024

Assigning to @jarekdanielak to assess in a timebox manner.

@nikku
Copy link
Member Author

nikku commented Aug 28, 2024

Explanatory scetch, based of discussion with @jarekdanielak:

image

@nikku
Copy link
Member Author

nikku commented Aug 28, 2024

Existing ways to indicate breaking changes (APIs no longer working or changed) - https://github.com/search?q=repo%3Abpmn-io%2Fdiagram-js%20console.warn&type=code.

@nikku
Copy link
Member Author

nikku commented Aug 28, 2024

Other editors, e.g. code mirror are great examples for friendly, and accessible integration into the browser.

@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Oct 27, 2024
nikku added a commit that referenced this issue Nov 4, 2024
The `Canvas` is now a focusable component, that is recognized
accordingly by the browser, with all benefits for UX and interaction.

Components that pull focus from the `Canvas` during modeling must
ensure to restore the focus (if intended), via `Canvas#restoreFocus`.

Related to #661
jarekdanielak pushed a commit that referenced this issue Nov 4, 2024
The `Canvas` is now a focusable component, that is recognized
accordingly by the browser, with all benefits for UX and interaction.

Components that pull focus from the `Canvas` during modeling must
ensure to restore the focus (if intended), via `Canvas#restoreFocus`.

Related to #661
nikku added a commit that referenced this issue Nov 4, 2024
The `Canvas` is now a focusable component, that is recognized
accordingly by the browser, with all benefits for UX and interaction.

Components that pull focus from the `Canvas` during modeling must
ensure to restore the focus (if intended), via `Canvas#restoreFocus`.

Related to #661
nikku added a commit that referenced this issue Nov 4, 2024
The `Canvas` is now a focusable component, that is recognized
accordingly by the browser, with all benefits for UX and interaction.

Components that pull focus from the `Canvas` during modeling must
ensure to restore the focus (if intended), via `Canvas#restoreFocus`.

Related to #661
nikku added a commit that referenced this issue Nov 4, 2024
The `Canvas` is now a focusable component, that is recognized
accordingly by the browser, with all benefits for UX and interaction.

Components that pull focus from the `Canvas` during modeling must
ensure to restore the focus (if intended), via `Canvas#restoreFocus`.

Related to #661
jarekdanielak pushed a commit that referenced this issue Nov 4, 2024
The `Canvas` is now a focusable component, that is recognized
accordingly by the browser, with all benefits for UX and interaction.

Components that pull focus from the `Canvas` during modeling must
ensure to restore the focus (if intended), via `Canvas#restoreFocus`.

Related to #661
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Nov 4, 2024
@nikku nikku added the ux label Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ux
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants