Comments (22)
i will make a pr in the morning and see what others think
from joomla-cms.
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.
from joomla-cms.
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
from joomla-cms.
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.
from joomla-cms.
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.
from joomla-cms.
Therefore, the update process should enable the switch.
Thats a BUG. And easy to fix
from joomla-cms.
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.
from joomla-cms.
@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.
from joomla-cms.
@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.
from joomla-cms.
i did try json first - lol will do it that way
from joomla-cms.
@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:
- https://dev.mysql.com/doc/refman/8.0/en/json-modification-functions.html
- https://mariadb.com/kb/en/json_replace/
- https://mariadb.com/kb/en/json_extract/
- https://www.postgresql.org/docs/12/functions-json.html
from joomla-cms.
P.S.: On weekend I might have time to help more, if necessary.
from joomla-cms.
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:
from joomla-cms.
the first thing I thought when I saw this was why do you have the wrong icon.
from joomla-cms.
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.
from joomla-cms.
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.
from joomla-cms.
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.
from joomla-cms.
@coolcat-creations @chmst @LadySolveig
This issue consists of two parts, that might better be handled independently:
- The Dark Mode switch does appear in J5.1.0 only after some strange process.
- I made a proposal to modify the text on the Dark Mode switch.
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:
- I give up and close this issue without further action.
- I close this issue and open a new one with just my proposal.
What do you think?
from joomla-cms.
How about this.
The icon represents the current state and the text identifies what you can switch between
from joomla-cms.
Much better than the current solution.
from joomla-cms.
ok - so i lied - did the PR now. #43454
from joomla-cms.
Closing as having a pull request. See #43454 .
from joomla-cms.
Related Issues (20)
- spam HOT 1
- [5.2] [UX] Consistency: Review Options (parameters)
- [5.2] Usability: Back-end - Add total number of items to Page Navigation
- [5.2] Usability: Media Manager - Allow SVG images HOT 1
- [5.2] Usability: add Versioning to Menu Item edit
- [5.2] Usability: Media Manager > edit image > contain instead of cover (think of vertical images) HOT 1
- [5.2] New code feature: Add new Plugin Event in Models in methods PopulateState / getItems
- [5.2] Usability: Media Manager - tick checkbox of newly uploaded Media HOT 1
- [5.2] Usability: Media Manager - Move image to other folder HOT 2
- [5.1] Problem: Menu items with "compact list of tagged items" don't work HOT 3
- [5.2] Usability: Media Manager > Save and new
- [5.1] Problem: Menu items with Item Selection Options doesn't work HOT 3
- 4.4.5 : update gives checksum error HOT 1
- [5.1] Non-Cassiopeia front-end editor is told 'you have been logged out' after clicking media button
- multiselect.js issue with unwanted selections HOT 5
- table.columns breaks if tfoot or colgroup are used in the table HOT 4
- Unable to install languages HOT 3
- Joomla accessibility checker in frontend HOT 4
- Related Article Module sort articles HOT 2
- com_finder not found HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from joomla-cms.