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

Allow to use different icon sets in the backend #6537

Merged
merged 1 commit into from
Nov 23, 2024

Conversation

javiereguiluz
Copy link
Collaborator

@javiereguiluz javiereguiluz commented Nov 13, 2024

UPDATE: I changed the feature behavior completely since the first implementation. We no longer include the entire Tabler icon set (it took more than 22 MB of disk space) but the feature is still flexible and allows you to use any custom icon set, including tabler.


This feature is the first that uses a Twig Component. I hope to add many other components soon.

Thanks @yceruto for publishing a fantastic article about how to use Twig Components in bundles: https://dev.to/yceruto/bundling-your-symfony-ux-twig-components-4997

@javiereguiluz javiereguiluz added this to the 4.x milestone Nov 13, 2024
@yceruto
Copy link
Collaborator

yceruto commented Nov 14, 2024

Thanks @yceruto for publishing a fantastic article about how to use Twig Components in bundles

You're very welcome! I'm glad you enjoyed the article 😊 you were my inspiration after all

@alexislefebvre
Copy link
Contributor

This PR adds 2300+ SVG files, will it slow down the installation of this bundle? I'm thinking about all these files which will be decompressed and created on every CI job that use EasyAdmin.

I don't have an alternative solution to offer.

@javiereguiluz
Copy link
Collaborator Author

@alexislefebvre yes, I thought about that.

Initially, this PR also added Tabler icons, which added +6,000 additional icons. I removed that because it was too much. But, in the case of FontAwesome, I think it's a reasonable tradeoff. This adds a ~2,000 small files, but also removes +2,000 CSS classes injected in all admin pages. We can also validate icon names, trigger deprecations when legacy icon names are used, etc. So, I think it's worth it 🙌

@javiereguiluz javiereguiluz merged commit f2fc65b into EasyCorp:4.x Nov 23, 2024
5 checks passed
@javiereguiluz javiereguiluz deleted the twig_component_icon branch November 23, 2024 16:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants