Skip to content
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(context-pad): do not re-open for targets that were removed #893

Merged
merged 1 commit into from
May 7, 2024

Conversation

philippfromme
Copy link
Contributor

The fact that elements.changed could feature elements that were removed wasn't previously taken into account.

@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label May 6, 2024
@philippfromme philippfromme requested review from nikku, marstamm and barmac May 6, 2024 16:01
});
});

change(elements);
Copy link
Member

@nikku nikku May 7, 2024

Choose a reason for hiding this comment

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

Do we have this behavior covered in ChangeSupport specs?

I'd be afraid that we otherwise mock something that we don't even guarantee.

Copy link
Contributor Author

@philippfromme philippfromme May 7, 2024

Choose a reason for hiding this comment

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

elements.changed is always fired even when an element was deleted (using a command). GraphicsFactory then updates all parents. Since deleted elements don't have parents anymore they're ignored. shape.changed and connection.changed aren't fired when elements are deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We did handle delete explicitly in the context pad previously but changed it when the multi-element context pad was introduced.

Copy link
Member

Choose a reason for hiding this comment

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

Great explaination, thanks a lot. 🏅

Copy link
Member

Choose a reason for hiding this comment

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

Great catch (with this PR).

@philippfromme philippfromme merged commit 5f7522a into develop May 7, 2024
12 checks passed
@philippfromme philippfromme deleted the fix-context-pad-update branch May 7, 2024 07:23
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label May 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants