arturobernalg opened a new pull request, #555:
URL: https://github.com/apache/jspwiki/pull/555

   https://issues.apache.org/jira/browse/JSPWIKI-1317
   
   Users whose system asks for a dark colour scheme got the light default skin, 
although dark skins already exist. The default template now also loads the dark 
skin, under a prefers-color-scheme: dark media query, when the active skin is 
the default one and the user has not picked a skin. The browser applies it only 
when the system is in dark mode, so there is no script and no flash of the 
light page.
   
   To tell a user who chose the default skin on purpose from one who chose 
nothing, Preferences now records which preferences come from the user's cookie 
(Preferences.isSetByUser). parseJSONPreferences is now package-private so that 
PreferencesTest can call it. A user who picked another skin is not affected.
   
   Checked in a browser with the system in dark mode: with no skin chosen the 
page uses the dark skin, and with the default skin chosen in the cookie it 
stays light. With a cookie for another skin the generated HTML has no extra 
link. PreferencesTest has three cases and does not exercise the JSP. I did not 
check the older 210 template, other browsers, or the editor under the dark skin.
   
   If the project would rather not change the default look, the same behaviour 
can be switched on by a property instead.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to