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: use the "Update Style" API in the monitoring demo #486

Merged
merged 9 commits into from
Apr 26, 2023

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented Apr 12, 2023

Remove the CSS class previously used to highlight the paths, and use the API instead. It provides better rendering results when zooming (proportions are kept).

closes #463

Live environment of examples

https://cdn.statically.io/gh/process-analytics/bpmn-visualization-examples/463_monitoring_demo_use_update-style_api/examples/index.html

Limitations

The line of the edge finishes at the same point of the top of the arrow, so the arrow seems not very sharp.
To avoid this, we should make the line finish prior to the end of the arrow . mxGraph options exist for this

image

Screenshots

image

image

Remove the CSS class previously used to highlight the paths, and use the API instead.
It provides better rendering results when zooming (proportions are kept).
@tbouffard tbouffard added the enhancement New feature or request label Apr 12, 2023
@tbouffard tbouffard requested a review from csouchet April 12, 2023 13:37
@tbouffard tbouffard marked this pull request as ready for review April 12, 2023 13:37
Copy link
Member

@csouchet csouchet left a comment

Choose a reason for hiding this comment

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

The legend for the path is broken. There is no more color 🙁

Maybe, we should calculate them like the other colors, dynamically in the JS code ^^

@tbouffard
Copy link
Member Author

tbouffard commented Apr 25, 2023

@csouchet the path legends is now fixed and the colors are set dynamically using the colors defined in the style object used to use the API.
See https://cdn.statically.io/gh/process-analytics/bpmn-visualization-examples/49651d9/demo/monitoring-all-process-instances/index.html

I am giving a try to a custom mxGraph style definition of sequence flows to see if I can handle the limitations (arrows glitch) directly in the demo. If it works, we will decide if we move that directly in the lib later.
--> after a few investigations, I didn't find example to quickly fix the problem. Defer the investigation.

@tbouffard tbouffard requested a review from csouchet April 25, 2023 18:53
@@ -198,8 +199,49 @@ class ExecutionData {
}
};
if (pathClass) {
data.pathClass = pathClass;
data.styleUpdate = buildStyleUpdateOptions(pathClass);
Copy link
Member

Choose a reason for hiding this comment

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

suggestion:
I thought that the property and the functions for the style of the path were not clear.
It took me a while to understand what they were referring to 🙁

Copy link
Member Author

@tbouffard tbouffard Apr 26, 2023

Choose a reason for hiding this comment

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

Let's rename

  • styleUpdate property --> pathStyle
  • buildStyleUpdateOptions function --> buildPathStyle
  • buildResetStyleUpdateOptions function --> buildResetPathStyle
  • pathClass variable --> pathName

Copy link
Member Author

Choose a reason for hiding this comment

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

@csouchet done in 95a8373

- styleUpdate property --> pathStyle
- buildStyleUpdateOptions function --> buildPathStyle
- buildResetStyleUpdateOptions  function --> buildResetPathStyle
- pathClass variable --> pathName
Copy link
Member

@csouchet csouchet left a comment

Choose a reason for hiding this comment

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

It's ok with the proposition in the comment #486 (comment).

@tbouffard tbouffard merged commit 9a2a8e9 into master Apr 26, 2023
@tbouffard tbouffard deleted the 463_monitoring_demo_use_update-style_api branch April 26, 2023 14:58
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] Update the monitoring demo to use the new Style API
2 participants