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

[Feature Request]: support auto-switch for versioned custom icon SVGs based on the current theme #7312

Closed
1 task done
ilhan007 opened this issue Jul 11, 2023 · 0 comments · Fixed by #7341
Closed
1 task done
Assignees
Labels

Comments

@ilhan007
Copy link
Member

Feature Request Description

For our standard icon collections (-icons, -icons-tnt, -icons-business-suite), we support two versions of each icon and based on the theme family set, we display the one or the other. This is not yet possible for custom icon SVGs that are registered, but recently requested.

Proposed Solution

Enhancing registerIconLoader to provide the necessary versioned info and getIconCollectionByTheme, getIconCollectionByTheme in config/Icons.ts to the auto switch.

Proposed Alternatives

No response

Organization

SAC

Additional Context

No response

Priority

None

Privacy Policy

  • I’m not disclosing any internal or sensitive information.
@ilhan007 ilhan007 self-assigned this Jul 14, 2023
ilhan007 added a commit that referenced this issue Aug 1, 2023
The PR aims to add support for registering versioned/theme dependent custom icon collections.
Previously, one could register an icon collection (f.e. "my-icons") with the use of `registerIconLoader` and use it with the Icon web component.
However, there is no API to register theme dependant version of the same icon, so that whenever the theme is changed the used SVGs are auto-switched behind the scenes.
Now. `registerIconLoader` can be used to register additional second version (won't fail in case of multiple versions, but at the end the separation is "legacy" vs "sap_horizon" theme families) and use the newly supported field "themeFamily" to define in which themeFamily the icon collection should be used. If "themeFamily" is not present, by default it means in all themes (sap_belize_*, sap_fiori_3_*) other than "sap_horizon" theme families.

Fixes: #7312
@petyabegovska petyabegovska moved this to Completed in Planning - Topic Core Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Completed
Development

Successfully merging a pull request may close this issue.

1 participant