Commit graph

8325 commits

Author SHA1 Message Date
jenkins-bot
d9ec591d7a Merge "mediawiki.util: return null in getParamValue() if input fails to decode" 2020-11-25 03:10:15 +00:00
jdlrobson
aef73ab542 mediawiki.util: return null in getParamValue() if input fails to decode
mw.util.getParamValue should return null, not throw exceptions,
on input it cannot decode.

Bug: T268058
Change-Id: I8b565f781b1631a545fdf1b220fbb16976b99ea6
2020-11-24 10:07:47 -08:00
DannyS712
f3aade2b23 Docs: remove mention of old ResourceLoader "top" queue
Hasn't existed since 1.29, see T109837

Change-Id: I3eed5a67dbbebd1ff9b75032c48cc306a7a4a2d2
2020-11-24 07:03:00 +00:00
jenkins-bot
d21b9809d7 Merge "docs: Add a missing semicolon to javascript example" 2020-11-24 06:44:13 +00:00
Ammar Abdulhamid
77778b0181 Fix some JSdoc issues and unused eslint-disable directives
Change-Id: I3e6b75a75eb70c6c60f0835996e5892a23362098
2020-11-24 04:37:15 +01:00
DannyS712
bc10165eb0 docs: Add a missing semicolon to javascript example
Change-Id: Ie35b4fafef11806895dae5ce0b7a559f49931080
2020-11-24 03:20:51 +00:00
DannyS712
6166c62603 Fix a typo: parametrized -> parameterized
Bug: T201491
Change-Id: If0b85ec20ce052acd0851c7146c9b3a3faaac27b
2020-11-22 07:47:49 +00:00
jenkins-bot
b1796f314e Merge "Update stylelint-config-wikimedia to 0.10.3" 2020-11-20 00:08:09 +00:00
Ed Sanders
5dece5b27b Update stylelint-config-wikimedia to 0.10.3
Remove needless disables.

Change-Id: I324ab9d23a354cb0298a0714df2535f8e8850261
2020-11-19 23:13:37 +00:00
jenkins-bot
f2f2f43f97 Merge "Add hidden username to password change forms" 2020-11-17 22:34:27 +00:00
jdlrobson
4e5427f520 ResourceLoaderSkinModule: Move edit link into interface feature
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
2020-11-17 13:00:44 -08:00
jdlrobson
db3c8ea16b Add new 'toc' feature to ResourceLoaderSkinModule
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
2020-11-16 20:33:05 +00:00
Volker E
0580b2452c mediawiki.mixins: Remove deprecated .background-image-svg() mixin
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
2020-11-10 11:32:18 -08:00
jenkins-bot
e836dfa404 Merge "Support the WebRequest / WebResponse SameSite behavior on the JS side" 2020-11-10 03:08:10 +00:00
jenkins-bot
b8c277c932 Merge "Add API validator for titles" 2020-11-07 00:22:42 +00:00
Gergő Tisza
84e9702349
Add API validator for titles
The ISMULTI logic is copied from UserDef.

