Add a skin-night-mode-page-disabled class to the HTML element when
a page was disabled by the new MinervaNightModeOptions configuration
flag.
Bug: T356653
Change-Id: I7a6582ef8f66e78cc6f07da06bc4d2a3277cfcf0
- 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
Removes a `display: inherit` that was causing issues with the alignment of these two items in the menu. In addition, correctly sets display to none for jsonly-specified list items when client js is disabled and rename the class to make it more specific to the menu items
Note: this will have a visual impact as it is fixing what is currently a visual bug. The jsonly hiding will also not work with cached content, but since it's currently broken we figured this was acceptable
Bug: T346670
Change-Id: I56d2c4fcba09d199a0fd6aad2f1621509bbfaba5
- Add "useDataURI": false to following modules:
-- skins.minerva.mainMenu.advanced.icons
-- skins.minerva.personalMenu.icons
-- Remove .mw-ui-icon-mf-next-invert old class kept for caching from edit.page.js
Bug: T346162
Change-Id: I362fdc9c68a7483c182e3540cba6501d9b12959d
This reverts commit be398f8a29.
Reason for revert: The underlying issue should be fixed.
Let's see if this test works better now.
Bug: T334634
Change-Id: I261606edd277935a34588d9695b9024f01a0d3f0
This restores the previously reverted patchset
If5b76245bf60bfa9cf977cdbf37ee0d6bb65f9d9
Changes since original:
* Added Depends-On to MobileFrontend
* Uses OOUI classes for page issues rather than es6 classes - ES6
classes do not support modifications to class prior to running
super so MobileFrontend's View class is not compatible without
significant refactors.
Depends-On: I24ad75adf8519102ca356d64d99d765ab69180cc
Bug: T348807
Change-Id: I4ff82af0251254c846f2caee330af5af738f6029
This reverts commit 19ea6328b0.
Reason for revert: Breaks page issues and image overlay. I
will break this up into smaller less risky patches.
Change-Id: If5b76245bf60bfa9cf977cdbf37ee0d6bb65f9d9
When the editor is loading a loading overlay is shown and its not
possible to escape it via the back button. Make sure that the test
waits for this to disappear before continuing.
Bug: T348539
Change-Id: Ib53f9129d2cc89c23142c447e25d727592521ae0
Most of these are captured in other bugs
The anon talk message style doesn't do anything.
Bug: T344022
Change-Id: Iba1fce98ea05931fe07b2b20f07c62d198039d1b
- Removes 'mw-ui-icon-with-label-desktop' as that is now the default behavior for icon only buttons in Minerva
- Removes icon flushing classes, use codex mixins instead
80 Visual changes relating to minor icon/button subpixel changes in the heading, edit section links, and page actions
Bug: T319260
Change-Id: I503b643d33e43196483af4b5f9dd312237322ac8
Use the Button.mustache partial in the
PageActionsMenu.mustache template.
This converts the page actions menu to use the Button
template in a way that doesn't change the existing HTML.
The mw-ui-icon-element and mw-ui-icon-with-label-desktop
classes are placed onto the Button.mustache markup.
Bug: T342908
Change-Id: Ib5dadd929eea2e72a24e061c4174348615890617
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
Updates the menuGroup.mustache and ToggleListItem.mustache
templates to include the IconLegacy.mustache template partial.
These templates are used by the main menu and dropdown menus
(logged-in user menu and advanced mobile contributions 'more' menu).
This should result in no visual or HTML changes.
Bug: T342908
Change-Id: Idfad10b48c9ee9e833509e3c4063c6a4b014a31b
Noticed this today.
Apparently was reported a long time ago so let's disable this for
now.
Bug: T334634
Change-Id: Id46a8a7d4b9a22ed5d1bd5df5d5f9b03df1f72b0
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
Move away from User, and use Authority instead. The only exception is
isBlockedFrom, which still requires a User object, so inject a
UserFactory for that.
Simplify the test accordingly, and also remove implicit assumptions as
to what certain user groups are or aren't allowed to do (e.g., watch
pages).
Also avoid using TestUser as it needs a DB connection.
Change-Id: Idfff8fd00f7b01df1dc6ec509dfc0cbd10ce7ce0
WebdriverIO has dropped support of sync mode, hence changed to async.
Update npm packages: @wdio/*, wdio-mediawiki
because async mode needs at least @wdio v7.9.
Remove npm packages: @wdio/dot-reporter and @wdio/sync.
Bug: T293084
Change-Id: I5babbdadf21e9f951f69de93bfca5213a50965aa
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
"Wikitext Editor (Makes actual saves).Broken redirects" is constantly
breaking CI in core.
I have enabled it in
b9a92ef717
but it isn't as stable as I thought.
Bug: T280652
Change-Id: I667f65a27fd420a3a70f39fb5e1606907e465897
'Broken redirects' was disabled in 69a100cb45
'should be creatable' was disabled in 5e0dd88af0
'should be creatable' is failing so it is deleted.
'Broken redirects' is passing so it is enabled.
To be sure that the passing test is not flaky, the CI has ran it 100
times, it never failed.
Bug: T280652
Change-Id: I34a863dcbd126c2da8a98624e6ba1fa916eac0cf
The feature is being replaced by DiscussionTools. We're not ready to
remove it completely yet, but the tests are preventing us from
enabling it on additional wikis.
Bug: T317467
Change-Id: I8b8206d2810426cf4e09da37d0fcd8dec766ccb3
Use the config parameters from the core file
tests/qunit/resources/mediawiki.Title.test.js
This change allows to run the JavaScript tests on a wiki with a non
English content language.
Change-Id: Ie2b45646117b48904798f9ac64fd8a70d39e49e1
Hard deprecated the Group::insertAfter() function because it is not used in the Mediawiki codebase
Bug: T311894
Change-Id: I209d3fd492713425a2727fd48c5870f983a39f9b
* Created a buildMenuEntry function
* Replaced all Group::insert() functions with Group::insertEntry()
* Added a trackable parameter to check if a menu entry will be trackable
* Removed the MenuEntry class
* Removed the MenuEntryTest class
* Removed the Group::insert() function
* Changed tests in GroupTest to test Group::insertEntry() function
Bug: T221004
Change-Id: I39bed4e9a9b09f904cb3e5d78ccb3e6e175981a8
For now this should be a NOOP as the existing "special" page tab
is removed, put it paves the way for using tabs on special pages.
Bug: T286466
Change-Id: Ic0b52b298d598c20987b172c81c732a31e409402
* Update stylelint-config-wikimedia to 0.13.0
* Ensure eslintrc.js and root files are linted
with server config
Change-Id: I59c49fedd5b0c4c5620f960b78e4f781a6bc5abb
* Declare variables inline, as per the current code conventions.
* Use built-in assert.true() and assert.false() in a few places.
* Use built-in QUnit.test.each() to remove need for ad-hoc loops and
inline composing of assertion messages with common prefixes. This
also creates clearer and more detailed test reports, and more granular
ability to re-run specific test cases.
* Remove unneeded use of `QUnit.newMwEnvironment()`.
* Simplify restoring of mw.Uri by storing the original reference
once outside the test, and then re-using that each time.
* Use mw.config.set() for improved familiarity and rely on natural
restoration instead of the extra 'config' key abstraction which is
another thing to learn and understand.
Change-Id: I796e034854203d2e0e78e510458f4b34603e9901
These are never run. We are not running them manually, so we should
remove them from the codebase.
Change-Id: If54b45dfc72f32c2631a4338096b568aae5d404a
beforeEach failures do not have videos associated. We'd like to see
what's going wrong with these tests.
Change-Id: I1b723bcd7d00f15907647d5c7a4aa1f57578468c
This reverts commit 422e3a3b09.
Reason for revert: The Ruby tests don't run. This change should be in
the Node tests.
Change-Id: If59753569b1eb24ffaf2486242ea49e794d388b5
The mobile editor can load in two modes - visual editor or wikitext
editor. On the beta cluster depending on user preferences, the
VisualEditor may be loaded.
Since this test is just a smoke test that checks it renders, it's
okay to look for both.
Bug: T301575
Change-Id: I8192fc6e71e064278f62fc41e80652860f319e37
* 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
'Redirects' was disabled by Edward Tadros in fbd373b (2021-01-15).
'A newly created topic appears in the list of topics' was disabled by
Jon Robson in d4828b2 (2020-09-24).
Bug: T280652
Change-Id: I63fb62c0c2871ff2713643285cd6e5d878684f83
Avoid time outs
Error in "Opening and closing the reference drawer.Opening a nested
reference"
Error: waitUntil condition timed out after 5000ms
at Browser.<anonymous>
(/workspace/src/skins/MinervaNeue/node_modules/@wdio/utils/build/shim.js:270:24)
at iShouldSeeDrawerWithText
(/workspace/src/skins/MinervaNeue/tests/selenium/features/step_definitions/reference_steps.js:25:10)
at Context.<anonymous>
(/workspace/src/skins/MinervaNeue/tests/selenium/specs/references.js:44:3)
FAILED in chrome - /tests/selenium/specs/references.js
Change-Id: Ia5d493fba4995c1122721b76ae98d6ba60399238
Wikimedia CI now serves MediaWiki over Apache (T285649) which mean we
can do concurrent requests!
Bug: T226869
Change-Id: Ifb155b7a14f5dd7b037578c83c9590f7901feacf
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 code per spike outcome (T226490#7438685)
- This configuration option is never used in Wikimedia production
- isTalkAllowed content body is merged into isAllowed. Resulting code
is more readable.
- isAllowed('talk') still returns false on main page for anonymous users
which is the current behavior. Even on sv.m.wikipedia.org where talk pages
are shown to anonymous users, we do not show the talk page on the main page.
Add a comment pointing to the associated phabricator ticket
Bug: T226490
Change-Id: I9f34817c5ad654a6a66fe6156850a3e3fee881a7
Follow up to
9833b2d853
- Rename timeout to printSetTimeoutReference
- Remove redundant function
- update documentation to mention side effects
Change-Id: I4c1b356da3ba53e805d126642f0b2da915b988e5