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

ft: WIP: Ft use svg #78

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from
Draft

ft: WIP: Ft use svg #78

wants to merge 7 commits into from

Conversation

advl
Copy link
Contributor

@advl advl commented Dec 12, 2024

Done

A work-in progress PR displaying a PoC to leverage <svg><use> as a way to consume SVG sprites.

The trick of the sprites is to include several groups in the svg, and display only the targetted one (sprite.svg#my-icon-name).

A second minor feature is included : a PoC of SVG theming using intent colors. The last story, Illustration displays this concept.
In case we would like to proceed with this approach, it would only be necessary to refine the API of the component.
A third minor feature is included : the ability to programatically animate strokes of SVGs.

QA

Code Q/A :

  • Look at sprite.svg using the source diff.
  • Q/A the component api.

Visual Q/A :

  • Go to the design system package
  • Run Storybook
  • Look at the stories. Try to change the intents applied (negative <> positive). This should work on all stories.

PR readiness check

  • PR should have one of the following labels:
    • Feature 🎁, Breaking Change 💣, Bug 🐛, Documentation 📝, Maintenance 🔨.
  • All packages define the required scripts in package.json:
    • All packages: check and check:fix.
    • Packages with a build step: build.

Screenshots

[if relevant, include a screenshot or screen capture]

@advl advl marked this pull request as draft December 12, 2024 19:00
@advl advl requested review from bartaz and jmuzina December 12, 2024 19:00
@jmuzina
Copy link
Member

jmuzina commented Dec 13, 2024

In case we would like to proceed with this approach, it would only be necessary to refine the API of the component.

What do you see being refined about the component's API?

@advl
Copy link
Contributor Author

advl commented Dec 13, 2024

Make it configurable for plausible usage, ie, the width, the height. Rework the name of the props, the defaults.
I also wonder whether to split the wrapper (SVG) and "use" into two components (in case we'd like to consume several sprites together)
Open to additional ideas as well

@advl advl mentioned this pull request Dec 18, 2024
4 tasks
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.

2 participants