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

feat: introduce plugins infrastructure and add OverlaysPlugin #62

Merged
merged 4 commits into from
Aug 21, 2023

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented Aug 20, 2023

This infrastructure is a first try to propose extension points with plugins. It is subject to change in the future.
The OverlaysPlugin demonstrates how to create and use a plugin. It provides a method to show or hide overlays. They stay in the DOM contrarily to the BpmnElementsRegistry.removeOverlays method that actually removes overlays from the model.
Hiding overlays supports BPMN navigation which means that the overlays stay hidden while panning and zooming.

Demo

  • create a dedicated demo for the OverlaysPlugin
  • packaging: all pages of the demo are automatically packaged within the distribution. Previously, they had to be declared manually.

Build of the 'addons' lib: generate sourceMap to easily debug the demo.

Notes

closes #8

The idea of having a method to hide/show overlays comes from process-analytics/bpmn-visualization-js#1217: mxGraph stores overlays in a dedicated HTML element, so it is easy to hide it.

The BPMN navigation doesn't remove the style applied externally from mxGraph (to hide the overlays) as shown in the video below 👇🏿. It is currently not activated in the demo because when doing a panning to the bottom of the page, the container height increases. This probably occurs because the height is not detected as a 'fixed' value. This will enable later (#63).

demo_OverlaysPlugin_support_navigation.mp4

This infrastructure is a first try to propose extension points with plugins. It is subject to change
in the future.
The `OverlaysPlugin` demonstrates how to create and use a plugin. It provides a method to show or
hide overlays. They stay in the DOM contrarily to the `BpmnElementsRegistry.removeOverlays` method
that actually removes overlays from the model.
Hiding overlays supports BPMN navigation which means that the overlays stay hidden while panning
and zooming.

Demo
  - create a dedicated demo for the `OverlaysPlugin`
  - packaging: all pages of the demo are automatically packaged within the distribution. Previously,
  they had to be declared manually.

Build of the 'addons' lib: generate sourceMap to easily debug the demo.
@tbouffard tbouffard added the enhancement New feature or request label Aug 20, 2023
@github-actions
Copy link

github-actions bot commented Aug 20, 2023

♻️ PR Preview 829b0d5 has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

@tbouffard tbouffard marked this pull request as ready for review August 21, 2023 04:47
@tbouffard tbouffard merged commit 6c55211 into main Aug 21, 2023
3 checks passed
@tbouffard tbouffard deleted the feat/introduce_plugins branch August 21, 2023 04:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEAT] Provide an experimental mechanism to register addons/extensions/plugins
1 participant