Commit graph

18008 commits

Author SHA1 Message Date
jenkins-bot 86f9acf616 Merge "Cleanup feature flags in ve.ui.MWParameterPage" 2021-08-27 10:32:10 +00:00
jenkins-bot f2b94e10b6 Merge "More test cases for MWTransclusionOutlineContainerWidget" 2021-08-27 10:00:04 +00:00
jenkins-bot 4dd435f3af Merge "More meaningful assertions for all outline part widgets" 2021-08-27 09:59:21 +00:00
jenkins-bot bdb3a783c9 Merge "Add basic QUnit tests for all transclusion outline classes" 2021-08-27 09:59:16 +00:00
Translation updater bot 8ed7547778 Localisation updates from https://translatewiki.net.
Change-Id: I639a6aabe702b8a7ae8233de45d5307d332d856e
2021-08-27 08:44:20 +02:00
Bartosz Dziewoński 702d261bbd ve.ce.MWHeadingNode: Fix Uncaught TypeError: this.root is null
Similar code elsewhere checks whether this.root is set
(e.g. ve.ce.FocusableNode.prototype.onFocusableSetup).
And code here checks whether this.surface is set.

Bug: T289201
Change-Id: If07dc75ca76f2d171bc2eae83be10083d95096f8
2021-08-26 21:35:19 +02:00
Andrew Kostka d94fb21b1e Remove wikitext buttons from the content view
Bug: T285669
Change-Id: I875a41e54e7a33cb9f67383d887a732a31649bbb
2021-08-26 17:47:14 +02:00
Thiemo Kreuz 7aeff4bfd3 Move small code snippets into …OutlineParameterSelectWidget
Most notably:
* Move some code snippets from the outer …TemplateWidget to
  the inner …SelectWidget, without introducing new
  dependencies.
* Move all knowledge about the item class
  …OutlineParameterWidget class into …SelectWidget.
* Some more self-documenting method names for event handlers.
* Avoid the somewhat ambiguous variable name "checkbox" in
  favor of "item". That's how it's named in the upstream OOUI
  …SelectWidget.

This is extracted from the following patch Ibd94c39. The
difference is that the following patch adds a new dependency:
The …SelectWidget gets to know the template model. This patch
here contains all changes that are possible without this new
dependency.

Bug: T288827
Change-Id: I187f313c84424b28005d9276cb1356029f9ebb75
2021-08-26 17:30:03 +02:00
Andrew Kostka afe8e8f721 Cleanup feature flags in ve.ui.MWParameterPage
Change-Id: Id1be6512f763d9ddb98665005d378947fdd3e6bb
2021-08-26 17:25:09 +02:00
jenkins-bot a5718f01c5 Merge "Remove unnecessary title parsing from template related code" 2021-08-26 15:08:13 +00:00
jenkins-bot 765b1da5b1 Merge "Use spec label for template link generation" 2021-08-26 14:13:22 +00:00
Thiemo Kreuz c8536f1a71 Remove unnecessary title parsing from template related code
There are 2 situations:

1. Either the template name is used in a [[…]] link. In this case
we must provide the namespace. MWTemplateModel.getTitle() does
this. However, it's not a mw.Title object and therefor not really
guaranteed to be a valid title. This is fine. The worst thing
that can happen is that the link points to an error message.
But this should be entirely unreachable anyway.

2. Some messages want to display the name of the template.
Ideally without the namespace. That's what
MWTemplateSpecModel.getLabel() is for. Again this is not
guaranteed to be a valid mw.Title. But it doesn't need to. It's
only used as a label.

Change-Id: I03d0481201620a2f5c444ee32b656bcaade98aac
2021-08-26 15:58:15 +02:00
jenkins-bot 34992ba3ac Merge "Basic cursor key support in new template dialog sidebar" 2021-08-26 13:46:40 +00:00
WMDE-Fisch 3913f635d4 Use spec label for template link generation
We should only need that label for the link. The other mechanic
would fail when editing wikitext like this:

{{{{echo|<}}|param=foo}}

Bug: T272487
Change-Id: If8d228b40bf1589181e83e8f68f3c33b4c7759c7
2021-08-26 15:09:48 +02:00
Thiemo Kreuz 0bd9e587b3 Basic cursor key support in new template dialog sidebar
Bug: T285323
Depends-On: I47effe05427cfabfcf534920edee79521eaa033f
Change-Id: I319896a20a71b18655ebb93663d47e656a1a67a6
2021-08-26 12:48:49 +00:00
Thiemo Kreuz df713170e0 Harden title parsing in MWTransclusionModel a bit
It appears like it's currently not possible to reach this code
with an invalid template name like `{{foo}}`. But this is not
guaranteed.

