-
Notifications
You must be signed in to change notification settings - Fork 206
fix: update on import done #1169
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
Conversation
There was a problem hiding this 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 fixes a stale element issue by changing the event listener from root.added to import.done in the BpmnPropertiesPanel component. The change ensures the properties panel is properly updated when a BPMN diagram is imported, addressing issue #1131.
Key changes:
- Event listener changed from
root.addedtoimport.donein the main component - Test updated to reflect the new event being listened to
- Canvas mock infrastructure enhanced to support testing
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/render/BpmnPropertiesPanel.js | Changed event listener from root.added to import.done, now retrieves root element from canvas service, and removed selectedElement from dependency array |
| test/spec/BpmnPropertiesPanel.spec.js | Updated test name and event firing to match new import.done behavior, added canvas mock setup in test helper |
| test/spec/mocks/index.js | Enhanced Injector mock to accept canvas option for testing |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Does it continue to work with drilldown into sub-processes? This is the reason we hooked up to |
It looks as if it continues to work as expected ✔️ |
I checked the subprocess part in the review, and indeed it works fine. |
|
I will go ahead and implement the same fix in dmn-js-properties-panel. |
Fixes the stale element issue by updating on
import.done. I tried a different approach but failed. This is the only fix I found that doesn't inroduce significant changes like #1159.The fix can be verified using https://github.com/bpmn-io/bpmn-js-properties-panel/tree/1131-stale-element-tmp:
Fixes #1131
Proposed Changes
Checklist
To ensure you provided everything we need to look at your PR:
@bpmn-io/srtoolCloses {LINK_TO_ISSUE}orRelated to {LINK_TO_ISSUE}