User tests: Successful: Unsuccessful:
Pull Request for Issue # .
-dark
but maybe it's not ideal)prefers_color_scheme
with possible values: null
, dark
, light
and also created a JSON endpoint so that the toggler could sync the actual user state with the DB value.And here's a little demo:
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed
Status | New | ⇒ | Pending |
Category | ⇒ | Administration Templates (admin) JavaScript Repository NPM Change Installation Front End Plugins |
Labels |
Added:
NPM Resource Changed
PR-5.0-dev
|
Category | Administration Templates (admin) JavaScript Repository NPM Change Installation Front End Plugins | ⇒ | Administration com_users Templates (admin) JavaScript Repository NPM Change Front End |
Category | Administration Templates (admin) JavaScript Repository NPM Change Front End com_users | ⇒ | Administration com_users Templates (admin) JavaScript Repository NPM Change |
Title |
|
@HLeithner could you sync the v5.0 branch so there would be an installable package? I would like to have some feedback from people here and having an installable zip would help. Thanks
done
Labels |
Added:
?
|
Title |
|
I will have a look what's wrong with the build script.
Title |
|
Title |
|
Dark Mode is not an accessibility setting. Its setting has no place in the a11y options. Its place is in the user preferences, along with the language and the editor. That's why I had put it as a basic option in my PR.
The browser's colour scheme should be followed by default. The same user can and will have different colour scheme preferences based on the ambient light. The expectation is to toggle the system's colour scheme and have all applications and sites follow it. This is a native feature, there is no need for JavaScript, especially in the frontend. I had already demonstrated that in my PR.
You can totally force light or dark colour scheme for users who want it by using a simple option and CSS classes, as I had demonstrated in my PR.
You do not need to change TinyMCE's JavaScript to change themes. You had to do that because you are not using the native browser way of switching colours. You can simply use TinyMCE's default options —as set in the plugin— to load a custom theme which uses media queries and CSS classes to switch colour schemes, as I had demonstrated in my PR.
You have not attempted to apply dark mode to CodeMirror, which is something I had already demonstrated as being perfectly possible (and dead easy) in my PR.
You do not have a way for the user to set and use custom colours in dark mode, unlike my PR.
Okay, here's what. You came to my PR and told me that I basically don't understand how to do anything in the frontend and that everything I did was wrong. Now you come here with your own PR and it lacks even the most basic features, does not attempt to cover any use case besides the one you decided makes sense to you, is laden with technical debt (JavaScript everywhere, JavaScript nobody can maintain as it's been proven time and again), has zero foresight for third party developers (especially editor plugin makers!), and I could go on — but I won't.
This PR is a farce. If that's the subpar code y'all want to see in Joomla I am pretty sure my decision not to contribute code to the core in 2023 was the right one.
@nikosdion did you just reviewed the code without actually testing it?
So couple of quick answers here:
prefers-colour-scheme
by definition is an accessibility option: https://www.w3.org/TR/css-color-adjust-1/prefers-colour-scheme
DERIVES from the work the Bootstrap people did, I'm not implementing something my way as you keep repeating and contrary to what you have done in your PR...FWIW @wilsonge already created the joomla.org template that is using the same approach as I did here (with the only exception that this PR due to the early alpha version of Bootstrap is not supporting the CSS media query for automatically switching the themes but that was fixed upstream already) and could be viewed here
This PR still contains a lot of the required changes, although the Muta template (once updated to the latest Bootstrap) would be an easier path to upgrade the Atum template. The only part that might be worth keeping from this PR is the way the switcher directly saves the state of the user to the DB (maybe creating a theme switcher module is a better fit)
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-02-17 14:33:22 |
Closed_By | ⇒ | dgrammatiko |
Status | Closed | ⇒ | New |
Closed_Date | 2023-02-17 14:33:22 | ⇒ | |
Closed_By | dgrammatiko | ⇒ |
Status | New | ⇒ | Pending |
Status | Pending | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2023-05-29 10:29:07 |
Closed_By | ⇒ | dgrammatiko |
@HLeithner could you sync the v5.0 branch so there would be an installable package? I would like to have some feedback from people here and having an installable zip would help. Thanks