This reverts commit 0585dea9f9.
Reason for revert: Moved logic for wikibase link into Wikibase repo (see 1079302)
Change-Id: I780baa6cd17f8b52ae4bae88e6686c22760f410d
Resubmission of Ib68f45d93a (548e94da98), which caused an error due
to `require('../../`)` not working outside the module base directory.
This is fixed with regression test in T373065.
Further confirmed in this repo by viewing
`/wiki/Special:CreateAccount?campaign=loginCTA&useskin=minerva`
with this patch applied. Without the T373065 fix, the console warns:
> Error: Cannot require undefined file …/ToggleList.js
-------
Support for private require() in tests is available since MW 1.41:
https://mediawiki.org/wiki/RL/PKG#Private_export_and_importhttps://mediawiki.org/wiki/RL/PKG#Virtual_files_in_traditional_modules
This fixes a confusing assertion in page-issues/index.test.js,
where for "insertBannersOrNotice()" it was asserting that the HTML
contain "⧼skin-minerva-issue-learn-more⧽", where the ⧼ character
indicates the message is not found (i.e. an error).
The test had to be written this way in order to pass, because
the skins.minerva.scripts module was not actually loaded, and thus
its templates and messages are not present either. This lack was
filled in by index.js for mw.templates, but not mw.messages.
By adopting private require(), these workarounds can all be removed.
== Motivation ==
In change I3a4024ccf90e505581, I'm working on improving the testrunner
config to enforce uselang=qqx on all tests. This is passing except
for GrowthExperiments and Minerva, both of which have the above
workarounds in place that caused a message to be undefined, and then
kept in the assertion expectation. When using uselang=qqx, values are
returned as (key) instead of ⧼key⧽, which exposes these message
existence errors.
By removing this workaround, the test will simply import the module
in the test as normal, thus the messages will exist, and thus it
will expect (key), and thus it will continue to pass even after
enforcing uselang=qqx.
Bug: T373482
Depends-On: I777f2c12e845a738edeac00e19818d4c939a1ef1
Change-Id: I6348e5ae00776c2c01d91fa90a431b6ffe3da25d
This reverts commit 548e94da98.
Reason for revert: The patch was causing the following error on pageload
Error: Cannot require undefined file includes/Skins/ToggleList/ToggleList.js
require startup.js:1006
Bug: T373482
Change-Id: I22751109c124795af7d2e0ad6c4104745b2d6632
Added to MediaWiki core last year with I9fca9fdf9b7623b1.
This fixes a confusing assertion in page-issues/index.test.js,
where for "insertBannersOrNotice()" it was asserting that the HTML
contain "⧼skin-minerva-issue-learn-more⧽", where the ⧼ character
indicates the message is not found (i.e. an error).
The test had to be written this way in order to pass, because
the skins.minerva.scripts module was not actually loaded, and thus
its templates and messages are not present either. This lack was
filled in by index.js for mw.templates, but not mw.messages.
By adopting private require(), these workarounds can all be removed.
== Motivation ==
In change I3a4024ccf90e505581, I'm working on improving the testrunner
config to enforce uselang=qqx on all tests. This is passing except
for GrowthExperiments and Minerva, both of which have the above
workarounds in place that caused a message to be undefined, and then
kept in the assertion expectation. When using uselang=qqx, values are
returned as (key) instead of ⧼key⧽, which exposes these message
existence errors.
By removing this workaround, the test will simply import the module
in the test as normal, thus the messages will exist, and thus it
will expect (key), and thus it will continue to pass even after
enforcing uselang=qqx.
Change-Id: Ib68f45d93a7054ed8bd35fc5644e2852f2f90248
* eslint-config-wikimedia: 0.27.0 → 0.28.2
The following rules are failing and were disabled:
* tests/selenium:
* implicit-arrow-linebreak
* no-mixed-spaces-and-tabs
* grunt-banana-checker: 0.11.1 → 0.13.0
* stylelint-config-wikimedia: 0.16.1 → 0.17.2
The following rules no longer exist and were removed:
* stylistic/selector-list-comma-newline-after
* braces: 3.0.2 → 3.0.3
* https://github.com/advisories/GHSA-grv7-fg5c-xmjg
Change-Id: Ia94454c1da778f241085714e1601a0233d547570
- Include date and bug ID in skipped test comments
- Helps track and identify unfixed tests
Bug: T280652
Change-Id: I2e78385e3ed5f0cb073677d4b4d0bcb74454c66f
The service 'Minerva.Menu.PageActionsDirector' is bad because it depends
on the global state.
Create a new service 'Minerva.Menu.PageActions' and inject this.
Change-Id: Ie84d02ef29d3b7809f490a1593cb2f3cef60b3a3
This change restores the special toolbar behavior on user talk pages
lost in I80342e5168435c5318c378e2ac8a9a3c7a28eb4c.
Also add a test case that checks the cache on multiple setTitle calls.
Bug: T366645
Change-Id: Ifb481c546f2f77bd502cd9390d371a6e82bd5e69
* Declare class names from other namespaces in the `use` block.
* Use Foo::class instead of 'Foo' to reference a class name.
Change-Id: I5a1aba6b0cc8842d71b6b6df0a0b67e16e5b6453
All these tests and associated steps are skipped and apply to pages that
no longer exist - Special:MobileDiff and Special:MobileHistory and can
safely be removed.
Change-Id: I15edf8c2fc88fbc01585c2b7e1243daa6d9210b9
* Move global state parameters to new methods setContext and setTitle.
This change solves the circular dependency error for service
'SkinUserPageHelper'. The service will used in SkinOptions in the
follow-up change I014e61c6692adbbe449f1e6aa9c6ae73dbcff925.
Change-Id: I80342e5168435c5318c378e2ac8a9a3c7a28eb4c
Services MUST NOT vary their behaviour on global state, especially not
WebRequest, RequestContext (T218555).
Change-Id: I4b73ef713166d8b254023c1eebbb45c963880a99
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