bpmn-visualization-js icon indicating copy to clipboard operation
bpmn-visualization-js copied to clipboard

refactor: [POC] investigate replacement of mxGraph by [email protected] (2nd attempt)

Open tbouffard opened this issue 1 year ago • 3 comments

This is a POC and it is not intended to be merged into master, so don't expect to find a high quality code here! 😺 This is a continuation of #2366

Please don't rebase on master. If necessary, merge the master branch but instead we will create a new POC with the latest changes from the master branch.

Start from master e8fa9071 (0.37.0 with dev dependencies update only)

Purpose

  • evaluate the migration effort
  • detect problems early
  • apply improvements to the master branch to ease the future migration and improve tests
  • provide feedback to the maxGraph community and if possible fixes that we integrated in this PR as workaround
  • be ready to easily reuse this effort in a new Pull Request to test new maxGraph releases

Status

  • rebase previous POC on master branch
  • source compile
  • dev server starts, the demo is usable and it contains bugs 😄
    • label position OK (wasn't working in the previous POC), navigation and theme switch OK: see video in https://github.com/process-analytics/bpmn-visualization-js/pull/2756#issuecomment-1619513873
  • unit tests pass 💪🏿
  • ❌ integration tests KO (see below)
  • e2e tests: unknown. Some BPMN rendering tests fails as in the previous POC
### Handle TODO in the code
- [ ] manage the "TODO rebase" in the code. Created while rebasing the previous code on the master branch
- [ ] review all "TODO [email protected]": some can be handled thanks to the fix done on the master branch and that weren't available in the previous POC
### CSS classes not applied with the API
- [ ] in the `elements-identifications.html` demo, the CSS are sometimes applied but seems to disapear during navigation
- [ ] integration tests fail: the CSS classes are in the maxGraph model, but they are not generated in the DOM
- [ ] there is a "TODO rebase" in ShapeConfigurator for the CSS classes management that may relate to this problem
- [ ] the extraCssClasses should be a property in the CellStyle and not defined with a deep nested object
### Rework the integration tests
- [ ] Make the tests pass
- [ ] check style properties from the model: keep a single check by merging the code previously used to check the style string and the StyleMap to check the CellStyle (with bpmn addons)
- [ ] No more need for a dedicated BpmnStyle in the integration tests. Use the one from the sources

tbouffard avatar Jul 04 '23 04:07 tbouffard

🎊 PR Preview 21731805dac18428a1c1b1822defd4d5cb6c2701 has been successfully built and deployed to https://process-analytics-bpmn-visualization-js-doc_preview-pr-2756.surge.sh

:clock1: Build time: 0.013s

🤖 By surge-preview

github-actions[bot] avatar Jul 04 '23 04:07 github-actions[bot]

🎊 PR Preview 21731805dac18428a1c1b1822defd4d5cb6c2701 has been successfully built and deployed to https://process-analytics-bpmn-visualization-js-demo_preview-pr-2756.surge.sh

:clock1: Build time: 0.017s

🤖 By surge-preview

github-actions[bot] avatar Jul 04 '23 04:07 github-actions[bot]

✔️ navigation, theme and label position are OK in fc95b24

https://github.com/process-analytics/bpmn-visualization-js/assets/27200110/70048b69-ac97-452b-80fb-95e235463255

tbouffard avatar Jul 04 '23 05:07 tbouffard

POC completed, I am going to create a new poc based on the same commit on the master branch and maxGraph v0.10.0 to validate that this new version of maxGraph provides most improvements we need.

tbouffard avatar Apr 22 '24 14:04 tbouffard