Dark Mode in J5.1 is a major improvement over J5.0. A huge 'Thanks' to Elisa and all the other contributors! But there is still some distance to go. Even if Dark mode in Joomla core would be perfect, there are still a number of extensions, which don't work perfectly in Dark Mode. This forces the user to switch between dark and light modes frequently.
But in core, there are some weak points as well, some of which I address with this issue:
As written above, it is sometimes necessary to switch between dark and light mode. J5.1 does even implement a switch to do so easily, at least in theory. But the feature is most perfectly hidden, when updating from a previous Joomla version:
IMHO, the switch should be visible by default, also if updating from a previous version.
When in dark mode, the user sees a symbol for 'night' and reads 'Dark Mode'.
I propose to modify the menu item like this: An icon for the current state followed by an action like 'Switch to ... Mode'. For the two possible states:
J5.1.0
PHP 8.2 / 8.3
MySQL 8.0.33
Labels |
Added:
No Code Attached Yet
|
As for the comment about the switch being misleading - I agree.
In this case the display is the "current" state and clicking on it will change to the opposite state
This is the same "problematic" issue we have throughout Joomla that we have never resolved in 18 years. Look at the State button/icon in the article manager. The behaviour is the same.
The display is the "current" state (published) and clicking on it will change to the opposite state (unpublished)
For everyone that expresses an opinion that this pattern is correct there is another person who expresses the opinion that it is wrong. Joomla can't win in this case.
As we have grown accustomed to this behaviour since forever for the status buttons changing the dark mode to work in an opposite direction would be more confusing and not less
You're perfectly right! On a clean install, the switch is enabled by default, but not when updating from a previous J5 to J5.1.
Therefore, the update process should enable the switch. I have updated my previous comment.
I don't completely agree to your second comment. Your example shows just a button of 'checkbox' type, where there is no room for longer explanations. Not so in the user menu. My proposal is to show the current state plus an action to change the state.
Therefore, the update process should enable the switch.
Thats a BUG. And easy to fix
I don't completely agree to your second comment. Your example shows just a button of 'checkbox' type, where there is no room for longer explanations. Not so in the user menu.
we have the longer explanations in the "tooltip" and that gets even more inconsistent as you use it.
The amount of space in the user menu is language dependent but I am definitely open to seeing a mockup that will show both the current state and how to chanage to another state. Sadly the UX group appears to be no more.
@richard67 This works localy but no idea if it is good enough and/or if the same can be done in postgres
UPDATE `#__template_styles`
SET `params` = CONCAT(SUBSTRING(`params`, 1, LENGTH(`params`) - 1), ', "colorScheme": "os"}')
WHERE `template` = 'atum'
AND `params` NOT LIKE '%colorScheme%';
This SQL statement updates the params field in the #__template_styles table for the template named 'atum'. It appends ,"colorScheme": "os"} to the existing value of params, but only if the params field does not already contain 'colorScheme'.
This update ensures that the color scheme parameter is added to the params field for the 'atum' template if it doesn't exist already, without duplicating it if it's already present.
@brianteeman In J5 we can use json functions due to the raised db version requirements. So no need for such risky string replacements on json strings. We have already some example in some 5.x update SQL script which shows how it can be done here, too. I can’t search it now. But if you grep the 5.x update SQL scripts for „json“ (case-insensitive) you may find it.
i did try json first - lol will do it that way
@brianteeman Example for MySQL/MariaDB: https://github.com/joomla/joomla-cms/blob/5.1-dev/administrator/components/com_admin/sql/updates/mysql/5.0.0-2023-08-21.sql
For PostgreSQL: https://github.com/joomla/joomla-cms/blob/5.1-dev/administrator/components/com_admin/sql/updates/postgresql/5.0.0-2023-08-21.sql
The script changes an existing parameter and not adds a new one, but that should be very similar.
Documentation:
P.S.: On weekend I might have time to help more, if necessary.
The amount of space in the user menu is language dependent but I am definitely open to seeing a mockup that will show both the current state and how to chanage to another state. Sadly the UX group appears to be no more.
I've played around a little bit with my browser's devtools.
See here a mockup of my proposal in English language:
The width of the menu seems to be dynamic, Therefore, this would even work for German despite the lengthy German words:
the first thing I thought when I saw this was why do you have the wrong icon.
I read it like this: It's the current state, followed by the action to change to the alternate state.
BTW: I didn't change the icons, only the text.
I read it like this: It's the current state, followed by the action to change to the alternate state.
and thats the problem as I said before. 50% will read it one way and 50% will read it another.
I didn't invent it like this. But at least the text of the menu item should explain its use. And that's what I propose.
Labels |
Added:
Dark Mode
|
Labels |
Added:
UI/UX
|
@coolcat-creations @chmst @LadySolveig
This issue consists of two parts, that might better be handled independently:
Number 1 has been identified as a bug. PR #43310 has been created and merged.
I'm in doubt how to handle number 2. I have made a proposal in this issue (see my post dated April 19, 2024, and the subsequent discussion with Brian Teeman). As I don't see any progress on this issue, I see two options:
What do you think?
Much better than the current solution.
i will make a pr in the morning and see what others think
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-05-09 21:25:50 |
Closed_By | ⇒ | richard67 |
Sorry but your comments are not correct.Sorry but I can not replicate your issue
On a CLEAN install of joomla there is nothing to do. The selector is available by default.