Giter Club home page Giter Club logo

Comments (22)

brianteeman avatar brianteeman commented on May 30, 2024 2

i will make a pr in the morning and see what others think

from joomla-cms.

brianteeman avatar brianteeman commented on May 30, 2024

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.

brianteeman avatar brianteeman commented on May 30, 2024

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.

image

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.

dautrich avatar dautrich commented on May 30, 2024

@brianteeman

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.

dautrich avatar dautrich commented on May 30, 2024

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.

brianteeman avatar brianteeman commented on May 30, 2024

Therefore, the update process should enable the switch.

Thats a BUG. And easy to fix

from joomla-cms.

brianteeman avatar brianteeman commented on May 30, 2024

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.

brianteeman avatar brianteeman commented on May 30, 2024

@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.

richard67 avatar richard67 commented on May 30, 2024

@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.

brianteeman avatar brianteeman commented on May 30, 2024

i did try json first - lol will do it that way

from joomla-cms.

richard67 avatar richard67 commented on May 30, 2024

@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:

from joomla-cms.

richard67 avatar richard67 commented on May 30, 2024

P.S.: On weekend I might have time to help more, if necessary.

from joomla-cms.

dautrich avatar dautrich commented on May 30, 2024

@brianteeman

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:
grafik

The width of the menu seems to be dynamic, Therefore, this would even work for German despite the lengthy German words:
grafik

from joomla-cms.

brianteeman avatar brianteeman commented on May 30, 2024

the first thing I thought when I saw this was why do you have the wrong icon.

from joomla-cms.

dautrich avatar dautrich commented on May 30, 2024

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.

brianteeman avatar brianteeman commented on May 30, 2024

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.

dautrich avatar dautrich commented on May 30, 2024

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.

dautrich avatar dautrich commented on May 30, 2024

@coolcat-creations @chmst @LadySolveig

This issue consists of two parts, that might better be handled independently:

  1. The Dark Mode switch does appear in J5.1.0 only after some strange process.
  2. 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.

brianteeman avatar brianteeman commented on May 30, 2024

How about this.

The icon represents the current state and the text identifies what you can switch between

image

image

from joomla-cms.

dautrich avatar dautrich commented on May 30, 2024

Much better than the current solution.

from joomla-cms.

brianteeman avatar brianteeman commented on May 30, 2024

ok - so i lied - did the PR now. #43454

from joomla-cms.

richard67 avatar richard67 commented on May 30, 2024

Closing as having a pull request. See #43454 .

from joomla-cms.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.