Johani
(Joe)
25. Juli 2022 um 12:04
21
Das haben wir, aber wir haben den Fall übersehen, dass der Benutzer nur das normale Farbschema als dunkel einstellt. Zuvor haben wir uns auf die Betriebssystemeinstellung verlassen, um zwischen dem hellen/dunklen Modus für den Splashscreen zu wählen, mit der Annahme, dass Benutzer beides einstellen und den Betriebssystemschalter verwenden.
Ich habe ein paar Korrekturen vorgenommen
main ← hnb-ku:splash-background-flicker
opened 07:01AM - 23 Jul 22 UTC
Context: https://meta.discourse.org/t/introducing-discourse-splash-a-visual-prel… oader-displayed-while-site-assets-load/232003/17
We currently set the theme `secondary` color as the background for the splash, and this works and respects light/dark modes.
The issue is that we set it on the `#d-splash` div. That div doesn't have a specified height and only gets its height when the splash image loads.
This can cause a flicker effect where the `<HTML>` background shows for a fraction of a second while the splash image loads.
This PR sets the theme color on the `<HTML>` tag to alleviate this. This allows us to set the theme color a little bit sooner and should hopefully prevent the flicker effect from happening.
This PR also adds the `theme-color` `<meta>` tag for dark mode. Browsers that don't support multiple `theme-color` tags will ignore the second tag and fall back to the first one.
main ← hnb-ku:splash-flicker-take-2
opened 12:56PM - 23 Jul 22 UTC
Follow up to: https://github.com/discourse/discourse/pull/17619
Context: https:… //meta.discourse.org/t/introducing-discourse-splash-a-visual-preloader-displayed-while-site-assets-load/232003/17
We previously relied on the user's browser when deciding when to show the splash in light/dark mode. This worked well but can fail if the user manually selects a theme with a default "dark" scheme.
This PR will now factor that in. If the user selects a theme with a default dark scheme, use that. If a user selects a theme with a "light" default scheme and also picks a secondary "dark" scheme, use the `media` detection we had before.
This PR also removes the dark mode `theme-color` that was added in the previous PR. That will now go in a separate PR
Wenn das normale Schema dunkel ist, verwende dieses. Wenn es hell ist, verwende das helle Schema für den hellen Betriebssystemmodus und das dunkle Schema für den dunklen Betriebssystemmodus (falls eingestellt).
Das Problem, sowie dieses hier
sollte jetzt behoben sein. Danke für die Berichte
11 „Gefällt mir“