The purpose of this code is to call the TemplateData API. This is
pointless when a title is invalid. We know a page with this name
can't exist. So we skip it.

But that's all this code cares about. It should not crash. Nor
does it need to report this situation.

This is related to the discussion in Ic364e75.

Change-Id: If9bacc91b1c7bb110b33bfd395e1cbdf538e6c22
2021-08-26 14:46:01 +02:00
Thiemo Kreuz 61fac2fb44 Add a first PHPUnit test for SpecialCollabPad
Change-Id: I871f3d9616a40300ee306f58b4bae5a58b57b53f
2021-08-26 12:09:59 +02:00
Thiemo Kreuz a1464bd617 Simplify some API PHP code where possible
Change-Id: I663d9f2a25c70d8d265a3217cd1d0ad6fbb1bb3e
2021-08-26 11:37:13 +02:00
jenkins-bot 6c33cc4a35 Merge "Add message on multipart content" 2021-08-26 07:34:15 +00:00
jenkins-bot 5be007ee9a Merge "Minor cleanups to new add parameter input widget" 2021-08-26 07:26:53 +00:00
jenkins-bot 4741abe803 Merge "Added new input page for undocumented parameters" 2021-08-26 07:26:41 +00:00
Translation updater bot 04cd63520e Localisation updates from https://translatewiki.net.
Change-Id: I86a3c063e5b69dcaef780d57a9bb2445d32a7904
2021-08-26 08:37:10 +02:00
Alexander Vorwerk 821351d04f Make sure params is an array
This was removed in I44ee0014ac50c9c5dc66543dcd045dd5a81ce37c.

This basically partly reapplies I844db115f2563cb9ee1629c30d5f49d1ce58f5bd.

Bug: T289730
Change-Id: I14435b9f84b9a24445befbb8dc7fefce44bba078
2021-08-25 19:54:12 +00:00
Thiemo Kreuz a0e613d8fc Remove not needed boilerplate from QUnit tests
These tests obviously don't need this extra environment.
They run just fine (and faster) without.

Bug: T289560
Change-Id: Ib186a07cd556f741e0440ffa54ae6aaaf626adcd
2021-08-25 12:01:14 +00:00
libraryupgrader 3c0cf07510 build: Updating npm dependencies
* path-parse: 1.0.6 → 1.0.7
  * https://npmjs.com/advisories/1773 (CVE-2021-23343)
* jszip: 3.5.0 → 3.7.1
  * https://npmjs.com/advisories/1774 (CVE-2021-23413)

Change-Id: I38344cc565811c948d9d30aa82ba248427d2aa9f
2021-08-25 11:20:46 +00:00
jenkins-bot 0184aa7b14 Merge "Add a first trivial PHPUnit test" 2021-08-25 09:43:00 +00:00
jenkins-bot 0829e55b05 Merge "ApiVisualEditorEdit: data-{plugin} is not multi" 2021-08-25 09:19:17 +00:00
WMDE-Fisch 67988452ab Add message on multipart content
Bug: T276574
Change-Id: Iff5c2fd4071dd03ca62c395cce4041dacb1c7ea6
2021-08-25 10:47:16 +02:00
Kosta Harlan f9ce087e67 ApiVisualEditorEdit: data-{plugin} is not multi
Specifying it as such creates a 0 based index for what is a single value
property. This wasn't noticed before because I6b81ea318f52e accessed the
request object directly instead of using $params. See also
I3baa1ebb66559 for how this bug manifested in GrowthExperiments.

Bug: T289652
Change-Id: Ife8350d1cea79fc1dd6f3cb040a7801b9fe6db91
2021-08-25 10:47:13 +02:00
Thiemo Kreuz 9392282bf2 More test cases for MWTransclusionOutlineContainerWidget
This also fixes a mistake in the class where we forgot to
disconnect event handlers when an element is removed from
the list. This doesn't have much of a consequence, as the
event flow is only in one direction, from the destroyed
element up. This is not possible any more.

Bug: T289560
Change-Id: I0bcc1d68c50b8cbdb033ef6692b34e2fc94e8d85
2021-08-24 15:46:46 +00:00
Thiemo Kreuz e56b4e82f5 Add test for ve.ui.MWParameterCheckboxInputWidget
This is not a file we created recently, but one we care about.
This is also a nice start to get in the mood to write tests.

