Skip to content

refactor: remove "Bpmn" prefix from renderer ignore option names#3484

Draft
tbouffard wants to merge 12 commits intomasterfrom
refactor/rename_renderer_ignore_options
Draft

refactor: remove "Bpmn" prefix from renderer ignore option names#3484
tbouffard wants to merge 12 commits intomasterfrom
refactor/rename_renderer_ignore_options

Conversation

@tbouffard
Copy link
Member

@tbouffard tbouffard commented Mar 4, 2026

Rename ignoreBpmnLabelStyles, ignoreBpmnActivityLabelBounds, and
ignoreBpmnTaskLabelBounds to ignoreLabelStyles, ignoreActivityLabelBounds,
and ignoreTaskLabelBounds.
There is no reason to add the BPMN prefix as we know here that the options apply to BPMN concepts.

Also rename the corresponding test utility properties (rendererIgnoreBpmn* → rendererIgnore*).

Notes

Rename ignoreBpmnLabelStyles, ignoreBpmnActivityLabelBounds, and
ignoreBpmnTaskLabelBounds to ignoreLabelStyles, ignoreActivityLabelBounds,
and ignoreTaskLabelBounds.
Also rename the corresponding test utility properties (rendererIgnoreBpmn* → rendererIgnore*).

In addition, destructure the mxGraph objects for simplification.
@tbouffard tbouffard added the refactoring Code refactoring label Mar 4, 2026
@github-actions
Copy link

github-actions bot commented Mar 4, 2026

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

🕐 Build time: 0.011s

🤖 By surge-preview

@github-actions
Copy link

github-actions bot commented Mar 4, 2026

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

🕐 Build time: 0.012s

🤖 By surge-preview

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR removes the "Bpmn" infix from the RendererOptions property names (ignoreBpmnLabelStylesignoreLabelStyles, ignoreBpmnActivityLabelBoundsignoreActivityLabelBounds, ignoreBpmnTaskLabelBoundsignoreTaskLabelBounds) and their corresponding test utility counterparts. It also simplifies the mxGraph object exports in initializer.ts using destructuring.

Changes:

  • Rename three RendererOptions public API properties in src/component/options.ts, BpmnRenderer.ts, and StyleComputer.ts to drop the "Bpmn" infix
  • Rename corresponding test utility properties (rendererIgnoreBpmn*rendererIgnore*) in the shared page utilities and all e2e/unit tests
  • Simplify initializer.ts by replacing multiple individual @internal const exports with a single destructured export

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/component/options.ts Renames three RendererOptions properties and updates JSDoc cross-references to use {@link} syntax
src/component/mxgraph/BpmnRenderer.ts Updates private fields and the isLabelBoundsIgnored function signature to use renamed options
src/component/mxgraph/renderer/StyleComputer.ts Updates private field and usage for the renamed ignoreLabelStyles option
src/component/mxgraph/initializer.ts Consolidates individual mxGraph exports into a single destructured export
dev/ts/shared/main.ts Updates query-parameter-to-option-name mappings for the renamed properties
test/shared/visu/bpmn-page-utils.ts Renames PageOptions interface properties and their URL-building usages
test/e2e/bpmn.rendering.ignore.options.test.ts Updates test variable and option names to match new API
test/unit/component/mxgraph/BpmnRenderer.test.ts Updates test describe block names and variable names
test/unit/component/mxgraph/renderer/StyleComputer.test.ts Updates test variable and constructor option names

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

tbouffard added 10 commits March 5, 2026 07:55
Declaring some mxGraph types as internal broke the generation of the bundle of the types.
There is no need to declare them as internal, they are not added to the bundle of the types, so remove the internal declaration
@sonarqubecloud
Copy link

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 482 to +484
describe('compute style - ignore BPMN label styles', () => {
describe.each([[undefined], [false], [true]])(`Ignore BPMN label styles (renderer option): %s`, (ignoreBpmnLabelStyles: boolean) => {
const styleComputer = new StyleComputer(ignoreBpmnLabelStyles === undefined ? {} : { ignoreBpmnLabelStyles });
const expectFontStyles = !(ignoreBpmnLabelStyles ?? false);
describe.each([[undefined], [false], [true]])(`Ignore BPMN label styles (renderer option): %s`, (ignoreLabelStyles: boolean) => {
const styleComputer = new StyleComputer(ignoreLabelStyles === undefined ? {} : { ignoreLabelStyles });
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactoring Code refactoring

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants