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

fix: ensure numeric attributes are parsed as number #3040

Merged
merged 3 commits into from
Feb 26, 2024

Conversation

tbouffard
Copy link
Member

@tbouffard tbouffard commented Feb 20, 2024

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
Copy link

github-actions bot commented Feb 20, 2024

🎊 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

Copy link

github-actions bot commented Feb 20, 2024

🎊 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

Copy link

@tbouffard tbouffard merged commit c0cb959 into master Feb 26, 2024
1 check passed
@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