-
Notifications
You must be signed in to change notification settings - Fork 36
feat: add an option to ignore BPMN LabelStyles #3386
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: add an option to ignore BPMN LabelStyles #3386
Conversation
Co-authored-by: tbouffard <27200110+tbouffard@users.noreply.github.com>
|
🎊 PR Preview b761cad has been successfully built and deployed to https://process-analytics-bpmn-visualization-js-doc_preview-pr-3386.surge.sh 🕐 Build time: 0.011s 🤖 By surge-preview |
|
🎊 PR Preview b761cad has been successfully built and deployed to https://process-analytics-bpmn-visualization-js-demo_preview-pr-3386.surge.sh 🕐 Build time: 0.01s 🤖 By surge-preview |
Co-authored-by: tbouffard <27200110+tbouffard@users.noreply.github.com>
|
@copilot New requirement, in the test/demo pages, manage a new query parameter to ignore label styles. |
Co-authored-by: tbouffard <27200110+tbouffard@users.noreply.github.com>
Added support for the |
Co-authored-by: tbouffard <27200110+tbouffard@users.noreply.github.com>
|
ℹ️ implementation seems ok, but the e2e tests running on macos Firefox are failing; this is not due to changes in this PR. |
|
tbouffard
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM






Problem
BPMN diagrams often contain inconsistent LabelStyles configurations where some shapes define custom fonts while others don't, leading to visual inconsistency in the rendered diagram. This was particularly problematic for users wanting consistent font rendering across their BPMN visualizations.
Solution
This PR introduces the
ignoreBpmnLabelStylesoption that allows users to ignore font configurations defined in BPMN LabelStyles, ensuring consistent font rendering across the entire diagram.Configuration
The option is configured at library initialization via
RendererOptions:Demo Page Testing
For testing purposes, the option can also be enabled in demo pages using a query parameter:
Behavioral Changes
false(default): Preserves existing behavior, respecting all font styles from BPMN LabelStylestrue: Ignores font family, size, and style (bold/italic/underline/strikethrough) from BPMN LabelStyles, using the library's default theme fonts insteadExample Use Case
Consider a BPMN diagram with mixed font definitions:
With
ignoreBpmnLabelStyles: true, all elements will use consistent default theme fonts, eliminating visual inconsistency.Implementation Details
StyleComputerto accept the new option and conditionally apply font stylesrenderer.ignore.label.style)Testing
Backward Compatibility
This change is fully backward compatible. The new option defaults to
false, preserving existing behavior for all current users while providing the new functionality for those who need it.Fixes #555, #869, and addresses requirements from #1993 and #2659.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.