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

Optimize SVG assets and update builder interface #5934

Closed

Conversation

joshblack
Copy link
Contributor

@joshblack joshblack commented Apr 24, 2020

Closes #5568

This PR adds in the ability to optimize SVG assets in the output package directory, alongside including QOL fixes for our builder packages.

This PR also adds in tests for the icons-vue package since we ended up needing to update the builder with the new metadata format. A big source of the LOC changes comes from the snapshots generating its public API.

A lot of the diff seems to come git detecting deletions of assets when in realizing the svg folder just moved to src/svg 😅

Changelog

New

  • e2e/icons-vue
    • Add PublicAPI tests for icons-vue
  • Add official vue builder to icon-build-helpers
  • Add svg builder for optimizing SVG assets
  • Add new output extension, this extension does the following:
    • Optimizes asset sources
    • Transform asset source to JS descriptor
    • Provides module name

Changed

  • svg assets now live in src/svg instead of svg
  • icon-build-helpers
    • Metadata now takes in an advanced input option for SVG and extension directories
      • Update e2e tests to use new syntax for input
      • Update sketch task to use new syntax
    • Builders are now simplified with a new metadata structure
      • react builder has been updated
      • vanilla builder has been updated
    • Bugfix for metadata extensions where it was called with an empty object instead of letting default options be applied
  • Update all icon/pictogram tasks with new metadata syntax

Removed

  • Un-used files from icon-build-helpers package
  • Remove old entrypoint test for icons-vue
  • Remove unused icons-vue task files

Testing / Reviewing

@netlify
Copy link

netlify bot commented Apr 24, 2020

Deploy preview for carbon-components-react ready!

Built with commit 678c7b4

https://deploy-preview-5934--carbon-components-react.netlify.app

@joshblack joshblack closed this Apr 24, 2020
@joshblack joshblack deleted the feat/optimize-svg-assets branch April 24, 2020 19:06
@netlify
Copy link

netlify bot commented Apr 24, 2020

Deploy preview for carbon-components-react ready!

Built with commit 047ad11

https://deploy-preview-5934--carbon-components-react.netlify.app

@netlify
Copy link

netlify bot commented Apr 24, 2020

Deploy preview for carbon-elements failed.

Built with commit 678c7b4

https://app.netlify.com/sites/carbon-elements/deploys/5ea32e3a6e51050006865776

@netlify
Copy link

netlify bot commented Apr 24, 2020

Deploy preview for carbon-elements failed.

Built with commit 047ad11

https://app.netlify.com/sites/carbon-elements/deploys/5ea3323397e4290006804da5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Icon bug: Using information--filled and closed icons together causes the info icon to render incorrectly
1 participant