-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP][5.0] Dark Mode support #41409
[WIP][5.0] Dark Mode support #41409
Conversation
:P |
31118b4
to
1f166f9
Compare
I have tested this item 🔴 unsuccessfully on 4069ac1 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/41409. |
(I am writing to you with Google Translate because I can read English but not write, as you may have seen) Success! Windows 11 with darkmode enabled, Google Chrome fully updated, PHP 8.2. He still wants a job, as winsonge said. Still, congratulations, it's well on its way! We needed darkmode in Joomla, especially us who work nights LOL! For the friends who reported failure, it doesn't work with patchtester. I think the patchtester doesn't work if the media has been changed. Maybe put a note so people don't get confused? Anyway, I did a git clone and ran composer install and npm ci as it says in the README. Install and admin play fine with darkmode! Colors are generally okay, but some are not very good for darkmode. I'll tell you what I saw with a quarter of an hour of testing it:
I hope I've helped you and I'm sorry to bother you these days! |
8ff6718
to
0b039a0
Compare
Thankyou that is actually very helpful!! I've fixed tabs in article edit and the quickicons. I will work my way through the rest of your list. Thankyou. thankyou. thankyou! |
So not saying I'm done by any means (but it's definitely slowly getting there). I've reached the point where we need to think about how extensions interact with this without necessarily becoming hard bootstrap coupled. So as an example we can look at media manager integration (component), or extension drag and drop (plugin) and harder still editor theme changing (tinymce/codemirror - harder because we need to decide if a custom theme even supports dark mode - we know the default ones do - as @dgrammatiko showed in his PR) I'd appreciate some thoughts on this from @dgrammatiko , @HLeithner, @laoneo or anyone else for that matter |
80fa5b2
to
d4a2836
Compare
That's a great call for design tokens. A design system backing the tokens would also be nice
It's not that hard. The moving parts here are:
|
I’m not using themes directly in this version. Just media queries. But that’s going to have to change for extension integrations with the template. Can just be an options setting I guess - but doubt CSP will like toggling css files based on the media query. So likely somehow declared in PHP?? |
build/media_source/templates/administrator/atum/scss/_variables.scss
Outdated
Show resolved
Hide resolved
build/media_source/templates/administrator/atum/scss/_variables.scss
Outdated
Show resolved
Hide resolved
(I am writing to you with Google Translate) I thank you for all the work you did @wilsonge ! Regarding the new expansions, you put a lot of thought into it. See what Bootstrap says here: https://getbootstrap.com/docs/5.3/customize/color-modes/#sass-mixins In my templates with Bootstrap 5.3 I do something like the following:
In _home.scss I have the custom CSS I want for lightmode. This has everything in it, flexbox, margins, padding, and natural colors. In _home_dark.scss I only have colors. Bootstrap's color-mode automatically plays with $color-mode-type. If I change my mind, I recompile my SCSS. Simple and quick, without much fuss. Don't overcomplicate it. Most sites are made by small companies with 2-3 people. Unnecessary complexity kills our profit. The customer pays by the piece, not by the hour. |
11b7c40
to
20bca99
Compare
After CI fix I merge this for beta1, we know additional things are needed but for now it's a good start. |
CI Fixed |
Thanks, docs needed |
Please note this is still miles away from even being ready for testing - but is just here so that the work is being done transparently and is able to be tracked for maintainers & others.
Summary of Changes
Enables dark mode support for Joomla 5 on the back of the Bootstrap 5.3 upgrade of J4.
Testing Instructions
This requires compiling of CSS so won't work with regular patchtester
Use dark mode on your browser (usually exposed through an OS Setting) and browse around the backend validating that visually dark mode is enabled and consistent.
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:
No documentation changes for manual.joomla.org needed