SAP / ui5-webcomponents

UI5 Web Components - the enterprise-flavored sugar on top of native APIs! Build SAP Fiori user interfaces with the technology of your choice.
https://sap.github.io/ui5-webcomponents/
Apache License 2.0
1.57k stars 267 forks source link

Get theme from HANA? #2460

Closed pta-nmu closed 4 years ago

pta-nmu commented 4 years ago

Hi, Is there a way to query the SAP4HANA/C4C instance for the user's current SAP visual theme? The reason we ask is because we are using the UI5 web components with Angular to create small apps which we incorporate into the SAP frontend using mashups. It would be nice to pass in the user's theme to maintain the SAP look & feel. Any help appreciated!

fifoosid commented 4 years ago

Hi @pta-nmu

Could you provide some more information what exactly are your trying to achieve?

As much as I can understand, you are trying to set the theme to your angular application via our setTheme() API. You can read more about it here. This is something we can help about.

When it comes to getting the theme from the C4C instance, we have nothing to do. What exactly do you need in order to get the theme? Perhaps you could fire an issue in their repo?

pta-nmu commented 4 years ago

Hi, What we are trying to achieve is that the UI5 webcontrols in our Angular app (inside a mashup) have the same theme as the SAP tenant. So if the user sets his/her theme to "Sap Belize high contrast dark" then the UI5 webcontrols in the Angular app should use this theme too. So I thought we coudl query the C4C instance for the user's current theme. I've seen you can ask it for the current language or Employee name (the URL parameters you can pass in) but I don't know how to do it for the SAP theme, or if it's even possible. Thx

fifoosid commented 4 years ago

As much as I can understand from the provided information, you need a way to get the theme from the C4C instance.

In this case you should open an issue in their repo, because this is related to their API and not to the API of the UI5 Web Components.