0.14.0
This new release focuses on the improvement of the API to add one or several Overlays, on implementation of the new API to remove all the overlays of a specific BPMN element, on adding automatic tests on Webkit, on the improvement of the coverage.
Thanks to all the contributors of this release 🌈: @aibcmars, @csouchet, and @tbouffard
See milestone 0.14.0 to get the list of issues covered by this release.
Highlights
Add one or several Overlays
API
class BpmnElementsRegistry {
/**
* Add one/several overlays to a BPMN element.
*
* Notice that if you pass an id that is not related to an existing BPMN element, nothing happens on the rendering side.
*
* @param bpmnElementId The BPMN id of the element where to add the overlays
* @param overlays The overlays to add to the BPMN element
*/
addOverlays(bpmnElementId: string, overlays: Overlay | Overlay[]): void {
...
}
...
}
New position for Ovelay on Shape: top-center
, bottom-center
, middle-left
, middle-right
Position for Ovelay on Edge: start
, middle
, end
Usage
Add one or several Overlays, with default style, on an Edge of the BPMN Diagram
// Add an overlay to BPMN elements with id 'sequence_flow_1'
bpmnVisualization.bpmnElementsRegistry.addOverlays('sequence_flow_1', { position: 'middle', label: '40' });
// Add several overlays to BPMN element with id 'sequence_flow_3'
bpmnVisualization.bpmnElementsRegistry.addOverlays('sequence_flow_3', [{ position: 'end', label: '110' }, { position: 'start', label: '40' }]);
Add one or several stylized Overlays
// Add an overlay to BPMN elements with id 'task_1'
bpmnVisualization.bpmnElementsRegistry.addOverlays('task_1', {
position: 'top-left',
label: '40',
style: {
font: { color: 'Chartreuse', size: 8 },
fill: { color: 'Pink', opacity: 50 },
stroke: { color: 'DarkSeaGreen', width: 2 }
}
});
// Add several overlays to BPMN element with id 'task_3'
bpmnVisualization.bpmnElementsRegistry.addOverlays('task_3', [
{
position: 'bottom-right',
label: '110',
style: {
font: { color: '#663399', size: 8 },
fill: { color: '#FFDAB9', opacity: 50 },
stroke: { color: 'DarkSeaGreen', width: 2 }
}
},
{
position: 'top-left',
label: '40',
style: {
font: { color: 'MidnightBlue', size: 30 },
fill: { color: 'Aquamarine', opacity: 70 },
stroke: { color: '#4B0082', width: 1 }
}
}
]);
Rendering
Add one or several Overlays, with default style, on an Shape of the BPMN Diagram
Add one or several Overlays, with default style, on an Edge of the BPMN Diagram
Add one or several stylized Overlays
Remove all the overlays of a specific BPMN element
API
class BpmnElementsRegistry {
/**
* Remove all overlays of a BPMN element.
*
* <b>WARNING</b>: could be renamed when adding support for removal of one or several specific overlays.
*
* @param bpmnElementId The BPMN id of the element where to remove the overlays
*/
removeAllOverlays(bpmnElementId: string): void {
...
}
...
}
Usage
// all overlays of the BPMN element with id: activity_1
bpmnVisualization.bpmnElementsRegistry.removeAllOverlays('activity_1');
Automatic tests on Webkit
Github actions
The e2e tests are automatically run on Webkit on MacOs with Github actions on Pull request.
Locally
To execute the e2e tests on Webkit locally, run the following command:
BROWSERS=webkit npm run test:e2e
Coverage improvement
0.13.0
0.14.0
What's Changed
🧲 BPMN diagram usability
- [FEAT] Provide styling options for Overlay (#1218) @csouchet
- [FEAT] Add overlays on Edge (#1207) @aibcmars
- [FEAT] Remove all overlays of a given bpmn shape element (#1186) @csouchet
- [FEAT] Add new overlay positions (#1191) @tbouffard
📝 Documentation
- [DOC] Add various improvements (#1216) @tbouffard
📦 Dependency updates
- [INFRA] dev - Bump cssnano from 4.1.10 to 5.0.0 (#1229) @dependabot
- [INFRA] dev - Bump rollup from 2.44.0 to 2.45.1 (#1231) @dependabot
- [INFRA] dev - Bump postcss from 8.2.9 to 8.2.10 (#1233) @dependabot
- [INFRA] dev - Bump tailwindcss from 2.0.4 to 2.1.1 (#1228) @dependabot
- [INFRA] dev - Bump @typescript-eslint/eslint-plugin from 4.20.0 to 4.21.0 (#1232) @dependabot
- [INFRA] dev - Bump eslint from 7.23.0 to 7.24.0 (#1230) @dependabot
- [INFRA] dev - Bump typed-mxgraph from 1.0.0 to 1.0.1 (#1224) @tbouffard
- [INFRA] dev - Bump @typescript-eslint/parser from 4.20.0 to 4.21.0 (#1226) @dependabot
- [INFRA] dev - Bump typescript from 4.2.3 to 4.2.4 (#1227) @dependabot
- [INFRA] dev - Bump typedoc from 0.20.34 to 0.20.35 (#1220) @dependabot
- [INFRA] dev - Bump postcss from 8.2.8 to 8.2.9 (#1222) @dependabot
- [INFRA] dev - Bump jest-image-snapshot from 4.4.0 to 4.4.1 (#1219) @dependabot
- [INFRA] dev - Bump @typescript-eslint/eslint-plugin from 4.19.0 to 4.20.0 (#1221) @dependabot
- [INFRA]: Bump y18n from 4.0.0 to 4.0.1 (#1215) @dependabot
- [INFRA] dev - Bump rollup from 2.42.2 to 2.44.0 (#1209) @dependabot
- [INFRA] dev - Bump @typescript-eslint/parser from 4.18.0 to 4.20.0 (#1213) @dependabot
- [INFRA] dev - Bump @rollup/plugin-node-resolve from 11.2.0 to 11.2.1 (#1210) @dependabot
- [INFRA] dev - Bump @types/jest from 26.0.21 to 26.0.22 (#1208) @dependabot
- [INFRA] dev - Bump @typescript-eslint/eslint-plugin from 4.18.0 to 4.19.0 (#1200) @dependabot
- [INFRA] dev - Bump eslint from 7.22.0 to 7.23.0 (#1201) @dependabot
- [INFRA] dev - Bump typedoc from 0.20.33 to 0.20.34 (#1205) @dependabot
- [INFRA] dev - Bump playwright from 1.9.2 to 1.10.0 (#1202) @dependabot
- [INFRA] dev - Bump asciidoctor from 2.2.1 to 2.2.2 (#1203) @dependabot
- [INFRA] dev - Bump rollup from 2.42.0 to 2.42.2 (#1189) @dependabot
👻 Maintenance
- [INFRA] Run WebKit e2e tests on macOS (#1197) @tbouffard
- [TEST] Simplify the directory layout of the shapes/edges overlay snapshots (#1225) @csouchet
- [TEST] Add overlays navigation visual tests (#1214) @csouchet
- [REFACTOR] Reorganize BpmnQuerySelectors usage (#1198) @tbouffard
- [INFRA] Simplify how workflows are triggered (#1153) @tbouffard
- [TEST] Refactor e2e tests for adding overlays (#1194) @csouchet
- [REFACTOR] Update types in mxCellRenderer overlays management (#1195) @tbouffard
- [REFACTOR] Don't use special prefix in private field name (#1196) @tbouffard
- [INFRA] Fix the trigger of the examples repository on release (#1192) @csouchet
- [TEST] Add more DOM integration tests (#1193) @tbouffard