Change-Id: I794e2277c462b86cb5c3888d1ba509b11fad62aa
2020-11-06 14:09:04 -08:00
jenkins-bot
d7fe1ff0fe Merge "Pass along ignorewarnings param to all individual chunks being uploaded" 2020-11-06 11:10:00 +00:00
jenkins-bot
706b2e2f0b Merge "Don't assume that warnings array will include 'code' key" 2020-11-06 11:05:48 +00:00
Matthias Mullie
f0131f2543 Pass along ignorewarnings param to all individual chunks being uploaded
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
2020-11-06 10:13:08 +01:00
Matthias Mullie
1d84560280 Don't assume that warnings array will include 'code' key
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
2020-11-05 10:45:22 +01:00
Bartosz Dziewoński
9c02f572bc mediawiki.action.edit.preview: Add versionCallback to improve startup perf
Bug: T266311
Change-Id: I4486ae32cffd803e0c86e8499101cd4a250f7d99
2020-11-04 20:30:14 +01:00
jenkins-bot
dbf24bff58 Merge "Hard deprecate Language::commafy; deprecate mediawiki.language.commafy" 2020-10-29 00:45:40 +00:00
C. Scott Ananian
4bc5c76129 Hard deprecate Language::commafy; deprecate mediawiki.language.commafy
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
2020-10-28 19:39:17 +00:00
Bartosz Dziewoński
42351616f2 mediawiki.action.edit.preview: Parse 'previewnote' message on the server
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
2020-10-28 03:04:50 +01:00
jenkins-bot
b1f385640f Merge "watchlist: Remove clock icon when rewatching a page" 2020-10-26 18:28:49 +00:00
jenkins-bot
8b61aba068 Merge "Check node existence in case a gadget is modifying the page" 2020-10-26 18:24:23 +00:00
jdlrobson
9d28078079 Check node existence in case a gadget is modifying the page
Bug: T262844
Change-Id: I079052e6f171d6a09bdc21cdc72ca414f6b12da2
2020-10-26 16:46:27 +00:00
jenkins-bot
12f0372543 Merge "Use OOUI green tick for postEdit notification" 2020-10-26 14:19:10 +00:00
Ed Sanders
2f6bc59a4c Use OOUI green tick for postEdit notification
Bug: T58313
Change-Id: I448a68ebb78a60bfb2b631bb73c047b6bec56050
2020-10-26 13:44:06 +00:00
jdlrobson
f3f104dba4 mediawiki.util: Use mw.util rather than 'this'
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
2020-10-23 21:51:42 +00:00
jenkins-bot
5bf5c9d95d Merge "Add 'external' class to links generated by jQueryMsg" 2020-10-23 18:58:40 +00:00
Ed Sanders
497be20fdb ApiSandbox: Remove full page border
Bug: T130499
Change-Id: I1cf945b034332a6e9d2a2d971b70b60f89f6529e
2020-10-22 12:09:45 +01:00
Ed Sanders
f43697a31d ApiSandbox: Fix width and padding of help popups
Change-Id: Ia90fd961cd9093064ed520c7aeeb003da8f0fa8d
2020-10-22 11:57:01 +01:00
Ed Sanders
e96d76ea42 ApiSandbox: Use LESS
Change-Id: I5368ff7b43c8eb504b4d1a0699eac0d1a031c447
2020-10-22 10:50:19 +01:00
Ed Sanders
a6229c888e ApiSandbox: Reduce width of field labels, and set max width on field
Bug: T130495
Change-Id: I20575ce6f3039a178eed798ec211dd447a8c1e97
2020-10-22 10:46:22 +01:00
Ed Sanders
0cee9916cb ApiSandbox: Restore padding around field spacers
Bug: T130496
Change-Id: I916e21ad37a63786400c84e2c0a070cd73df4d4a
2020-10-22 10:46:19 +01:00
jdlrobson
c8fd448392 Harden code working with user input to fix JavaScript exceptions
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
2020-10-21 23:12:44 +00:00
Ed Sanders
aa09ad9739 ApiSandbox: Style field help with oo-ui-inline-help class
Bug: T130496
Change-Id: I2235dcb0f858c1f0c9e89928123a5bad5ae85865
2020-10-21 20:56:28 +01:00
Helder Geovane Gomes de Lima
371f0d1f50 Add 'external' class to links generated by jQueryMsg
Bug: T176711
Change-Id: I439461a20fcb235b2f1571946704d01348dfccf5
2020-10-20 18:36:07 -03:00
Dayllan Maza
ae6e62ab68 watchlist: Remove clock icon when rewatching a page
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
2020-10-20 01:01:02 -04:00
Gergő Tisza
22c0986019 Support the WebRequest / WebResponse SameSite behavior on the JS side
Provide the equivalent functionality of WebRequest::getCrossSiteCookie()
and the sameSite and sameSiteLegacy options in WebResponse::setCookie()
in mediawiki.cookie.

Bug: T257936
Change-Id: I88a970bb00c672a9c23569ec791be51d07cae59d
2020-10-19 06:50:29 +00:00
Bartosz Dziewoński
26f99feffa DateTimeInputWidget: Fix incorrect value due to mixed LESS units
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
2020-10-17 00:48:29 +02:00
jenkins-bot
c05877441a Merge "rcfilters: Fix units of LESS variables" 2020-10-16 21:23:01 +00:00
Bartosz Dziewoński
6a48912f7e rcfilters: Fix units of LESS variables
Bug: T265650
Change-Id: I8bae10564581bdc3a35b68a8133b5d8d7796ce01
2020-10-16 22:40:47 +02:00
Bartosz Dziewoński
1132133deb Fix units of copy-pasted @ooui-font-size-base LESS variable
Same change as I3baf15fd8e0435fc7a05ba6ff6fef58f7aa55563 in OOUI.

Bug: T265650
Change-Id: Ic829a494220bba00758febde1ce679cc9ecf0165
2020-10-16 22:10:06 +02:00
jenkins-bot
c3d80f59e0 Merge "mediawiki.htmlform: Ensure collapsible forms are enabled" 2020-10-15 18:43:10 +00:00
jenkins-bot
2b48be1a6e Merge "Revert "Move activating of makeCollapsible out of 'mediawiki.page.ready'"" 2020-10-15 18:24:04 +00:00
jenkins-bot
7702eafcd8 Merge "Add new OOUI messages to the module definition" 2020-10-15 16:55:51 +00:00
Bartosz Dziewoński
5a99685af7 Add new OOUI messages to the module definition
New messages were added in OOUI v0.40.4.

Follow-up to b4edfa6d9b.

Change-Id: Ife0f8bc9ce6c0b3e9dda8ede232ebb586158c4be
2020-10-15 16:06:08 +00:00
Derk-Jan Hartman
7e9cac27d1 LivePreview: Show parse warnings and preview header/warning
Bug: T91167
Bug: T190120
Change-Id: Ifec1e8fa12f1d774bef2722eaf963f1fba4d6223
2020-10-15 14:33:24 +00:00