openui5
openui5 copied to clipboard
Dark theme is not applied when should be used
OpenUI5 version: 1.106.0…1.108.0 (other versions might be affected as well, didn't check)
URL (minimal example if possible):
- https://openui5nightly.hana.ondemand.com/entity/sap.m.MessageBox/sample/sap.m.sample.MessageBox
- https://openui5nightly.hana.ondemand.com/1.106.0/#/entity/sap.m.MessageBox/sample/sap.m.sample.MessageBox
Steps to reproduce the problem:
- Open Chrome in Incognito mode
- Open any of the links above
What is the expected result? The dark mode for the Horizon theme will be completely applied:

What happens instead? The dark mode for the Horizon theme applied only partly — the content page is on a light mode:

I've also paid attention that there is no consistency which theme is loaded, sometimes it's Horizon, sometimes it's Fiori 3 (at least for the version 1.108.0) but currently I don't have precise repro steps.
Hi @pubmikeb , there is a new settings button added for the samples only, situated next to the "Open in new window" button. When changing the theme through the settings button, situated on the top right of the Left panel you change the theme for the entire Demo Kit, resulting in the sample also, but for now it doesn't work like that, when changed from context menu of the demo kit Appearance- Light/Dark. From there you only change it for the Demo Kit "frame". Please, let us know if you are experiencing anything different as a behaviour.
Best regards, Petya Markova. (UI5 Dispatcher)
@PetyaMarkovaBogdanova, I'll check the described behaviour a bit later, but when I opened the #3598 and #3599 tickets, I didn't perform any actions you mentioned above.
When changing the theme through the settings button, situated on the top right of the Left panel you change the theme for the entire Demo Kit, resulting in the sample also, but for now it doesn't work like that
@PetyaMarkovaBogdanova, I've just checked described functionality, changing theme/appearance via the left panel applied the change to the entire view, including the Demokit view. At the same time, changing appearance via Settings from the right top corner applies the change to the Demokit view only.
Perhaps, «but for now it doesn't work like that» has been fixed already.
When I open https://openui5nightly.hana.ondemand.com/entity/sap.m.MessageBox/sample/sap.m.sample.MessageBox in Incognito mode without any change, then I see that by default the left side panel is in a dark mode (inherited from browser), but the Demokit view is in a white mode, which is an inconsistent behaviour.
Hello @pubmikeb,
Thanks for raising this. This is a legacy issue that still exist but it will be fixed in one of the next versions as part of our planned backlog.
In the future, there will be only two options to change theme - for the Demo Kit and the content, and a separate - for the samples. The options for the samples that are now two - in the sidebar navigation and above the samples - will be merged into a single option above the sample in order to leave more space in the sidebar navigation.
Additionally, motivation for this is that samples are envisioned to support different versions and theme options than the Demo Kit app. The Demo Kit app itself should only support latest light, dark and high contrast themes as it is meant for information consumption and not demonstration of capabilities where the samples should fit.
Best regards, Jordan