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: LEAP-388: Simplify SVG data URL generation #5595

Merged
merged 5 commits into from
Mar 27, 2024
Merged

Conversation

robot-ci-heartex
Copy link
Collaborator

@robot-ci-heartex robot-ci-heartex commented Mar 18, 2024

encodeSVG() is too complex for expected outcome, so it was simplified.

  • No quotes management
  • No namespace control (we build that SVG, so have full control already)
  • No other unnecessary code we don't need, because SVG is generated by us
  • Comments
  • Simple unit tests for couple of cases

PR fulfills these requirements

  • Tests for the changes have been added/updated
  • Docs have been added/updated
  • Best efforts were made to ensure docs/code are concise and coherent (checked for spelling/grammatical errors, commented out code, debug logs etc.)
  • Self-reviewed and ran all changes on a local instance

Describe the reason for change

https://github.com/HumanSignal/label-studio-frontend/security/code-scanning/10
Initial idea was to use SVG parser to parse+generate SVG again, but it turned out as a simplier problem

What feature flags were used to cover this change?

None

This change affects (describe how if yes)

  • Performance
  • Security
  • UX

Does this PR introduce a breaking change?

  • Yes, and covered entirely by feature flag(s)
  • Yes, and covered partially by feature flag(s)
  • No
  • Not sure (briefly explain the situation below)

What level of testing was included in the change?

  • e2e (codecept)
  • integration (cypress)
  • unit (jest)

@github-actions github-actions bot added the fix label Mar 18, 2024
Copy link

netlify bot commented Mar 18, 2024

Deploy Preview for heartex-docs canceled.

Name Link
🔨 Latest commit fb677b6
🔍 Latest deploy log https://app.netlify.com/sites/heartex-docs/deploys/66042b57e12cb600095c3004

Copy link

netlify bot commented Mar 18, 2024

Deploy Preview for label-studio-docs-new-theme canceled.

Name Link
🔨 Latest commit fb677b6
🔍 Latest deploy log https://app.netlify.com/sites/label-studio-docs-new-theme/deploys/66042b57877f2200080699ae

@hlomzik
Copy link
Collaborator

hlomzik commented Mar 22, 2024

/git merge

Workflow run
Successfully merged: 90 files changed, 3079 insertions(+), 1080 deletions(-)

@hlomzik
Copy link
Collaborator

hlomzik commented Mar 27, 2024

/git merge

Workflow run
Successfully merged: 75 files changed, 12234 insertions(+), 8580 deletions(-)

@hlomzik hlomzik marked this pull request as ready for review March 27, 2024 14:18
@hlomzik hlomzik enabled auto-merge (squash) March 27, 2024 14:22
@hlomzik hlomzik merged commit ca23fe8 into develop Mar 27, 2024
28 of 29 checks passed
@hlomzik hlomzik deleted the fb-leap-388/svg-xmlns branch March 27, 2024 15:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants