openui5 icon indicating copy to clipboard operation
openui5 copied to clipboard

Dark theme is not applied when should be used

Open pubmikeb opened this issue 3 years ago • 4 comments
trafficstars

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:

  1. Open Chrome in Incognito mode
  2. Open any of the links above

What is the expected result? The dark mode for the Horizon theme will be completely applied:

23_105821

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

23_105720

pubmikeb avatar Sep 23 '22 08:09 pubmikeb

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.

pubmikeb avatar Sep 23 '22 09:09 pubmikeb

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 avatar Sep 23 '22 10:09 PetyaMarkovaBogdanova

@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.

pubmikeb avatar Sep 23 '22 11:09 pubmikeb

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.

pubmikeb avatar Sep 24 '22 11:09 pubmikeb

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

jdichev avatar Nov 22 '22 08:11 jdichev