-
Notifications
You must be signed in to change notification settings - Fork 79
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
Theme icons #595
base: develop
Are you sure you want to change the base?
Theme icons #595
Conversation
web-cooking-factory
commented
Feb 21, 2024
•
edited
Loading
edited
Questions | Answers |
---|---|
Description? | Allow developers to adjust their icons in themes and allow module developers to use icons w/o being aware of what icons are being used by theme. Based on POC from @Oksydan (#551) |
Type? | improvement |
BC breaks? | no |
Deprecations? | no |
Fixed ticket? | Fixes #{https://github.com/PrestaShop/PrestaShop/discussions/34107} |
Sponsor company | Evolutive |
How to test? | Try to call an icon from any template {call renderIcon iconName='account_info'} |
Hello @web-cooking-factory My understanding is that @Oksydan has some doubts about the current implementation. I'm pinging him, so he could share his experience with us. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm blocking for @Oksydan comment.
Hi @kpodemski @web-cooking-factory First of all. The idea of using smarty function to render icons was all about simplify and improve module developers DX. Right now, a lot of themes are using material icons, fonts awesome or other custom icon fonts. W/o making some weird logic in the module we are not able to support all wide range of icons implementation in the various of themes. About the listHummingbird theme will be the first theme with this kind of feature. Icons coverage should be higher and we have to change icons names (keys) in the map to more generic. For example: "add_comment" => "edit",
"edit_comments" => "edit",
"edit_order_step" => "edit" All of these icons should being used inside template via
That's why I was talking in the POC about a standardized list of icons. I know we won't be able to cover them all, but at least we should try. If one theme can't cover several icons, nothing lost. The icon won't be displayed and IMO it's not the end of the world. |
Hi @kpodemski and @Oksydan, thanks for your answers. I agree about registering the function globally and use theme.yml. But I totally disagree with this: About modules, they should be able to add entries in the list and add custom icons. So the variable allows to get multiple icons set. |