Just the basics, while we wait for the CSS and toggling interface to be ironed out.
Description
Details
| Subject | Repo | Branch | Lines +/- | |
|---|---|---|---|---|
| Initial draft for DarkMode extension | mediawiki/extensions/DarkMode | master | +219 -0 | |
| [DarkMode] Add new extension | integration/config | master | +4 -0 |
Related Objects
- Mentioned In
- T222470: DarkMode: Create a mechanism to activate dark mode within the extension
rEDKM51af9bc6fb1b: Initial draft for DarkMode extension
rEDKM4eff03632c19: Initial draft for DarkMode extension
rEDKM6eb5b514af37: Initial draft for DarkMode extension
rEDKM78c5b5413a43: Initial draft for DarkMode extension
rEDKM834882676415: Initial draft for DarkMode extension
rEDKM284150e6c54b: Initial commit for DarkMode extension
rEDKM82654ba5cfba: [WIP] Initial commit for DarkMode extension
rEDKMb350d7a6aae2: [WIP] Initial commit for DarkMode extension
rEDKM96493284ec1c: [WIP] Initial commit for DarkMode extension
T221898: Put final CSS in Dark Mode extension - Mentioned Here
- T222470: DarkMode: Create a mechanism to activate dark mode within the extension
Event Timeline
Change 506933 had a related patch set uploaded (by MusikAnimal; owner: MusikAnimal):
[mediawiki/extensions/DarkMode@master] [WIP] Initial commit for DarkMode extension
The only actual visible change made is to add a "Dark mode" link to the personal toolbar. This is just a placeholder.
I have no idea how to put this into the CI pipeline.
Change 506934 had a related patch set uploaded (by Samwilson; owner: Samwilson):
[integration/config@master] [DarkMode] Add new extension
Is it planned that there will be a query string toggle for this, e.g. ?usedarkmode=1 or something? Because if it's a JS-only feature then maybe the link should be added by the resource module and not in PHP.
I've created https://gerrit.wikimedia.org/r/c/integration/config/+/506934 to add the CI config.
Yes I believe we'll want to support a toggling via query string. I only used PHP here because using only JS to manipulate the DOM would cause the links before it in the toolbar to "jump" on page load. I was following Extension:Echo's lead. The design hasn't been finalized anyway... maybe I should just remove the PHP for now?
I've created https://gerrit.wikimedia.org/r/c/integration/config/+/506934 to add the CI config.
Thank you!
Merged! There's nothing to QA yet, or anything product can see, so closing as resolved.
The CI patch still needs to be merged: https://gerrit.wikimedia.org/r/c/integration/config/+/506934
Change 506934 merged by jenkins-bot:
[integration/config@master] [DarkMode] Add new extension
We should have the toggle in both PHP and JS, similar to all the other toggles we have, like ?uselang= and ?useskin=.
We can have a hidden preference per user about whether they are using darkmode. That preference will be toggled (permanently) through clicking the toggle interface Alex will create, and toggled temporarily (so "overridden") by a URL param, something like ?usedarkmode=1. This is the same behavior we use for all our toggles, from language to skins to RCFilters' definitions,
We shouldn't wait, as a rule, for the JS to toggle the view, because then the styles will "flash". The check about whether the preference is on or not (and for logged out users, if we go with that, a cookie is set or not) should happen on the server.
This ticket is about setting up the "raw" stuff of an extension, so I've created this ticket for the basics of how it works: T222470: DarkMode: Create a mechanism to activate dark mode within the extension Please look at adjust/add/change if needed!
@MusikAnimal Are we using this ticket to add the initial files (+ linting + folder structure + tests / grunt, etc) for the extension or do you want to use the other ticket to do that?
(You can use the generator and adjust it, it should be straight forward either for this ticket (and then add-on in the other) or do it for the other ticket... I am just not sure what you want to do for process' sake)
Change 506933 merged by jenkins-bot:
[mediawiki/extensions/DarkMode@master] Initial draft for DarkMode extension