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

add support for multiple icon sets through subpath exports #579

Merged
merged 7 commits into from
Sep 24, 2024

Conversation

prichodko
Copy link
Collaborator

@prichodko prichodko commented Sep 10, 2024

Previously, we only synced the 20px variant of icons and allowed scaling down to 16px and 12px using a prop. Later, we discovered that some icons look different when they are smaller.

This PR introduces multi-entry bundling and exports for:

  • 20 → import {} from '@status-im/icons/20
  • 16 → import {} from '@status-im/icons/16
  • 12 → import {} from '@status-im/icons/12
  • social → import {} from '@status-im/icons/social
  • reactions → import {} from '@status-im/icons/reactions

This required changes in the file structure, Vite's bundling config, and package.json exports.

I also removed Tamagui from the icon's template, thus removing runtime and making them fully static. The default is currentColor, which is usual for web-specific icons.

I made it work with the rest of the monorepo but decided not to include changes in this PR – it requires an upgrade of vite and typescript.

Added p-map to run generation concurrently, speeding up the Figma sync drastically.

Copy link

vercel bot commented Sep 10, 2024

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

2 Skipped Deployments
Name Status Preview Comments Updated (UTC)
status-components ⬜️ Ignored (Inspect) Visit Preview Sep 24, 2024 4:01pm
status-web ⬜️ Ignored (Inspect) Visit Preview Sep 24, 2024 4:01pm

Copy link

changeset-bot bot commented Sep 10, 2024

🦋 Changeset detected

Latest commit: 9cbd8e5

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@status-im/icons Major

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@prichodko
Copy link
Collaborator Author

we will have to fix the monorepo to publish it, won't we?

@felicio
Copy link
Collaborator

felicio commented Sep 11, 2024

Worth checking if addresses #466 completely and if it could be closed by this.

@prichodko prichodko linked an issue Sep 11, 2024 that may be closed by this pull request
@felicio
Copy link
Collaborator

felicio commented Sep 11, 2024

we will have to fix the monorepo to publish it, won't we?

What do you mean by this?

@prichodko
Copy link
Collaborator Author

we will have to fix the monorepo to publish it, won't we?

What do you mean by this?

Other packages have type-checking errors.

@jkbktl
Copy link
Collaborator

jkbktl commented Sep 20, 2024

Would it makes sense to add network's icons?

It would make my life easier since these are part of portfolio and are used as icons in dropdown menu.

@prichodko
Copy link
Collaborator Author

Would it makes sense to add network's icons?

yeah definitely, but they don't seem to be in SVG format for some reason

@prichodko prichodko changed the title Multi-entry icons add support for multiple icon sets through subpath exports Sep 24, 2024
@prichodko prichodko merged commit c8f551f into main Sep 24, 2024
5 of 6 checks passed
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.

generate, name, and export 20/16/12 icons separately
3 participants