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

fix(theming): fix icons version detection for custom theme (built via the ThemeDesigner) #6815

Merged
merged 3 commits into from
Mar 31, 2023

Conversation

ilhan007
Copy link
Member

@ilhan007 ilhan007 commented Mar 28, 2023

Currently, for older themes (sap_belize, sap_fiori_3) we display old icon fonts, while for sap_horizon - the latest icon fonts. This applies for all icon collections. And, to do that we check if the current theme is part of the sap_horizon theme family or not. However, once an app is using custom theme, the current theme has a custom theme and by default we will enforce the old icon fonts, because the custom theme name won't match "sap_horizon".

With this change, when the current theme name is not part of the built-in theme families, we now look for an custom theme and check the base theme that the custom theme is built upon.

  • rename isThemeFamily to isLegacyThemeFamily and adopt it in the code (all isThemeFamily("sap_horizon") calls are replaced with !isLegacyThemeFamily)
  • isLegacyThemeFamily now checks the baseTheme of the custom theme if present
  • add test (one when built-in theme is set and when theme designer custom theme is used)

Related to: #6758

@ilhan007 ilhan007 merged commit 63ff800 into main Mar 31, 2023
@ilhan007 ilhan007 deleted the fix-icons-effective-version-for-custom-theme branch March 31, 2023 07:05
didip1000 pushed a commit that referenced this pull request Apr 4, 2023
…the ThemeDesigner) (#6815)

Currently, for older themes (sap_belize, sap_fiori_3) we display old icon fonts, while for sap_horizon - the latest icon fonts. This applies for all icon collections. And, to do that we check if the current theme is part of the sap_horizon theme family or not. However, once an app is using custom theme, the current theme has a custom theme and by default we will enforce the old icon fonts, because the custom theme name won't match "sap_horizon".
With this change, when the current theme name is not part of the built-in theme families, we now look for an custom theme and check the base theme that the custom theme is built upon:
rename isThemeFamily to isLegacyThemeFamily and adopt it in the code (all isThemeFamily("sap_horizon") calls are replaced with !isLegacyThemeFamily)
isLegacyThemeFamily now checks the baseTheme of the custom theme if present
add test (one when built-in theme is set and when theme designer custom theme is used)

Related to: #6758
NHristov-sap pushed a commit that referenced this pull request May 4, 2023
…the ThemeDesigner) (#6815)

Currently, for older themes (sap_belize, sap_fiori_3) we display old icon fonts, while for sap_horizon - the latest icon fonts. This applies for all icon collections. And, to do that we check if the current theme is part of the sap_horizon theme family or not. However, once an app is using custom theme, the current theme has a custom theme and by default we will enforce the old icon fonts, because the custom theme name won't match "sap_horizon".
With this change, when the current theme name is not part of the built-in theme families, we now look for an custom theme and check the base theme that the custom theme is built upon:
rename isThemeFamily to isLegacyThemeFamily and adopt it in the code (all isThemeFamily("sap_horizon") calls are replaced with !isLegacyThemeFamily)
isLegacyThemeFamily now checks the baseTheme of the custom theme if present
add test (one when built-in theme is set and when theme designer custom theme is used)

Related to: #6758
PetyaMarkovaBogdanova pushed a commit that referenced this pull request Jun 20, 2023
…the ThemeDesigner) (#6815)

Currently, for older themes (sap_belize, sap_fiori_3) we display old icon fonts, while for sap_horizon - the latest icon fonts. This applies for all icon collections. And, to do that we check if the current theme is part of the sap_horizon theme family or not. However, once an app is using custom theme, the current theme has a custom theme and by default we will enforce the old icon fonts, because the custom theme name won't match "sap_horizon".
With this change, when the current theme name is not part of the built-in theme families, we now look for an custom theme and check the base theme that the custom theme is built upon:
rename isThemeFamily to isLegacyThemeFamily and adopt it in the code (all isThemeFamily("sap_horizon") calls are replaced with !isLegacyThemeFamily)
isLegacyThemeFamily now checks the baseTheme of the custom theme if present
add test (one when built-in theme is set and when theme designer custom theme is used)

Related to: #6758
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants