Add keep selection visible on canvas resize feature#2435
Draft
barinali wants to merge 3 commits into
Draft
Conversation
6 tasks
Contributor
There was a problem hiding this comment.
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-resizetoNavigatedViewerandModelermodule composition. - Add a dedicated feature spec + BPMN fixture to verify scrolling behavior when the canvas shrinks.
- Update the
diagram-jsdependency 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.
Member
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
Closes {LINK_TO_ISSUE}orRelated to {LINK_TO_ISSUE}@bpmn-io/srtool