Bug: T289560
Change-Id: I6475b00508cfa9188ab0d78c2bfd31bab8aed6ed
2021-08-24 15:44:43 +00:00
Thiemo Kreuz 352e7795ca More meaningful assertions for all outline part widgets
Bug: T289560
Change-Id: I81f882d6e6793198371ff9ff3e1e5bbbec98e0d9
2021-08-24 13:17:16 +02:00
Thiemo Kreuz f6953d4096 Add basic QUnit tests for all transclusion outline classes
This is just the smallest possible boilerplate to get the first
trivial test running. More test cases will be added in the
following patches.

Bug: T289560
Change-Id: I3a4e49a7b9761db00b211e933386bad71d4f0942
2021-08-24 11:31:14 +02:00
Thiemo Kreuz 3bca0f30c9 Minor cleanups to new add parameter input widget
Most of what I did in patchset 1 is now squashed into the
original patch Ic5dcd36.

Bug: T272487
Change-Id: I5cfd500da4c496a31ec5a28fedee4a079acc6123
2021-08-24 10:22:55 +02:00
Svantje Lilienthal 5c9fbca085 Added new input page for undocumented parameters
Bug: T272487
Change-Id: Ic5dcd36c9f647f9b52b98e5a520a1df1960a5b48
2021-08-24 10:18:43 +02:00
jenkins-bot 46bccb570a Merge "Replace Content::preloadTransform call to ContentTransformer::preloadTransform" 2021-08-23 16:09:16 +00:00
jenkins-bot e803c20007 Merge "Rename …ParameterCheckboxLayout now that it's an actual Widget" 2021-08-23 14:46:09 +00:00
jenkins-bot f1c9012916 Merge "Remove dependency from new sidebar to the BookletLayout" 2021-08-23 14:40:02 +00:00
jenkins-bot 6cdd1f6ebf Merge "Clean up toggleSidebar by splitting out 'auto'" 2021-08-23 14:31:39 +00:00
Thiemo Kreuz 3b5bc1b0b2 Fix non-existing property name .isNewSidebar
This is obviously a rebase mistake. We renamed the property in
I78a5129.

Change-Id: I43247ebf6c8910d12c90aa2dd1f9111f4ed69a07
2021-08-23 15:44:28 +02:00
Adam Wight b1a376a6e1 Clean up toggleSidebar by splitting out 'auto'
This naturally fits into a new function.

Bug: T274554
Change-Id: Icda432dc1a13243efddc9949f41a00162053970d
2021-08-23 14:38:24 +02:00
Translation updater bot d37304abce Localisation updates from https://translatewiki.net.
Change-Id: I7c59aa591a706da2e4bd3f56fba066edde31c2fa
2021-08-23 09:04:36 +02:00
Thiemo Kreuz d78af2c0e9 Add a first trivial PHPUnit test
This is more a proof of concept. The PHP code in this codebase
is rather small, but not trivial, and worth being covered by
tests.

Change-Id: I20c713c3c3be5d289947a343cd4fbf5256234a4a
2021-08-20 15:20:35 +00:00
WMDE-Fisch fc8ce9d7e3 Fix typos in doc
Change-Id: I5895207ca2d9de91bb92e6ab3566fbf2880bf393
2021-08-20 14:56:32 +02:00
jenkins-bot d6316145b5 Merge "Better method names in MWTransclusionModel class" 2021-08-20 11:29:49 +00:00
jenkins-bot 112bd2e5cb Merge "Call focusPart() only once in MWTemplateDialog.onReplacePart()" 2021-08-20 09:56:52 +00:00
jenkins-bot cdf7d907a9 Merge "Fix null error in ve.ui.MWTemplateDialog" 2021-08-20 09:48:27 +00:00
jenkins-bot 928b33ce69 Merge "Re-add adding undocumented paramters in some cases" 2021-08-20 09:33:18 +00:00
Thiemo Kreuz 8fbdd4258f Fix null error in ve.ui.MWTemplateDialog
Introduced via Ifd52369 just a few minutes ago.

Bug: T288827
Change-Id: I859f606c0608f9725bb64ff56a501a7a2c85c1df
2021-08-20 09:24:56 +00:00
jenkins-bot 6f052b928d Merge "Use page ID string instead of object reference" 2021-08-20 08:37:48 +00:00