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 canvas selectable / keyboard binding implicit #662

Merged
merged 3 commits into from
Nov 4, 2024

Conversation

nikku
Copy link
Member

@nikku nikku commented Aug 15, 2022

Proposed Changes

Keyboard is now implicitly bound and Canvas is a focusable element.

This builds foundations to support cross-browser/application copy and paste and more general keyboard related UX enhancements.

This change introduces a predictable editing experience, simplifies the keyboard and ensures worry free interoperability with multiple editors and inputs on the page.

Focusable Canvas (c75285b)

The Canvas is now a focusable component, that is recognized accordingly by the browser, with all benefits for UX and interaction. New APIs are provided to allow restoring focus to the canvas.

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

Implicit Keyboard binding (b0f9a75)

Keyboard is now implicitly bound to the canvas element (svg). It provides behavior closer to native browser experience.

Previous calls to keyboard.bind(someElement) or configuration via keyboard.bindTo log a descriptive descriptive error:

image


Closes #661

@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Aug 15, 2022
@nikku
Copy link
Member Author

nikku commented Aug 16, 2022

This can be tried out via:

npx @bpmn-io/sr nikku/bpmn-js-native-copy-paste#keyboard-bind -c "npm run start"

What I did is to remove any input quirks but rely on canvas to be actually browser selected. As a side-effect though that means that we consistently need to select the canvas when modeling operations happen:

capture IH2DTf_optimized

I do not see a simple way to accomplish this (yet).


At this point we have two options:

  • 🅰️ ditch this approach and keep existing manual keybinding
  • 🅱️ invest into consistently + properly re-focus the canvas

🅱️ is a requirement for cross browser copy + paste to work reliably so I'd argue we need to pursue this route anyway.

@nikku

This comment was marked as off-topic.

@barmac
Copy link
Member

barmac commented Aug 16, 2022

On MacOS, the focus state is persisted once I hover the canvas even if switch tab afterwards and come back. Is this is supposed to work like this? I am not opinionated but it would be logical to me that focus fades away when I move mouse outside without clicking.

@barmac

This comment was marked as outdated.

@nikku

This comment was marked as outdated.

@barmac

This comment was marked as outdated.

@nikku

This comment was marked as outdated.

@barmac
Copy link
Member

barmac commented Aug 16, 2022

Indeed, it's an out of scope feature to be fixed 😆

@marstamm
Copy link
Contributor

When we implicitly bind to the canvas, does it imply that extensions that rely on the command stack need to catch and trigger undo/redo manually? I'm thinking about the Properties panel here, where the most common case was to bind the keyboard to a common container.

I tested it on Edge and it works as expected, no new issues found from my side

@nikku

This comment was marked as outdated.

@nikku

This comment was marked as outdated.

@barmac

This comment was marked as outdated.

@nikku nikku marked this pull request as draft August 17, 2022 13:11
@bpmn-io-tasks bpmn-io-tasks bot added in progress Currently worked on and removed needs review Review pending labels Aug 17, 2022
@nikku
Copy link
Member Author

nikku commented Aug 17, 2022

Found the following issues integration testing this against different libraries in our eco-system:

  • dmn-js-drd: no issues (works out of the box)
  • dmn-js-decision-table / literal expression editor: has it's own keyboard implementation ➡️ needs porting to similar bind behavior, i.e. either make the table selectable + bind to it.
  • form-js: re-uses diagram-js keyboard but has no canvas ➡️ need to improve the bind / unbind behavior proposed in this PR to get the actual diagram container. Two ideas:
    • expose diagram with container in form-js, too
    • pass the container on diagram.init for components to catch it and do stuff with it (i.e . register/unregister key bindings)

@pinussilvestrus
Copy link
Contributor

form-js: re-uses diagram-js keyboard but has no canvas ➡️ need to improve the bind / unbind behavior proposed in this PR to get the actual diagram container. Two ideas:

  • expose diagram with container in form-js, too
  • pass the container on diagram.init for components to catch it and do stuff with it (i.e . register/unregister key bindings)

