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: flatten Nutri-Score and Eco-Score SVG icons #6872

Merged
merged 1 commit into from
Jun 10, 2022

Conversation

stephanegigandet
Copy link
Contributor

The new Nutri-Score and Eco-Score icons did not display correctly in Smoothie (probably an issue with how the flutter_svg package deals with clipPath and/or transforms).

See: openfoodfacts/smooth-app#2205

In order to solve the issue, the corresponding SVG icons were flattened (removing clipPath and transforms, so that the paths have absolute coordinates).

It's unfortunately not possible to do automatically through gulp-svg / SVGO:

The method that worked for me:

  • using the Flatten SVG option of https://lean-svg.netlify.app/
  • removing the clipPath manually in Inkscape for the 2 Nutri-Score B and D icons that appeared broken in lean-svg when the Flatten SVG option was active

@sonarqubecloud
Copy link

sonarqubecloud bot commented Jun 8, 2022

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

No Coverage information No Coverage information
No Duplication information No Duplication information

Copy link
Member

@alexgarel alexgarel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good !

@stephanegigandet stephanegigandet merged commit c7dae5c into main Jun 10, 2022
@stephanegigandet stephanegigandet deleted the flatten-nutriscore-svg branch June 10, 2022 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants