Repository navigation
fix(dmn): resync overview viewbox when the panel is reopened - #6223
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
Apply the fix and tests to the Camunda 8 modeler as well.
Review effort: Lite
Findings: 1
Open (1)
What changed in this PR
Fixes stale DMN DRG overview viewboxes when the panel is reopened.
Changes:
- Resizes the overview canvas on reopen.
- Adds regression coverage.
- Documents the fix in the changelog.
| File | Description |
|---|---|
client/src/app/tabs/dmn/modeler/DmnModeler.js |
Resynchronizes the overview canvas on reopen. |
client/src/app/tabs/dmn/modeler/__tests__/DmnModelerSpec.js |
Adds regression coverage. |
CHANGELOG.md |
Documents the fix. |
The Camunda 8 modeler remains affected and needs the equivalent fix and regression coverage.
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Collaborator
|
Hi, can you please look into the copilot review comment? Thanks |
Contributor
Author
|
Applied the same reopen-time resize to the Camunda 8 (cloud-dmn) modeler, with its own regression test, in fbd683b. |
`DmnModeler#updateOverview` only calls `canvas.resized()` on the overview canvas the first time it is attached, comparing the DOM node's `parentNode` identity. The overview panel is never actually detached and reattached when it is opened or closed though -- its ancestor's CSS width is just toggled between 0 and its visible size -- so after the first mount `_attachOverview` is a permanent no-op and `resized()` is never called again. If the diagram content changes while the panel is closed, re- importing the overview invalidates diagram-js' cached viewbox, and the next read recomputes it against the container's live width, which is 0 while the panel is hidden. That 0-width viewbox then stays cached once the panel becomes visible again, so the DMN diagram renders shifted. Resync the overview canvas whenever it becomes visible, regardless of whether it was just attached. Closes camunda#4549
Apply the same reopen-time resize to the cloud-dmn DmnModeler and add its regression test. Related to camunda#4549 Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
barmac
force-pushed
the
claude/4549-fix
branch
from
October 13, 2026 14:52
fbd683b to
3f58a62
Compare
barmac
approved these changes
Oct 13, 2026
barmac
left a comment
Collaborator
There was a problem hiding this comment.
Thanks, this works correctly.
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
Closes #4549.
The DRG overview panel is only ever attached once; after that it's just toggled visible/hidden via CSS on its container.
DmnModeler#updateOverviewonly callscanvas.resized()on that first attach, so if the diagram changes while the panel is closed (its container is 0px wide), the overview canvas caches a 0-width viewbox and keeps using it once the panel is shown again, rendering the DMN diagram shifted. The fix resyncs the overview canvas whenever the panel becomes visible, not just on first attach.Checklist
Ensure you provide everything we need to review your contribution:
Closes {LINK_TO_ISSUE}orRelated to {LINK_TO_ISSUE}@bpmn-io/srtoolOnly the two checked boxes above reflect work actually done for this PR; I ran the added regression test on the committed HEAD (0 passed, 1 failed -> 1 passed, 0 failed) but didn't capture screenshots or a manual repro walkthrough.