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

Support for "sap-theme" URL parameter #3114

Closed
tjbutz opened this issue Apr 7, 2021 · 4 comments · Fixed by #3138
Closed

Support for "sap-theme" URL parameter #3114

tjbutz opened this issue Apr 7, 2021 · 4 comments · Fixed by #3138

Comments

@tjbutz
Copy link

tjbutz commented Apr 7, 2021

Is your feature request related to a problem? Please describe.

Currently UI5 Web Components only support the URL parameter for theming:

"sap-ui-theme"

UI5 also supports another URL parameter for theming, as many products use this URL parameter as default:

"sap-theme"

Describe the solution you'd like

Please add the "sap-theme" URL parameter as a possible option for theming to UI5 WC.

@yanaminkova
Copy link
Member

Hello @SAP/ui5-webcomponents-team I am forwarding the issue to you.

@yanaminkova yanaminkova removed their assignment Apr 7, 2021
@ilhan007 ilhan007 self-assigned this Apr 9, 2021
@ilhan007
Copy link
Member

ilhan007 commented Apr 9, 2021

Hello @tjbutz thanks for the issue.

Do you have a particular app that is using UI5 and UI5 Web Components, where the theme does not apply to the UI5 Web Components, because it is set by the "?sap-theme" param?

If your app uses both UI5 and UI5 Web Components, UI5 Web Components can benefit
from OpenUI5 configuration via the following module:

import "@ui5/webcomponents-base/dist/features/OpenUI5Support.js";

When the app imports the above module, OpenUI5 configuration takes precedence over UI5 Web Components configuration for all common entities (theme, language, etc...). In addition, changing the theme.
So if the theme is set with "?sap-theme" param I expect that would be still applied to the UI5 Web Components, because of the aforementioned integration.

BR,
ilhan

@tjbutz
Copy link
Author

tjbutz commented Apr 12, 2021

Hi @ilhan007. Thanks for your fast answer. As far as I know the cFLP appends "sap-theme" to the URLs of the applications. The App is not build with UI5 (build with Angular / UI5 WC for React), so the provided solution is unfortunately no option for us.

@ilhan007
Copy link
Member

Hello @tjbutz we prepared a fix: #3138

Nevertheless, is it possible to somehow see the issue, can we see the app in the cFLP?

BR,
ilhan

ilhan007 added a commit that referenced this issue Apr 21, 2021
The change will assist broader UI technology co-existence by allowing the app developers use the older sap-* params in order to configure the theme, language, etc. There are use-cases where the sap-* is still the preferred param.
In case both sap-ui-* and sap-* params are set, the sap-ui-* ones will take precedence - the same way UI5 handles it.

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

Successfully merging a pull request may close this issue.

3 participants