Given we follow one of these approaches, would we also have to follow up with explicit keyboard bindings for the Forms Properties Panel?

I'm asking because we plan to make it independent from the editor (e.g. render it in an own container, as we do with the other properties panels, cf. bpmn-io/form-js#291).

@nikku
Copy link
Member Author

nikku commented Aug 17, 2022

[...] would we also have to follow up with explicit keyboard bindings for the Forms Properties Panel?

Absolutely. Taking it one step at a time here though. Blueprint for properties panel binding can be found here: bpmn-io/bpmn-js-properties-panel#739.

@nikku
Copy link
Member Author

nikku commented Aug 17, 2022

This is now available as a pre-release via diagram-js@9.0.0-alpha.1 and bpmn-js@10.0.0-alpha.1.

nikku added a commit to bpmn-io/bpmn-js-properties-panel that referenced this pull request Aug 17, 2022
This prepares for bpmn-io/diagram-js#662,
but is built in a way that is backwards compatible.
nikku added a commit to bpmn-io/bpmn-js-properties-panel that referenced this pull request Aug 17, 2022
This prepares for bpmn-io/diagram-js#662,
but is built in a way that is backwards compatible.
nikku added a commit to camunda/camunda-bpmn-js that referenced this pull request Nov 8, 2024
nikku added a commit to camunda/camunda-bpmn-js that referenced this pull request Nov 11, 2024
nikku pushed a commit to torge-hmn/diagram-js that referenced this pull request Nov 14, 2024
nikku pushed a commit to torge-hmn/diagram-js that referenced this pull request Nov 14, 2024
nikku pushed a commit that referenced this pull request Nov 15, 2024
barmac pushed a commit to bpmn-io/form-js that referenced this pull request Nov 15, 2024
Editor is now focussed automatically on hover.

chore: update to diagram-js@15

Related to bpmn-io/diagram-js#662
barmac pushed a commit to bpmn-io/form-js that referenced this pull request Nov 15, 2024
This updates the library to diagram-js@15 which ships breaking changes.

BREAKING CHANGES:

* Keyboard is now implicitly bound to the container element.
  Calls to `keyboard.bind` with `node` and `keyboard.bindTo`
  now result with a descriptive console error and have no effect.

Related to bpmn-io/diagram-js#662
vsgoulart added a commit to bpmn-io/form-js that referenced this pull request Nov 18, 2024
This updates the library to diagram-js@15 which ships breaking changes.

BREAKING CHANGES:

* Keyboard is now implicitly bound to the container element.
  Calls to `keyboard.bind` with `node` and `keyboard.bindTo`
  now result with a descriptive console error and have no effect.

