This makes it easier to understand which files belong together,
which ones can "see" each other, and to find the files through
code browsers and text editors without having to look up
in Resources.php.
Bug: T193826
Bug: T270141
Change-Id: Id87c11f66cbd8c699c9bb01261523f2500df718d
Since the legacy parser will also be emitting the new media structure
that requires these styles. For now, the feature is only shipped by
default when $wgUseNewMediaStructure is enabled.
Bug: T51097
Bug: T266148
Change-Id: Id20d716ce145e0bae37621fd6e218a793b5332ae
The only known usage is Cargo skin.
Note, that Minerva references the module but only to remove it from
the page. This is removed in 0e61c55ea.
Follow up to db3c8ea16b
Bug: T252774
Change-Id: I05d79f073f5303b036e47c2a0b37e9bfbaf0d2d1
Going forward all skins will have a single ResourceLoader module
defining their styles.
This deprecates the module moving its functionality into ResourceLoaderSkinModule.
Skins can continue to get those styles by enabling the new feature in their
main module.
Bug: T267577
Change-Id: I27c9f2c6ed9e4014afb231f690190c67b03b5d02
The table of content styles will now be loaded on all pages rather than
just pages which have it. This will lead to less stylesheet fragmentation
across page views.
Skins in WMF production were updated long ago to automatically opt
into new features so will automatically gain this module:
I98b7e49b8a3bcba31284385d2f45e0164df2fbb4
I50afd035360ff2eccd5a934a02a218d093f9583d
I5b3920ae6e98111582b93e60a2b9950c478bff7d
If9283742a83ecfbe8c4246e3624022a56be8f161
If9ae25c41b91a8b47c154f0fd98984eac526654f
Skins that are using ResourceLoaderSkinModule with opt-in approach or
the existing mediawiki.skinning.interface, will automatically get these
new styles. Skins that are use neither of these mechanisms will need to
be modified if they wish to retain the collapsing functionality of the
table of contents. As of now, I am not aware of any such skins.
Note in a follow-up, the mediawiki.toc.styles module will be marked as
deprecated in 1.35. This is done separately to allow WMF caches
some time to roll over to the new code first.
Bug: T252774
Change-Id: Ie28b7e732664eb332be795d7e33cd9a227c21370
It appears that many Wikimedia wikis have complex overrides for
this message. Only a small set of wikitext syntax is supported in
messages that are used client-side [1]. So, parse it on the server.
'packageFiles' and callbacks make this almost convenient.
[1] https://www.mediawiki.org/wiki/Manual:Messages_API#Feature_support_in_JavaScript
Bug: T266311
Change-Id: If3d675ac0232c378feca825e989ea9cd7daee8cc
Provide the equivalent functionality of WebRequest::getCrossSiteCookie()
and the sameSite and sameSiteLegacy options in WebResponse::setCookie()
in mediawiki.cookie.
Bug: T257936
Change-Id: I88a970bb00c672a9c23569ec791be51d07cae59d
mediawiki.action.edit.preview.js now reconstructs "Templates used in
this preview" beneath the edit box if it doesn't exist, so that the list
of transclusions in the preview returned by the Parse API will now be
available to the user even when creating a new page or editing a
section. It also now correctly replaces the label "Templates used on
this page" with "Templates used in this preview", or "Template" if there
is only one, thus more closely matching the default PHP behavior.
Bug: T102286
Change-Id: I9976067d9c3a42d2a93d56da677354a8f352eb2f
This commit allows the user to tab into the expiry dropdown directly
from the watch link. This reason for this is becuase there is limited
time to get to the popup before it is automatically dismissed.
To avoid redundantly listening to keystrokes for the entire session, the
listener is only valid for the initial keystroke after the popup is
shown.
So the workflow for someone with motor impairment might be to hit
[alt-shift-w] to watch via the watch link, then hit [tab] to jump to the
expiry dropdown and change the expiry as desired.
Hitting [tab] again when focus is on the dropdown will move focus bcak
to the watch link. This is because we can't be certain what elements
follow #ca-unwatch across all skins (also scripts and gadgets could
cause conflicts).
Bug: T261430
Change-Id: Ia7d3f8d963810821f7915690dc62a66c7c778de3
Add a new resource module for watchlist expiry behaviour in
changes lists, to add a message when the clock is clicked on
mobile.
Bug: T261415
Change-Id: I621b1571b57686beb9fb5802533b1e70d293bc2a
These URLs are typically used with curl or a similar tool; having
to manually turn them into an absolute URL is an annoyance.
Change-Id: I3c3229e228e9ccb25c4b1b8642736b7e9d213ff2
The previous method of using an array was restrictive in that core
could not add new features automatically to skins.
This change allows an opt-out policy as well as the existing
opt-in policy. Wikimedia deployed skins will soon be adapted to take
the opt-in policy.
Bug: T252774
Change-Id: I517f9f80760348da589852cda53cbd0c14231f86
Update watchlist expiry language indicators (dropdowns, tooltips, watch
via star, watch via edit):
* Change "Permanently" to "Permanent"
* Change "XX days left" and "Expires in X days" to "XX days left in
watchlist"
* Update the "Click.." sentence by star to "Click to remove it."
* Change watch period for a page that is less than "1 day left" to "A
few hours left"
Bug: T253135
Bug: T255632
Change-Id: I114c6f77e86ad81b1810fedcd49f52c88700ca16
The distinction between the two was lost several years years ago
when the "position top" queue ceased to be a thing. Since then,
the two have been loaded and executed together in the same batch,
and are doing similar things.
mediawiki.page.ready is publicly used in several places
as dependendency, but mediawiki.page.startup is entirely internal
to core, which makes it the easier one of the two to dissolve.
Keep an alias for two weeks for cache compat to avoid console
warnings about unknown modules. Although even some cache still
refers to it, this is harmless since the errors are recoverable
and the correct module was also loaded by the cached pages
already.
Bug: T260210
Change-Id: Ic418c23a7400abba22fd07b17f173d3c5f1d1d10
Minerva does not make use of this code at all and going forward
as we migrate to Vue, Vector will provide its own search module.
Both use cases are supported by a simple boolean.
See Ib6c8f890fb3d6e751f5f01a6576614b9cc9b440c for Vector usage.
Bug: T250851
Change-Id: I0dc38e74052027f26a70d58b5f520e5830e0d55d
Add 'ready.config.json' to resource
Add 'collapsible', 'sortable' field to be possible override via hook.
In order to override setting, new hook ResourceLoaderPageReadyConfigHook has been introduced.
A new config field for search will follow.
Bug: T250851
Change-Id: I041d4a4b9114f1190f28e0283d96cd33b81f9850
Add a new tooltip message that displays the remaining watch period of a
page, if it is being watched temporarily. The tooltip message remains
the same if it is being watched indefinitely.
Bug: T250215
Change-Id: Ic9d1301427d477de71fb6f63fe77554a33684cd1
Add functionality that allows users to select a watch period via a
drop-down in the pop-up that shows up when a user watches a page via star.
Update the expiry dropdown when user is in a page edit-form.
Bug: T249262
Change-Id: I9a7dfcaf84be8083e0319789dc95f2d15cee245a
Narrator not announcing popup dialog when
when changes and limit button is clicked.
Focus order is not logical when for keyboard only users
This fix here attempts to make the focus logical, it binds a handler
to the ready and close event placing focus on the button select widget
and place focus back on the button when the popup closes.
Bug: T257171
Change-Id: I66355d5d4d45a9b4aeb14974d228e4a193645a1e