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

feat: Add New Icons #2288

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

feat: Add New Icons #2288

wants to merge 25 commits into from

Conversation

renatamottam
Copy link
Contributor

@renatamottam renatamottam commented Apr 22, 2024

⚠️ This PR is in draft because it is part of a standby feature, New Icons; we will return to it.

What's the purpose of this pull request?

This PR updates our icon library to fit the new VTEX Design Foundation.

Activities

For the Future

  • Improve flow of adding new icons
  • Add Icons page back to documentation

How it works?

Before After
Screenshot 2024-04-23 at 11 36 05 Screenshot 2024-04-23 at 14 07 09

For now, we're going to accept both symbol styles, but all new symbols added by us will be following the new pattern and the old will be deprecated eventually. Some important changes on the Icon component:

  • Icon's size will be defined using size prop
  • Our new default size is 24
  • height, width and weight props are now marked as deprecated (but it's still working)

How to test it?

Our old doc is updated for testing and reviewing purposes: https://faststore-site-git-feat-new-icons-faststore.vercel.app/docs/icons

@renatamottam renatamottam self-assigned this Apr 22, 2024
Copy link

vercel bot commented Apr 22, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
faststore-site ⬜️ Ignored (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 8:27pm

Copy link

codesandbox-ci bot commented Apr 22, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@renatamottam renatamottam changed the title Feat: Add New Icons [Major] Feat: Add New Icons May 2, 2024
@renatamottam renatamottam reopened this Jan 7, 2025
@renatamottam renatamottam changed the title [Major] Feat: Add New Icons feat: Add New Icons Jan 9, 2025
renatamottam and others added 20 commits January 15, 2025 20:03
Should be used as reference
> ⚠️ This PR is `in draft` because it is part of a standby feature, New
Icons; we will return to it.

- Replace Icon components declarations:
    - Renames `name` prop to add `fs-` prefix and convert to kebab-case
    - Removes `weight` prop if exists
- Replaces `width` and `height` props with `size`. (Allowed size values:
`20, 24, 32`. If the previous value is <= 20, the value will be 20, if
the value is >= 32, the new value will be 32. Else, we don't need to add
the size prop - the default value will be`24`.

**Updates**
- [x] faststore/components/atoms
- [x] faststore/components/molecules
- [x] faststore/components/organisms
- [x] faststore/core
     - Core components
     - Icons in `sections.json`
        -  Renames Envelop for `Envelop` -> fs-envelop

**TO-DOs**:
- [x] Renames PaymentMethods icons
- [x] Renames Social icons
- [ ]
[Rating.tsx](#2292 (comment))
: We will have to fix this component and its SVG on another PR.

<!--- Tell us the role of the new feature, or component, in its context.
--->

<!--- Describe the steps with bullet points. Is there any external link
that can be used to better test it or an example? --->

<!--- Add a link to a deploy preview from `gatsby.store` AND
`nextjs.store` with this branch being used. --->

<!--- Tip: You can get an installable version of this branch from the
CodeSandbox generated when this PR is created. --->

[Update Icons to Material
Symbols](https://vtex-dev.atlassian.net/browse/SFS-760?atlOrigin=eyJpIjoiMzBkZThjZDYzMjkxNGUyZmFkNmY0MTI0NjU0OTVkNjkiLCJwIjoiaiJ9)

---------

Co-authored-by: renatamottam <[email protected]>
Co-authored-by: Renata Motta <[email protected]>
.replace(/\/([^\/]*)\//, '/$1-')}`
)
}
// const { pathname } = new URL(request.url)
Copy link
Contributor

Choose a reason for hiding this comment

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

🎗️ TODO: uncomment this part when merging.

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.

3 participants