Skip to content

Add keep selection visible on canvas resize feature#2435

Draft
barinali wants to merge 3 commits into
developfrom
issue-5957-keep-selection-visible-on-resize
Draft

Add keep selection visible on canvas resize feature#2435
barinali wants to merge 3 commits into
developfrom
issue-5957-keep-selection-visible-on-resize

Conversation

@barinali
Copy link
Copy Markdown
Member

Proposed Changes

This pull request aims to incorporate the "keep selection visible on canvas resize" feature from diagram-js.

While this tangible introduces the feature, this branch also includes to-be-removed commits for testing purposes.

Checklist

Ensure you provide everything we need to review your contribution:

  • Contribution meets our definition of done
  • Pull request establishes context
    • Link to related issue(s), i.e. Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}
    • Brief textual description of the changes
    • Screenshots or short videos showing UI/UX changes
    • Steps to try out, i.e. using the @bpmn-io/sr tool

@barinali barinali self-assigned this May 22, 2026
@barinali barinali requested review from a team and Copilot May 22, 2026 13:33
@bpmn-io-tasks bpmn-io-tasks Bot added the needs review Review pending label May 22, 2026
@barinali barinali requested a review from barmac May 22, 2026 13:37
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates the “keep selection visible on canvas resize” behavior into bpmn-js by enabling the corresponding diagram-js feature module in the interactive bundles and adding regression coverage for the expected scrolling behavior on resize.

Changes:

  • Add keep-selection-visible-on-resize to NavigatedViewer and Modeler module composition.
  • Add a dedicated feature spec + BPMN fixture to verify scrolling behavior when the canvas shrinks.
  • Update the diagram-js dependency to a GitHub ref that includes the new feature.

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
lib/NavigatedViewer.js Enables the keep-selection-visible behavior for the navigated viewer bundle.
lib/Modeler.js Enables the keep-selection-visible behavior for the modeler bundle.
test/spec/features/keep-selection-visible-on-resize/KeepSelectionVisibleOnResizeSpec.js Adds tests covering scroll/no-scroll behavior on canvas resize with a selection.
test/spec/features/keep-selection-visible-on-resize/keep-selection-visible-on-resize.bpmn Adds a minimal diagram fixture to position elements near edges for resize scenarios.
package.json Points diagram-js dependency at a GitHub ref containing the feature.
package-lock.json Updates lockfile to match the GitHub-sourced diagram-js dependency.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread package.json
@barinali
Copy link
Copy Markdown
Member Author

  • 48522ce needs to be removed before merging.
  • @barmac do you think we need this feature for the NavigatedViewer as well? If not, a30b045 to be removed.

@jarekdanielak jarekdanielak marked this pull request as draft June 1, 2026 09:04
@bpmn-io-tasks bpmn-io-tasks Bot added in progress Currently worked on and removed needs review Review pending labels Jun 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in progress Currently worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants