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(parser): let configure XML attribute processing #2704

Merged
merged 2 commits into from
May 25, 2023

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented May 22, 2023

Remove the 'entities' dependency.
By default, there is no need to be able to decode all entities as most of the time, only 'basic' entities are generally used in BPMN sources. Instead, bpmn-visualization now provides a small set of entities transform.

If there is a need to transform more entities, a new Parser option is now available to let application perform more processing.

closes #2680

Notes

Choice of the decoded entities

The minimal set of entities was chosen by checking

Tests

The existing unit tests already check the most common entities in the name attribute of the element in the semantic (used to display the label) and in all other attributes (standard like the 'id' attribute or in attributes of BPMN extensions).
Integration tests were added in this PR to ensure that the options passed at the lib initialization are correctly used by the parser.

Bundles size comparison

master: package built by GH Actions (007d881)
new implementation: 823b786

bpmn-visualization.min.js size decrease: 1941b / 1.89kb
Figures from the study done without implementation the internal entities decoding (#2680): 2736b / 2.67kb

bundle master new implementation
bpmn-visualization.js 2 925 511 2 918 900
bpmn-visualization.min.js 986 964 985 023

Remove the 'entities' dependency.
By default, there is no need to be able to decode all entities as most of the time, only 'basic' entities are generally
used in BPMN sources. Instead, `bpmn-visualization` now provides a small set of entities transform.

If there is a need to transform more entities, a new Parser option is now available to let application perform more
processing.
@tbouffard tbouffard added the lib integration Something about how an app can integrate the library label May 22, 2023
@github-actions
Copy link

github-actions bot commented May 22, 2023

♻️ PR Preview 9e4736a has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

@github-actions
Copy link

github-actions bot commented May 22, 2023

♻️ PR Preview 9e4736a has been successfully destroyed since this PR has been closed.

🤖 By surge-preview

@tbouffard tbouffard marked this pull request as ready for review May 22, 2023 09:49
@tbouffard tbouffard requested a review from csouchet May 22, 2023 09:49
@sonarcloud
Copy link

sonarcloud bot commented May 25, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

100.0% 100.0% Coverage
0.0% 0.0% Duplication

@tbouffard tbouffard merged commit 7f5ac76 into master May 25, 2023
@tbouffard tbouffard deleted the 2680-remove_entities branch May 25, 2023 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lib integration Something about how an app can integrate the library
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[INFRA] Remove the entities dependency
2 participants