Feature ? Language Change NPM Resource Changed PR-5.0-dev Pending

User tests: Successful: Unsuccessful:

avatar wilsonge
wilsonge
9 Nov 2023

Pull Request for Issue #42148 and #41801 .

Summary of Changes

Supports dark mode detection for both tinymce and codemirror. Unlike the template which will actually flick over immediately once the OS is changed this will not change until the page is next reloaded. For codemirror this may be possible in the future as outlined in the todo in the code comment. But at the moment I don't believe this is possible for tinymce.

I've reused the same data attribute that @Fedik is suggesting in #42221 (but I still disagree with the concept of a toggle in that PR - but this doesn't block that or alter that PR in any way). But the data attribute will be required on the body element to support this

Testing Instructions

Open the editor in both light and dark modes. Before it would always open in light mode. Now it will match whatever the template is using on page load.

Note that casseopia which doesn't support automatic dark mode remains having editors only loaded in light mode.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org: joomla/Manual#206

  • [] No documentation changes for manual.joomla.org needed

avatar wilsonge wilsonge - open - 9 Nov 2023
avatar wilsonge wilsonge - change - 9 Nov 2023
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 9 Nov 2023
Category Administration Language & Strings Templates (admin) Repository NPM Change JavaScript Layout Front End Plugins
avatar wilsonge wilsonge - change - 9 Nov 2023
Title
Add basic support for conditional dark mode themes in our editors
[5.0] Add basic support for conditional dark mode themes in our editors
avatar wilsonge wilsonge - edited - 9 Nov 2023
avatar brianteeman brianteeman - test_item - 9 Nov 2023 - Tested successfully
avatar brianteeman
brianteeman - comment - 9 Nov 2023

I have tested this item ✅ successfully on 0069901

awesome!!!


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42322.

avatar wilsonge wilsonge - change - 9 Nov 2023
The description was changed
avatar wilsonge wilsonge - edited - 9 Nov 2023
avatar Quy Quy - change - 10 Nov 2023
Labels Added: Language Change NPM Resource Changed PR-5.0-dev
avatar MacJoom MacJoom - test_item - 10 Nov 2023 - Tested successfully
avatar MacJoom
MacJoom - comment - 10 Nov 2023

I have tested this item ✅ successfully on b8eb1b7

Tested on Firefox with a dark mode toggle extension


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42322.

avatar viocassel viocassel - test_item - 10 Nov 2023 - Tested successfully
avatar viocassel
viocassel - comment - 10 Nov 2023

I have tested this item ✅ successfully on b8eb1b7


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42322.

avatar Quy Quy - change - 10 Nov 2023
Status Pending Ready to Commit
avatar Quy
Quy - comment - 10 Nov 2023

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/42322.

avatar bembelimen
bembelimen - comment - 15 Nov 2023

Not sure if this is the way forward, when we want to have a color switch soon based on a data attribute with a different name? (Although the overall function looks good)

avatar Fedik
Fedik - comment - 15 Nov 2023

It will be an adddittional atribute with the active color scheme name.
We just will be need to update this code to account it.

And data-color-scheme-os will stay, to indicate that the template will do switch automatically based on OS state.

avatar wilsonge
wilsonge - comment - 16 Nov 2023

As @Fedik says and as I put in the description this uses the same data attribute that he's using in his pull request to implement the switcher. So I don't understand why this is incompatible with adding the switcher even if I disagree with it.

avatar bembelimen bembelimen - close - 18 Nov 2023
avatar bembelimen bembelimen - merge - 18 Nov 2023
avatar bembelimen bembelimen - change - 18 Nov 2023
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2023-11-18 02:57:32
Closed_By bembelimen
Labels Added: Feature ?
avatar bembelimen
bembelimen - comment - 18 Nov 2023

Thx

Add a Comment

Login with GitHub to post a comment