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

[Spike] Implement new component to render SVGs #9029

Closed
dpaun1985 opened this issue Jun 28, 2024 · 1 comment
Closed

[Spike] Implement new component to render SVGs #9029

dpaun1985 opened this issue Jun 28, 2024 · 1 comment
Assignees
Labels
component: onboarding Onboarding merchant in KYC, dev vs live, etc focus: account lifecycle type: spike

Comments

@dpaun1985
Copy link
Contributor

dpaun1985 commented Jun 28, 2024

When implementing #8808 , we noticed that the bundle size increased when SVGs are rendered as React components.
One of the solutions suggested in pe4Hk0-1d6-p2#comment-1459 is to implement a new component to render the SVGs through an SVG map.

We need to identify if we can and how to implement the component in order to be used for #8808 in:

  1. woocommerce payments
  2. woocommerce core

The purpose of #8808 is to implement a component for the payment method icons, that can be re-used in different places, having consistency across all places.

The PRs implementing the component are: #8977 and #48598

A SVG component similar to what we need is already implemented in wcpay: https://github.com/Automattic/woopay/blob/4f16439719d375cea68ec54120edd38cac471bf9/svgs/README.md

Details about the SVG component : #8808 (comment) and pe4Hk0-1d6-p2#comment-1459

@dpaun1985 dpaun1985 added the component: onboarding Onboarding merchant in KYC, dev vs live, etc label Jun 28, 2024
@dpaun1985 dpaun1985 self-assigned this Jul 1, 2024
@mordeth
Copy link
Contributor

mordeth commented Jul 1, 2024

This spike can be closed since we’ve found a way to exclude the SVG-in-JS from the bundle.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: onboarding Onboarding merchant in KYC, dev vs live, etc focus: account lifecycle type: spike
Projects
None yet
Development

No branches or pull requests

4 participants