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

The dark mode is applied only after handling the cookies popup on UI5 1.132.x and OpenUI5 1.133.x #4185

Open
pubmikeb opened this issue Jan 21, 2025 · 5 comments

Comments

@pubmikeb
Copy link

pubmikeb commented Jan 21, 2025

Open https://ui5.sap.com/1.132.0 or https://openui5nightly.hana.ondemand.com in Chrome's incognito mode (no AD blockers or any other content filter) — UI5 / OpenUI5 will be loaded in light mode, even if your browser is in dark mode, e.g.:

Image

The proper mode is applied only after accepting/rejecting cookies (e.g. pressing «Understood»). If using an AD blocker, no cookies popup is displayed, and a user gets the UI5 / OpenUI5 in light mode.

The UI5 documentation prior 1.132.x and OpenUI5 1.133.x have no such an issue, the dark mode is active automatically.

@pubmikeb pubmikeb changed the title Dark mode applied only after clicking on the cookies' popup on OpenUI5 Nightly (1.133.0) Dark mode is applied only after clicking on the cookies' popup on OpenUI5 Nightly (1.133.0) Jan 21, 2025
@pubmikeb pubmikeb changed the title Dark mode is applied only after clicking on the cookies' popup on OpenUI5 Nightly (1.133.0) The dark mode is applied only after clicking on the cookies' popup on OpenUI5 Nightly (1.133.0) Jan 21, 2025
@pubmikeb pubmikeb changed the title The dark mode is applied only after clicking on the cookies' popup on OpenUI5 Nightly (1.133.0) The dark mode is applied only after clicking on the cookies popup on OpenUI5 Nightly (1.133.0) Jan 21, 2025
@pubmikeb pubmikeb changed the title The dark mode is applied only after clicking on the cookies popup on OpenUI5 Nightly (1.133.0) The dark mode is applied only after handling the cookies popup on OpenUI5 Nightly (1.133.0) Jan 21, 2025
@JumpNRun
Copy link
Contributor

Thank you for sharing this finding. I've created an internal incident DINC0389455. The status of the issue will be updated here in GitHub.

@pubmikeb pubmikeb changed the title The dark mode is applied only after handling the cookies popup on OpenUI5 Nightly (1.133.0) The dark mode is applied only after handling the cookies popup on UI5 1.132.x and OpenUI5 1.133.x Jan 24, 2025
@pubmikeb
Copy link
Author

It looks like, the problem is with the new cookies popup window, thus it might be, that the openui5-docs project is more relevant place to filing this issue.

@boghyon
Copy link
Contributor

boghyon commented Jan 27, 2025

@pubmikeb SAP/openui5-docs and SAP-docs/sapui5 contain only the static documentation content such as the text, images, snippets, etc. that can be found in /topic/<...>. On the other hand, issues found in the Demo Kit implementation itself such as its theming, cookie handling, source for the API Reference (/api), Samples (/controls), etc. should be rather reported in this SAP/openui5 repo since their source code is maintained here.

@plamenivanov91
Copy link
Contributor

Hello @pubmikeb ,

It sounds that prior versions were working for you as a side effect.

I tested incognito mode (Chrome Version 132.0.6834.160 on MacOS) and it shows the "Understood" footer with Adblock Plus every time when I close/open the incognito mode window.

This is expected because the browser is not supposed to keep any of your cookie settings on reopening as mentioned here:

https://www.cookielawinfo.com/incognito-cookies/#:~:text=Incognito%20mode%20clears%20local%20data,browsing%20on%20a%20user's%20device.

If I accept the dialog (with Adblock Plus active), choose dark theme and refresh the incognito window in the same session (without closing it and losing the cookie settings) the theme remains dark.

I believe there is no issue here.

Regards,
Plamen Ivanov

@pubmikeb
Copy link
Author

pubmikeb commented Jan 31, 2025

@plamenivanov91, thanks for checking this ticket,

Actually, I believe, the problem I've reported here has nothing to do with the cookies.
As we know, UI5 is capable detecting which mode (light or dark) is used on a client side and acts accordingly.

The essence of the problem:
If prior the version 1.132.0 UI5 used to detect the light/dark mode before accepting/declining cookies, starting 1.132.0 with the new Cookies-Prompt, the behavior has changed: by default UI5 is loaded in a light mode and only after dealing with the cookies popup UI5 decides which mode to use and if required, UI5 switched to the dark mode.

Repro steps:

  1. Open Chrome/Edge in dark mode in privacy mode without any content blockers
  2. Visit https://ui5.sap.com/1.131.0/

Expected result:
UI5 page will be loaded completely in a dark mode, even before answering the cookies popup.

Outcome in fact:
UI5 page is loaded completely in a dark mode, even before answering the cookies popup:

Image

  1. Close and reopen Chrome/Edge in dark mode in privacy mode without any content blockers
  2. Visit https://ui5.sap.com/1.132.0/

Expected result:
UI5 page will be loaded completely in a dark mode, even before answering the cookies popup.

Outcome in fact:
UI5 page is loaded in a light mode, only cookies popup is in a dark mode:

Image

And only after answering the cookies question, UI5 will be loaded in a proper mode, according to the browser settings:

Image

That's what I mean under this ticket, IMO, it's an regression comparing to the 1.131.0.
Thus, please, consider reopening this ticket.

@i556484 i556484 reopened this Jan 31, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants