Skip to content

fix: ensure numeric attributes are parsed as number#3040

Merged
tbouffard merged 3 commits into
masterfrom
2857-fix/parsing_bounds_too_many_decimals
Feb 26, 2024
Merged

fix: ensure numeric attributes are parsed as number#3040
tbouffard merged 3 commits into
masterfrom
2857-fix/parsing_bounds_too_many_decimals

Conversation

@tbouffard

@tbouffard tbouffard commented Feb 20, 2024

Copy link
Copy Markdown
Member

The XML parser now ensures that the following elements have numeric attributes

  • bounds of shapes
  • label bounds of shapes and edges
  • waypoints of edges

Previously, when the attribute contained too many decimals, the value was converted to a string instead of a number. Existing tests exhibited this behavior; they have been modified and enriched to cover all use cases and show that the issue is now fixed.
A high-level parsing test has also been added to use the diagram that was provided by the community to show the past problem.

closes #2857

Screencasts

Using the diagram provided to exhibit the issue in #2857

issue_2857_fix.mp4

The XML parser now ensures that the following elements have numeric attributes
    - bounds of shapes
    - label bounds of shapes and edges
    - waypoints of edges

Previously, when the attribute contained too many decimals, the value was converted to a string instead of a number.
Existing tests exhibited this behavior; they have been modified and enriched to cover all use cases and show that the
issue is now fixed.
A high-level parsing test has also been added to use the diagram that was provided by the community to show the past
problem.
@tbouffard tbouffard added the bug Something isn't working label Feb 20, 2024
@github-actions

github-actions Bot commented Feb 20, 2024

Copy link
Copy Markdown

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

🕐 Build time: 0.012s

🤖 By surge-preview

@github-actions

github-actions Bot commented Feb 20, 2024

Copy link
Copy Markdown

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

🕐 Build time: 0.012s

🤖 By surge-preview

@sonarqubecloud

Copy link
Copy Markdown

Comment thread test/unit/component/parser/xml/BpmnXmlParser.itp-commerce.7-7151-18707.test.ts Outdated
Comment thread test/unit/component/parser/xml/BpmnXmlParser.itp-commerce.7-7151-18707.test.ts Outdated
@tbouffard tbouffard merged commit c0cb959 into master Feb 26, 2024
@tbouffard tbouffard deleted the 2857-fix/parsing_bounds_too_many_decimals branch February 26, 2024 17:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] A diagram created with itp-commerce renders poorly when doing diagram navigation or fit

2 participants