Skip to content

Conversation

@barmac
Copy link
Member

@barmac barmac commented Oct 24, 2025

Related to bpmn-io/bpmn-js-properties-panel#1159

Proposed Changes

  • element updates are moved to the renderer
  • tests are provided

@barmac barmac requested a review from philippfromme October 24, 2025 13:30
@bpmn-io-tasks bpmn-io-tasks bot added the needs review Review pending label Oct 24, 2025
@barmac
Copy link
Member Author

barmac commented Oct 24, 2025

Note:

  • no need for special handling for labels as they are not supported in dmn-js
  • layout update from outside is not implemented, cf. Add setLayout method #123

Comment on lines -127 to -143
useEffect(() => {
const onRootAdded = (e) => {
const element = e.element;

if (isImplicitRoot(element)) {
return;
}

_update(element);
};

eventBus.on('root.added', onRootAdded);

return () => {
eventBus.off('root.added', onRootAdded);
};
}, [ selectedElement ]);
Copy link
Member Author

Choose a reason for hiding this comment

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

This logic can be safely removed as we refuse to render implicit root in _render

Copy link
Contributor

Choose a reason for hiding this comment

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

eventBus.on('propertiesPanel.providersChanged', () => this._update());

// Handle root changes more carefully
eventBus.on('root.added', (event) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

What the hell was the agent doing? 😆

Copy link
Member Author

Choose a reason for hiding this comment

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

We had this logic in the component.

@philippfromme philippfromme self-requested a review October 24, 2025 14:36
Copy link
Contributor

@philippfromme philippfromme left a comment

Choose a reason for hiding this comment

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

🚀

@philippfromme philippfromme merged commit 74690d9 into main Oct 24, 2025
7 checks passed
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Oct 24, 2025
@philippfromme philippfromme deleted the stale-elements-fix branch October 24, 2025 14:37
@CommSupport-StockholmUni

This comment was marked as spam.

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.

4 participants