-
Notifications
You must be signed in to change notification settings - Fork 70
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
fix: update config panel when deleting a connection #13437
fix: update config panel when deleting a connection #13437
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #13437 +/- ##
=======================================
Coverage 93.99% 93.99%
=======================================
Files 1456 1456
Lines 20106 20108 +2
Branches 2438 2438
=======================================
+ Hits 18899 18901 +2
Misses 954 954
Partials 253 253 ☔ View full report in Codecov by Sentry. |
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.
Nice solution! 🤩
I only miss a more descriptive test-case for the triggering of selection.changed event.
And I have a suggestion removing the oldSelection
variable since it does not look like we need it (yet), but I also see the pros of keeping it, so that one is up to you 😬
frontend/packages/process-editor/src/hooks/useBpmnEditor.test.tsx
Outdated
Show resolved
Hide resolved
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.
Nice changes!
But can we avoid using any
for the currentEventType?
I'm not sure what would make sense to type it as, as I'm unsure if bpmn-js or diagram-js exports typedefiniton for their events, i find the documentation very hard to navigate/search so it might be there somewhere and i've just not found it yet. |
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.
Testet OK.
Description
This PR changes the logic for tracking which element is selected in process editor. Using the event from diagramjs
selection.changed
instead of trying to sync our selection throughshape.add
,shape.remove
,connection.remove
andelement.click
.This solves some other issues like for example: the Ctrl-F finder not updating selected element in the config panel.
Related Issue(s)
Verification
Documentation