refactor: remove "Bpmn" prefix from renderer ignore option names#3484
refactor: remove "Bpmn" prefix from renderer ignore option names#3484
Conversation
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.
|
🎊 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 |
|
🎊 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 |
There was a problem hiding this comment.
Pull request overview
This PR removes the "Bpmn" infix from the RendererOptions property names (ignoreBpmnLabelStyles → ignoreLabelStyles, ignoreBpmnActivityLabelBounds → ignoreActivityLabelBounds, ignoreBpmnTaskLabelBounds → ignoreTaskLabelBounds) and their corresponding test utility counterparts. It also simplifies the mxGraph object exports in initializer.ts using destructuring.
Changes:
- Rename three
RendererOptionspublic API properties insrc/component/options.ts,BpmnRenderer.ts, andStyleComputer.tsto drop the "Bpmn" infix - Rename corresponding test utility properties (
rendererIgnoreBpmn*→rendererIgnore*) in the shared page utilities and all e2e/unit tests - Simplify
initializer.tsby replacing multiple individual@internalconst 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.
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
This reverts commit 7759d7a.
This reverts commit 09b1177.
This reverts commit 5b939e1.
This reverts commit 7759d7a.
…h object directly" This reverts commit 4640f8a.
|
There was a problem hiding this comment.
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.
| 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 }); |




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