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

SVG maintenance #704

Merged
merged 4 commits into from
Jun 4, 2021
Merged

SVG maintenance #704

merged 4 commits into from
Jun 4, 2021

Conversation

drillprop
Copy link
Contributor

Fix #583

+ 'mask-type',
'height',
'maskUnits',
'maskContentUnits'
Copy link
Contributor Author

@drillprop drillprop Jun 2, 2021

Choose a reason for hiding this comment

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

Had to add this. SVGR using the old version of the SVGO package, which is removing mask-type from attributes gregberge/svgr#336. Some of our SVGs have this attribute(e.g. transaction illustration, avatar silhouette) and it's needed to properly display them

@@ -7,6 +7,9 @@ module.exports = {
typescript: true,
svgo: true,
prettier: true,
svgoConfig: {
plugins: [{ removeViewBox: false }],
},
Copy link
Contributor Author

@drillprop drillprop Jun 2, 2021

Choose a reason for hiding this comment

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

Decided to add this. Some illustrations, for example empty-state-illustration.svg was not displayed correctly on smaller devices. I think we should apply this plugin to all of our SVGs. You can read why here

Copy link
Contributor

@mikkio-j mikkio-j left a comment

Choose a reason for hiding this comment

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

Checked those svgs and everything seems to be looking good. I don't think I missed something. Nothing to add when it comes to code or config for svgr

package.json Outdated Show resolved Hide resolved
@kdembler kdembler merged commit 5244c8e into Joystream:sumer Jun 4, 2021
kdembler added a commit that referenced this pull request Jun 9, 2021
* move assets to shared folder

* update svgr config, add new codegen scripts

* patch svgo, generate new svg components

* Update package.json

Co-authored-by: Klaudiusz Dembler <accounts@kdembler.com>
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.

3 participants