Related to bpmn-io/diagram-js#662
github-merge-queue bot pushed a commit to camunda/camunda that referenced this pull request Nov 27, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [dmn-js](https://redirect.github.com/bpmn-io/dmn-js)
([source](https://redirect.github.com/bpmn-io/dmn-js/tree/HEAD/packages/dmn-js))
| [`16.8.2` ->
`17.0.3`](https://renovatebot.com/diffs/npm/dmn-js/16.8.2/17.0.3) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/dmn-js/17.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/dmn-js/17.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/dmn-js/16.8.2/17.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/dmn-js/16.8.2/17.0.3?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>bpmn-io/dmn-js (dmn-js)</summary>

###
[`v17.0.3`](https://redirect.github.com/bpmn-io/dmn-js/blob/HEAD/packages/dmn-js/CHANGELOG.md#1703)

[Compare
Source](https://redirect.github.com/bpmn-io/dmn-js/compare/v17.0.2...v17.0.3)

- `FIX`: port implicit keyboard binding configuration to decision
editors
([#&#8203;920](https://redirect.github.com/bpmn-io/dmn-js/pull/920))

###
[`v17.0.2`](https://redirect.github.com/bpmn-io/dmn-js/blob/HEAD/packages/dmn-js/CHANGELOG.md#1702)

[Compare
Source](https://redirect.github.com/bpmn-io/dmn-js/compare/v17.0.1...v17.0.2)

- `FIX`: display updated formal parameters suggestions
([#&#8203;914](https://redirect.github.com/bpmn-io/dmn-js/pull/914))

###
[`v17.0.1`](https://redirect.github.com/bpmn-io/dmn-js/blob/HEAD/packages/dmn-js/CHANGELOG.md#1701)

[Compare
Source](https://redirect.github.com/bpmn-io/dmn-js/compare/v17.0.0...v17.0.1)

- `FIX`: make name change behavior not break on name change
([#&#8203;917](https://redirect.github.com/bpmn-io/dmn-js/pull/917)),
port from `v16.8.2`

###
[`v17.0.0`](https://redirect.github.com/bpmn-io/dmn-js/blob/HEAD/packages/dmn-js/CHANGELOG.md#1700)

[Compare
Source](https://redirect.github.com/bpmn-io/dmn-js/compare/v16.8.2...v17.0.0)

-   `DEPS`: update to `diagram-js@15.2.0`
-   `DEPS`: update to `diagram-js-direct-editing@3.2.0`
-   `DEPS`: update to `table-js@9.2.0`

##### Breaking Changes

- Keyboard (DRD) is now implicit, and canvas is focusable, cf.
([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/camunda/camunda).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXV0b21lcmdlIl19-->
github-merge-queue bot pushed a commit to camunda/camunda that referenced this pull request Dec 10, 2024
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [bpmn-js](https://redirect.github.com/bpmn-io/bpmn-js) | [`17.11.1` ->
`18.1.1`](https://renovatebot.com/diffs/npm/bpmn-js/17.11.1/18.1.1) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/bpmn-js/18.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/bpmn-js/18.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/bpmn-js/17.11.1/18.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/bpmn-js/17.11.1/18.1.1?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>bpmn-io/bpmn-js (bpmn-js)</summary>

###
[`v18.1.1`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1811)

[Compare
Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.1.0...v18.1.1)

- `FIX`: adjust search to prioritize start of word and exact matches
([bpmn-io/diagram-js#953](https://redirect.github.com/bpmn-io/diagram-js/pull/953))
- `FIX`: ignore whitespace when searching
([bpmn-io/diagram-js#954](https://redirect.github.com/bpmn-io/diagram-js/pull/954))

###
[`v18.1.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1810)

[Compare
Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.0.0...v18.1.0)

- `FIX`: clear selection when opening search pad
([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947))
- `FIX`: correct dangling selection after search pad interaction
([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947))
-   `DEPS`: update to `diagram-js@15.2.2`

###
[`v18.0.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1800)

[Compare
Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v17.11.1...v18.0.0)

- `FEAT`: remove `outline` from `Viewer` modules
([#&#8203;2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135))
- `FEAT`: make `Canvas` a focusable element
([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662))
- `FEAT`: implicit keyboard binding
([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662))
- `FEAT`: integrate with global `search`
([#&#8203;2235](https://redirect.github.com/bpmn-io/bpmn-js/pull/2235))
- `FEAT`: integrate `popup-menu` with `search`
([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932))
- `FEAT`: recognize modern `search` tokens in `search-pad`
([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932))
- `FIX`: correctly handle duplicate entries and whitespace in `search`
([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932))
- `FIX`: find `search` terms across all keys
([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932))
- `FIX`: `search` always returns tokens for matched items
([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932))
- `FIX`: prevent crash during label adjustment
([#&#8203;2239](https://redirect.github.com/bpmn-io/bpmn-js/issues/2239))
- `FIX`: keep existing loop characteristics when toggling through the
replace menu
([#&#8203;2251](https://redirect.github.com/bpmn-io/bpmn-js/pull/2251))
- `FIX`: prevent covering multi selection with black box in `Viewer`
([#&#8203;2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135))
- `FIX`: generate types for main entry
([`986e2bb`](https://redirect.github.com/bpmn-io/bpmn-js/commit/986e2bb51ea301e6e0df56f3606a27424fb90179))
- `FIX`: correct handling of group name with whitespace only
([#&#8203;2231](https://redirect.github.com/bpmn-io/bpmn-js/issues/2231))
- `DEPS`: update to `bpmn-moddle@9`
([#&#8203;2114](https://redirect.github.com/bpmn-io/bpmn-js/pull/2114))
-   `DEPS`: update to `diagram-js@15.1.0`
-   `DEPS`: update to `diagram-js-direct-editing@3.2.0`

##### Breaking Changes

-   Require `Node >= 20`
- `Canvas` is now a focusable element and provides better support for
native browser behaviors. Focus can be controlled with new `focus` and
`restoreFocus` APIs.
- Keyboard is now implicitly bound to canvas SVG element. Calls to
`keyboard.bind` and `keyboard.bindTo` now result with a descriptive
console error and have no effect.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR is behind base branch, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/camunda/camunda).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS4xOS4wIiwidXBkYXRlZEluVmVyIjoiMzkuMTkuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXV0b21lcmdlIl19-->
nikku added a commit that referenced this pull request Dec 19, 2024
nikku added a commit that referenced this pull request Dec 19, 2024
nikku added a commit that referenced this pull request Dec 19, 2024
nikku added a commit that referenced this pull request Dec 19, 2024
nikku added a commit that referenced this pull request Dec 19, 2024
If canvas for whatever reason is not focused, then movement does not
happen.

Related to #662
nikku added a commit that referenced this pull request Dec 19, 2024
nikku added a commit that referenced this pull request Dec 20, 2024
If canvas for whatever reason is not focused, then movement does not
happen.

Related to #662
nikku added a commit that referenced this pull request Dec 20, 2024
github-merge-queue bot pushed a commit to camunda/camunda that referenced this pull request Jan 9, 2025
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [bpmn-js](https://redirect.github.com/bpmn-io/bpmn-js) | [`17.11.1` ->
`18.1.2`](https://renovatebot.com/diffs/npm/bpmn-js/17.11.1/18.1.2) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/bpmn-js/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/bpmn-js/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/bpmn-js/17.11.1/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/bpmn-js/17.11.1/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>bpmn-io/bpmn-js (bpmn-js)</summary>

###
[`v18.1.2`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1812)

[Compare
Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.1.1...v18.1.2)

- `FIX`: canvas `autoFocus` must explicitly be enabled
([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956))
- `FIX`: properly integrate `zoomscroll` with canvas focus
([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956))
- `FIX`: properly integrate `movecanvas` with canvas focus
([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956))

###
[`v18.1.1`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1811)

[Compare
Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.1.0...v18.1.1)

- `FIX`: adjust search to prioritize start of word and exact matches
([bpmn-io/diagram-js#953](https://redirect.github.com/bpmn-io/diagram-js/pull/953))
- `FIX`: ignore whitespace when searching
([bpmn-io/diagram-js#954](https://redirect.github.com/bpmn-io/diagram-js/pull/954))

###
[`v18.1.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1810)

[Compare
Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.0.0...v18.1.0)

- `FIX`: clear selection when opening search pad
([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947))
- `FIX`: correct dangling selection after search pad interaction
([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947))
-   `DEPS`: update to `diagram-js@15.2.2`

###
[`v18.0.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1800)

[Compare
Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v17.11.1...v18.0.0)

- `FEAT`: remove `outline` from `Viewer` modules
([#&#8203;2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135))
- `FEAT`: make `Canvas` a focusable element
([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662))
- `FEAT`: implicit keyboard binding
([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662))
- `FEAT`: integrate with global `search`
([#&#8203;2235](https://redirect.github.com/bpmn-io/bpmn-js/pull/2235))
- `FEAT`: integrate `popup-menu` with `search`
([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932))
- `FEAT`: recognize modern `search` tokens in `search-pad`
([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932))
- `FIX`: correctly handle duplicate entries and whitespace in `search`
([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932))
- `FIX`: find `search` terms across all keys
([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932))
- `FIX`: `search` always returns tokens for matched items
([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932))
- `FIX`: prevent crash during label adjustment
([#&#8203;2239](https://redirect.github.com/bpmn-io/bpmn-js/issues/2239))
- `FIX`: keep existing loop characteristics when toggling through the
replace menu
([#&#8203;2251](https://redirect.github.com/bpmn-io/bpmn-js/pull/2251))
- `FIX`: prevent covering multi selection with black box in `Viewer`
([#&#8203;2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135))
- `FIX`: generate types for main entry
([`986e2bb`](https://redirect.github.com/bpmn-io/bpmn-js/commit/986e2bb51ea301e6e0df56f3606a27424fb90179))
- `FIX`: correct handling of group name with whitespace only
([#&#8203;2231](https://redirect.github.com/bpmn-io/bpmn-js/issues/2231))
- `DEPS`: update to `bpmn-moddle@9`
([#&#8203;2114](https://redirect.github.com/bpmn-io/bpmn-js/pull/2114))
-   `DEPS`: update to `diagram-js@15.1.0`
-   `DEPS`: update to `diagram-js-direct-editing@3.2.0`

##### Breaking Changes

-   Require `Node >= 20`
- `Canvas` is now a focusable element and provides better support for
native browser behaviors. Focus can be controlled with new `focus` and
`restoreFocus` APIs.
- Keyboard is now implicitly bound to canvas SVG element. Calls to
`keyboard.bind` and `keyboard.bindTo` now result with a descriptive
console error and have no effect.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled because a matching PR was automerged
previously.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/camunda/camunda).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS42OS4zIiwidXBkYXRlZEluVmVyIjoiMzkuNzIuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXV0b21lcmdlIl19-->
github-merge-queue bot pushed a commit to camunda/camunda that referenced this pull request Jan 9, 2025
This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| [bpmn-js](https://redirect.github.com/bpmn-io/bpmn-js) | [`17.11.1` ->
`18.1.2`](https://renovatebot.com/diffs/npm/bpmn-js/17.11.1/18.1.2) |
[![age](https://developer.mend.io/api/mc/badges/age/npm/bpmn-js/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/bpmn-js/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/bpmn-js/17.11.1/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/bpmn-js/17.11.1/18.1.2?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

> [!WARNING]
> Some dependencies could not be looked up. Check the Dependency
Dashboard for more information.

---

### Release Notes

<details>
<summary>bpmn-io/bpmn-js (bpmn-js)</summary>

###
[`v18.1.2`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1812)

[Compare
Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.1.1...v18.1.2)

- `FIX`: canvas `autoFocus` must explicitly be enabled
([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956))
- `FIX`: properly integrate `zoomscroll` with canvas focus
([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956))
- `FIX`: properly integrate `movecanvas` with canvas focus
([bpmn-io/diagram-js#956](https://redirect.github.com/bpmn-io/diagram-js/pull/956))

###
[`v18.1.1`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1811)

[Compare
Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.1.0...v18.1.1)

- `FIX`: adjust search to prioritize start of word and exact matches
([bpmn-io/diagram-js#953](https://redirect.github.com/bpmn-io/diagram-js/pull/953))
- `FIX`: ignore whitespace when searching
([bpmn-io/diagram-js#954](https://redirect.github.com/bpmn-io/diagram-js/pull/954))

###
[`v18.1.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1810)

[Compare
Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v18.0.0...v18.1.0)

- `FIX`: clear selection when opening search pad
([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947))
- `FIX`: correct dangling selection after search pad interaction
([bpmn-io/diagram-js#947](https://redirect.github.com/bpmn-io/diagram-js/pull/947))
-   `DEPS`: update to `diagram-js@15.2.2`

###
[`v18.0.0`](https://redirect.github.com/bpmn-io/bpmn-js/blob/HEAD/CHANGELOG.md#1800)

[Compare
Source](https://redirect.github.com/bpmn-io/bpmn-js/compare/v17.11.1...v18.0.0)

- `FEAT`: remove `outline` from `Viewer` modules
([#&#8203;2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135))
- `FEAT`: make `Canvas` a focusable element
([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662))
- `FEAT`: implicit keyboard binding
([bpmn-io/diagram-js#662](https://redirect.github.com/bpmn-io/diagram-js/pull/662))
- `FEAT`: integrate with global `search`
([#&#8203;2235](https://redirect.github.com/bpmn-io/bpmn-js/pull/2235))
- `FEAT`: integrate `popup-menu` with `search`
([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932))
- `FEAT`: recognize modern `search` tokens in `search-pad`
([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932))
- `FIX`: correctly handle duplicate entries and whitespace in `search`
([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932))
- `FIX`: find `search` terms across all keys
([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932))
- `FIX`: `search` always returns tokens for matched items
([bpmn-io/diagram-js#932](https://redirect.github.com/bpmn-io/diagram-js/pull/932))
- `FIX`: prevent crash during label adjustment
([#&#8203;2239](https://redirect.github.com/bpmn-io/bpmn-js/issues/2239))
- `FIX`: keep existing loop characteristics when toggling through the
replace menu
([#&#8203;2251](https://redirect.github.com/bpmn-io/bpmn-js/pull/2251))
- `FIX`: prevent covering multi selection with black box in `Viewer`
([#&#8203;2135](https://redirect.github.com/bpmn-io/bpmn-js/issues/2135))
- `FIX`: generate types for main entry
([`986e2bb`](https://redirect.github.com/bpmn-io/bpmn-js/commit/986e2bb51ea301e6e0df56f3606a27424fb90179))
- `FIX`: correct handling of group name with whitespace only
([#&#8203;2231](https://redirect.github.com/bpmn-io/bpmn-js/issues/2231))
- `DEPS`: update to `bpmn-moddle@9`
([#&#8203;2114](https://redirect.github.com/bpmn-io/bpmn-js/pull/2114))
-   `DEPS`: update to `diagram-js@15.1.0`
-   `DEPS`: update to `diagram-js-direct-editing@3.2.0`

##### Breaking Changes

-   Require `Node >= 20`
- `Canvas` is now a focusable element and provides better support for
native browser behaviors. Focus can be controlled with new `focus` and
`restoreFocus` APIs.
- Keyboard is now implicitly bound to canvas SVG element. Calls to
`keyboard.bind` and `keyboard.bindTo` now result with a descriptive
console error and have no effect.

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled because a matching PR was automerged
previously.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/).
View the [repository job
log](https://developer.mend.io/github/camunda/camunda).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzOS42OS4zIiwidXBkYXRlZEluVmVyIjoiMzkuNzIuNSIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiYXV0b21lcmdlIl19-->
ElRaptorus added a commit to 5minds/bpmn-js that referenced this pull request Feb 4, 2025
# Changes 

Siehe Changelog:
https://github.com/bpmn-io/bpmn-js/blob/develop/CHANGELOG.md

## 18.1.2

* `FIX`: canvas `autoFocus` must explicitly be enabled
([bpmn-io/diagram-js#956](bpmn-io/diagram-js#956))
* `FIX`: properly integrate `zoomscroll` with canvas focus
([bpmn-io/diagram-js#956](bpmn-io/diagram-js#956))
* `FIX`: properly integrate `movecanvas` with canvas focus
([bpmn-io/diagram-js#956](bpmn-io/diagram-js#956))

## 18.1.1

* `FIX`: adjust search to prioritize start of word and exact matches
([bpmn-io/diagram-js#953](bpmn-io/diagram-js#953))
* `FIX`: ignore whitespace when searching
([bpmn-io/diagram-js#954](bpmn-io/diagram-js#954))

## 18.1.0

* `FIX`: clear selection when opening search pad
([bpmn-io/diagram-js#947](bpmn-io/diagram-js#947))
* `FIX`: correct dangling selection after search pad interaction
([bpmn-io/diagram-js#947](bpmn-io/diagram-js#947))
* `DEPS`: update to `diagram-js@15.2.2`

## 18.0.0

* `FEAT`: remove `outline` from `Viewer` modules
([bpmn-io#2135](bpmn-io#2135))
* `FEAT`: make `Canvas` a focusable element
([bpmn-io/diagram-js#662](bpmn-io/diagram-js#662))
* `FEAT`: implicit keyboard binding
([bpmn-io/diagram-js#662](bpmn-io/diagram-js#662))
* `FEAT`: integrate with global `search`
([bpmn-io#2235](bpmn-io#2235))
* `FEAT`: integrate `popup-menu` with `search`
([bpmn-io/diagram-js#932](bpmn-io/diagram-js#932))
* `FEAT`: recognize modern `search` tokens in `search-pad`
([bpmn-io/diagram-js#932](bpmn-io/diagram-js#932))
* `FIX`: correctly handle duplicate entries and whitespace in `search`
([bpmn-io/diagram-js#932](bpmn-io/diagram-js#932))
* `FIX`: find `search` terms across all keys
([bpmn-io/diagram-js#932](bpmn-io/diagram-js#932))
* `FIX`: `search` always returns tokens for matched items
([bpmn-io/diagram-js#932](bpmn-io/diagram-js#932))
* `FIX`: prevent crash during label adjustment
([bpmn-io#2239](bpmn-io#2239))
* `FIX`: keep existing loop characteristics when toggling through the
replace menu ([bpmn-io#2251](bpmn-io#2251))
* `FIX`: prevent covering multi selection with black box in `Viewer`
([bpmn-io#2135](bpmn-io#2135))
* `FIX`: generate types for main entry
([`986e2bb`](bpmn-io@986e2bb))
* `FIX`: correct handling of group name with whitespace only
([bpmn-io#2231](bpmn-io#2231))
* `DEPS`: update to `bpmn-moddle@9`
([bpmn-io#2114](bpmn-io#2114))
* `DEPS`: update to `diagram-js@15.1.0`
* `DEPS`: update to `diagram-js-direct-editing@3.2.0`

### Breaking Changes

* Require `Node >= 20`
* `Canvas` is now a focusable element and provides better support for
native browser behaviors. Focus can be controlled with new `focus` and
`restoreFocus` APIs
([bpmn-io/diagram-js#662](bpmn-io/diagram-js#662)).
* Keyboard is now implicitly bound to canvas SVG element. Calls to
`keyboard.bind` and `keyboard.bindTo` now result with a descriptive
console error and have no effect
([bpmn-io/diagram-js#662](bpmn-io/diagram-js#662)).

## 17.11.1

* `FIX`: handle searching elements without labels
([bpmn-io#2232](bpmn-io#2232),
[bpmn-io#2234](bpmn-io#2234))

## 17.11.0

* `FEAT`: align search styles with other popups
([bpmn-io#2187](bpmn-io#2187))
* `FEAT`: prioritize start of tokens in search results
([bpmn-io#2187](bpmn-io#2187))
* `FIX`: do not commit viewport changes on `ESC`
([bpmn-io#2189](bpmn-io#2189),
[bpmn-io#2187](bpmn-io#2187))
* `DEPS`: update to `diagram-js@14.10.0`

## 17.10.0

* `CHORE`: correct various type hints
([bpmn-io#2228](bpmn-io#2228))
* `FIX`: pasting compensation activity without boundary event
([bpmn-io#2070](bpmn-io#2070))
* `FIX`: lane resize constraints for se and nw direction
([bpmn-io#2209](bpmn-io#2209))
* `FIX`: auto place elements vertically in sub-processes
([bpmn-io#2127](bpmn-io#2127))
* `FIX`: hide lane label during direct editing
* `DEPS`: update to `diagram-js@14.9.0`

## 17.9.2

* `FIX`: keep direction when collapsing pools
([bpmn-io#2208](bpmn-io#2208))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make keyboard binding implicit / remove ability to bind to any element
6 participants