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] Reduce the mxGraph stylesheet duplications to simplify custom configuration #2470

Open
tbouffard opened this issue Jan 20, 2023 · 0 comments
Labels
BPMN diagram styling Change the standard rendering: stroke color, thickness enhancement New feature or request
Milestone

Comments

@tbouffard
Copy link
Member

tbouffard commented Jan 20, 2023

Is your feature request related to a problem? Please describe.
In v0.29.1, the configuration of some BPMN elements is duplicated.
For instance, for each kinds of event, we create a specific mxGraph style. All styles are the same. So if we want to change the style in an application, we have to do it for all event kinds instead of doing it once.
This is also the case for tasks, activities and gateways.

See the examples repository or #2306 (comment) to see how this is currently managed. We provide convenient functions to get the list of gateway or event kinds for instance, but the duplication is here.

Describe the solution you'd like
We could introduce "type styles" like we do for CSS class names or with edge additional mxGraph styles.
The shared configuration will be defined in the "type styles" and the specific configuration the the "kind styles".
For instance, for events, we could introduce a bpmnEvent style (name to be defined) in addition to the already existing "event kind" styles.

When inserting the cell in the mxGraph model, we will need to add the "type styles" to the list of style.

Additional context
We can also apply it to Pool and Lane to share their style configuration, by introducing a "container style" for instance (use the same wording as for CSS class names).
This will also probably the time to document all registered mxGraph styles and CSS class names, and how this can be extended (link to examples)

@tbouffard tbouffard added enhancement New feature or request BPMN diagram styling Change the standard rendering: stroke color, thickness labels Jan 20, 2023
@tbouffard tbouffard added this to the Extensions milestone Jan 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BPMN diagram styling Change the standard rendering: stroke color, thickness enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant