mw.util.getParamValue should return null, not throw exceptions,
on input it cannot decode.
Bug: T268058
Change-Id: I8b565f781b1631a545fdf1b220fbb16976b99ea6
While working on the Example skin we noticed that the edit section
links and hiding of the print footer are important styles.
Rather than making the Example skin inherit the legacy feature, these
essential rules are added to the existing interface styles.
For backwards compatibility, legacy continues to ship the interface
edit links.
For skins loading both interface and legacy, the styles will be loaded
twice but we will lean on gzip to avoid an increase in CSS bytes
Bug: T89981
Change-Id: I7d35b44fc8c135320dfd1d99b16ba47ebaac876b
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
Deprecated in MW 1.35 and replaced with standard `background-image: url()`
properties in all code repos on our radar since.
Bug: T248062
Change-Id: I6fd03d8371e2e88190bd7c21b859ed7758bdaaf6
Otherwise, those warnings are not ignored, and the output of
each individual chunk upload is polluted with warning information
rather than success/continue status.
This now also allows restoring the failure callback to only
recover (and allow finalizing upload of) successfully uploaded
files. When warningss can't be ignored, we have no means of
figuring out whether all chunks have been uploaded, which could
lead to allowing concatenation of an only partially uploaded file.
Bug: T264333
Bug: T190988
Bug: T266903
Change-Id: Ie3ef59215a2d3009fdbaabcab02cd5c1875c3d84
This code is explicitly in place to allow continuing an upload
in the case of (recoverable) warning. The `code` looks to only
be used as part of the failure handling, and the lack of that
failure-related key should not cause the upload process to halt
if not all chunks have been uploaded yet.
Change-Id: Ib9fad816c54662aa2642821195756e0f2828919b
Language::commafy was deprecated; it is poorly named, and its functionality
is rolled into ::formatNum/::formatNumNoSeparators.
Deprecate mediawiki.language.commafy for similar reasons, and because
it parallels a deprecated core PHP method. Perhaps it would be
worthwhile to add a new JS method in the future more closely matching
the PHP ::formatNum/::formatNumNoSeparators pair.
Code search: https://codesearch.wmcloud.org/search/?q=commafy%5C%28&i=nope&files=&repos=
Change-Id: Id3fc5dc2c7e62495a532db93d85a6f1cb8e8cbeb
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
Follows-up 6d967ed4a8.
Certain wikis, for example `zh-yue` use
`mw.log.deprecate` to connect window.addPortletLink to
mw.util.addPortletLink
Given the 868 errors per day we are seeing from user scripts
it seems useful to address this.
Bug: T265809
Change-Id: I1011f63ae61f5a659aa837280112f4cccc31c906
There have been a few errors in the error logs relating to these
lines of code. Let's harden it in the cases where the response is
unexpected and when the user input is empty.
Change-Id: Ib43d93004b3959404b01fe3e16fb0650d163decd
On Special:Watchlist with watchlistunwatchlinks preference
enabled, the clock icon is now removed when rewatching a page
that was previously being watched temporarily to correctly
indicate that the title is now permanently in your watchlist
Bug: T263664
Change-Id: Ia047ab9ac9be503eb50214ff8abc836cff66336a
Provide the equivalent functionality of WebRequest::getCrossSiteCookie()
and the sameSite and sameSiteLegacy options in WebResponse::setCookie()
in mediawiki.cookie.
Bug: T257936
Change-Id: I88a970bb00c672a9c23569ec791be51d07cae59d
This padding-right was computing to `16.85714286em`, which is
definitely not correct. After the change, it computes to `28px`.
Bug: T265650
Change-Id: Ideb895d1db4ce1108c336210c7e58f84d1f2900e