The classes:
- skin-night-mode-clientpref-0
- skin-night-mode-clientpref-1
- skin-night-mode-clientpref-2
is being replaced with
- skin-theme-clientpref-day
- skin-theme-clientpref-night
- skin-theme-clientpref-os
- Moved $forceNightMode to be a text parameter (dat|night|os)
- Keep adding the old classes to the html element, to give the ability of gradual deployment
The preference is renamed from minerva-night-mode to minerva-theme (a follow up to consider
migrating existing values will follow).
The query string minervanightmode continues to behave the same but now
accepts other values such as day, night and os.
Bug: T359983
Change-Id: Ia253de68f94236e7fe2219b736dd6084c64ce838
- Add config to skin.json
- Add the function in SkinMinerva.php to check exclusion of pages and namespaces.
Bug: T355705
Change-Id: I0fa0eab3bfa57cc6864dbdd2d6aeaa5582767c3c
Whereas previously, the value of the query param would simply determine
whether or not night mode was enabled, we would like to be able to
control the actual night mode setting off of the query param
Now, it functions as an option to force the user into a particular
setting, be it automatic, night, or day. If the query param is not set
(if night mode is enabled via config), we will default to the user
option as before
Bug: T355118
Change-Id: I38ed94bfc1b80d0a827c63c6dbdd92eb6f1bf531
Add a new user option, `minerva-night-mode`, and configure it with a
default value of 2 (automatic based on OS). Rework the code in
`getHtmlElementAttributes` to set the initial class value according to
the user option, which will be set and saved inside of MobileFrontend
Bug: T355118
Change-Id: I4b0d63a186f490ba10b7655b3af4dcb8b64bd400
Adds a config flag, `MinervaNightMode`, and wires it up as a skin option
for enabling/disabling the night mode toggle (sold separately)
Additionally, allow this feature to be enabled via the
`minervanightmode` query param
For now, turning the flag on will result in the class
`skin-nightmode-clientpref-1` being added to the HTML element, but in a
later change this will be updated to switch values based on the
forthcoming client pref
Bug: T355118
Change-Id: I35848ab80ee75d324ceb35d17794e2d3e620cc19
Changes to the use statements done automatically via script
Addition of missing use statement done manually
Change-Id: I1eec0823b7af97ea5031ff00b111e0c88b45a155
I recently put up a change and was informed by jenkins-bot that I had
decreased PHP test coverage :/
As I would like to be the type of person that only ✨ increases ✨ test
coverage, I wrote the corresponding tests for my change, as well as the
member functions it depends on. From what I can tell, this is the
correct method of writing unit tests, but please do let me know if there
is anything I'm missing!
Change-Id: Id5c4f76ae058d2b0d487245c28b9ccecc2deef8e
Changes
* Update FIXME in userMenu.less to merge selectors
* We replace minerva-user-notifications class with minerva-notifications
to short-circuit Echo's code so that it no longer replaces the Minerva
notification badge with its own.
* We update resources/skins.minerva.scripts/initMobile.js to introduce
our own wire up code - this is responsible for opening Echo overlay
and reseting the counter. The code in Echo will be removed in a follow
up (see <I2f923e509d24524a2375ffbe6b3ef336487574bb>)
* We update skinStyles/ext.echo.styles.badge.less with styles from Vector 2022
so that Minerva desktop remains consistent with desktop Vector 2022 experience.
* We clearly mark technical debt relating to the special mobile version.
Testing:
* Pixel.js has a group echo that covers all the different variants.
Make sure to update to latest main branch before running these.
* Desktop should behave the same for Minerva as Echo.
* On mobile only when a user has unseen notifications a red circle
is shown. Otherwise a bell icon is shown, never with number.
* On mobile a single button is visible that combines alert and count
numbers.
* With Echo disabled a bell shows that links to the user talk page
Visual changes:
* Previously the red circle became a transparent/gray circle on click. Now
it will always be red.
* Minor aligment changes to red circle and bell icon are expected as
the change prevents MobileFrontend/Echo updating the icon to use
Codex.
Bug: T342907
Change-Id: I55c18cf723a32f80b93a01dd0687e005162c4e93
TestUser's are created for real in the test database, but this test
doesn't need that, especially because it's not in the Database group.
Change-Id: I8261b7e8130f0698df4f1684da767f312504c307
Use a UserFactory instead of getting an id and the user objects on
second request
Also replace another deprecated User class and use the injected factory
Bug: T325687
Change-Id: Id610ee39e0ef865b97f7ae8506188eea04a86ac5
* Prefer Title::makeTitle in unit tests where the title is known,
this avoids title parsing and can improve the test performance.
* Use Title::makeTitle for the user page like done in User::getUserPage
Change-Id: I3901a6ed208a5ff90b216d01d3c4962cdcb48db1
This makes the tests a little easier to read, I would argue.
any() is the default anyway. It doesn't add new information to the
test.
Change-Id: If4655ddea494f1054538a760802b583e17c0108e
Remove using of User::isIP since this method will be hard-deprecated. Now it is soft-deprecated
Bug: T275602
Change-Id: I01a0c2ef4d750cf0e81a9345ee462787d4ee28da
The data already provided by SkinMustache makes the existing
Minerva code redundant.
* html-after-content functionality equivalent to dataAfterContent value
* Rename license and last modified to have html-minerva prefixes and promote
to top level data object. This allows us to distingusih Minerva values from core
values.
Note: previously the logo used srcset to ship a 1x logo but these
were dropped during the desktop improvements work.
Bug: T256083
Change-Id: I7b2cd5181eae67b345f6686e3389a76a12e3b1a1
This reverts commit ae8e3ad58b.
Reason for revert: This led to T260155 as the internal class uses
isSubPage which is not available on LinkTarget
Bug: T260155
Change-Id: I783f41e70cf1cf3b91737bce9cbf9ac729a778df
SkinUserPageHelper::__construct() should be able to consume a LinkTarget
too as NamespaceInfo::getSubjectPage() method returns a LinkTarget and
the Title::getSubjectPage() is deprecated.
Change-Id: I08bfc9bb21772b450798b6354bee2ab09d5dba4d
Managing the transition from old implementation to new:
* A version number is exported from skins.minerva.scripts to
tell dormant code added to Echo in I09c27a084100b223662f84de6cbe01bebe1fe774
to begin running.
* A skinStyle is added for the new `ext.echo.mobile` module.
`mobile.notifications.overlay` will soon cease to exist but is kept registered for
backwards compatibility reasons
- Drop ev.preventDefault call from onSkinClick - it is no longer necessary and will ensure
notifications overlay closes when shield is clicked while it is open.
Integration:
* A server side hook SkinMinervaReplaceNotificationsBadge allows Echo to replace
the current Minerva notification badge
* A to-be-created client side hook is subscribed to to deal with the navigations drawer
like functionality using the mainMenu code
* id and class names are added to the container for the NotificationBadge for compatibility with
ext.echo.init in Minerva's desktop mode (it will work like Vector)
See I09c27a084100b223662f84de6cbe01bebe1fe774 for understanding the bigger
picture.
Depends-On: I09c27a084100b223662f84de6cbe01bebe1fe774
Bug: T221007
Change-Id: I4c11f1b241d629e1b294ebaec17472fbf944f8c7