Skip to content

Conversation

@philippfromme
Copy link
Contributor

@philippfromme philippfromme commented Oct 31, 2025

Proposed Changes

Due to the numerous issues found (camunda/camunda-modeler#5386) this reverts the changes that lead to these issues. We'll have to look into this again and maybe think about better ways to test the properties panel to make sure we catch these issues in the future.

Checklist

To ensure you provided everything we need to look at your PR:

  • Brief textual description of the changes present
  • Visual demo attached
  • Steps to try out present, i.e. using the @bpmn-io/sr tool
  • Related issue linked via Closes {LINK_TO_ISSUE} or Related to {LINK_TO_ISSUE}

@bpmn-io-tasks bpmn-io-tasks bot added the in progress Currently worked on label Oct 31, 2025
@philippfromme philippfromme changed the title Revert 5 42 2 Reverts keeping selected element in sync with canvas state Oct 31, 2025
@philippfromme philippfromme marked this pull request as ready for review October 31, 2025 09:47
@bpmn-io-tasks bpmn-io-tasks bot added needs review Review pending and removed in progress Currently worked on labels Oct 31, 2025
@philippfromme philippfromme requested a review from Copilot October 31, 2025 09:48
Copy link

Copilot AI left a 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 refactors the properties panel rendering logic by moving event handling and state management from the BpmnPropertiesPanelRenderer class into the BpmnPropertiesPanel React component. This enables better React lifecycle management and simplifies the renderer's responsibilities.

  • Event listeners moved from renderer to React component using useEffect hooks
  • State management now handled via React hooks (useState, useMemo, useCallback)
  • Renderer simplified to only handle root.added events and delegate to the React component

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/render/BpmnPropertiesPanelRenderer.js Removed state management and event handling logic; simplified to only handle root.added event
src/render/BpmnPropertiesPanel.js Added React hooks for event handling, state management, and layout changes; moved logic from renderer
test/spec/BpmnPropertiesPanel.spec.js Updated tests to reflect new component-based event handling; added tests for new event behaviors
test/spec/BpmnPropertiesPanelRenderer.spec.js Removed redundant rendering tests; simplified to test root.added behavior
src/provider/bpmn/BpmnPropertiesProvider.js Reordered constructor statements to register provider before storing injector
src/provider/zeebe/ZeebePropertiesProvider.js Reordered constructor statements to register provider before storing injector
src/provider/camunda-platform/CamundaPlatformPropertiesProvider.js Reordered constructor statements to register provider before storing injector

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@philippfromme philippfromme changed the title Reverts keeping selected element in sync with canvas state Revert keeping selected element in sync with canvas state Oct 31, 2025
@philippfromme philippfromme merged commit dc63061 into main Oct 31, 2025
9 checks passed
@philippfromme philippfromme deleted the revert-5-42-2 branch October 31, 2025 10:17
@bpmn-io-tasks bpmn-io-tasks bot removed the needs review Review pending label Oct 31, 2025
@barmac
Copy link
Member

barmac commented Oct 31, 2025

@philippfromme any root cause analysis for the problem?

@philippfromme
Copy link
Contributor Author

@philippfromme any root cause analysis for the problem?

Unfortunately I haven't found the exact root cause yet. But I suspect that part of the problem lies in the core properties panel (cf. https://github.com/bpmn-io/properties-panel/blob/51649e1450acb06a566435d14f75339bdaf5af59/src/PropertiesPanel.js#L142) and that it was more or less accidentally working. I need to look into this again.

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