Commit graph

17604 commits

Author SHA1 Message Date
jenkins-bot 5028f4eaf3 Merge "Remove unused "insert" action from MWTemplateDialog" 2021-07-01 11:52:21 +00:00
jenkins-bot 50f293019c Merge "Rewrite MWTransclusionNode.isSingleTemplate for readability" 2021-07-01 11:21:44 +00:00
jenkins-bot 3709dfbee2 Merge "Update documentation for all getWikitext()/serialize() methods" 2021-07-01 11:18:08 +00:00
Thiemo Kreuz db531ddba5 Add missing search result limitation to template search
Bug: T274903
Change-Id: If57d28f7796d69825a25fa9b67bcd5c127c9e3b7
2021-07-01 09:33:52 +02:00
Translation updater bot 610c7e08cb Localisation updates from https://translatewiki.net.
Change-Id: I99c71f8023c46dca2dc3856e52622f2eb7d1c60a
2021-07-01 08:09:59 +02:00
jenkins-bot f9cb2e3519 Merge "Don't create a checkbox for ve.ui.MWParameterPlaceholderPage" 2021-06-30 14:31:59 +00:00
jenkins-bot 0e3bf54e3f Merge "Add documentation to ve.ui.MWTemplateOutlineTemplateWidget" 2021-06-30 14:31:57 +00:00
jenkins-bot 217793ebd1 Merge "Use the parameter's label in the sidebar" 2021-06-30 14:31:55 +00:00
jenkins-bot 127ea9ea27 Merge "Avoid the term "canonical order" in template related docs" 2021-06-30 11:35:27 +00:00
jenkins-bot 5943b5a25e Merge "Fix spec.fillFromTemplate() not skipping aliases any more" 2021-06-30 11:11:24 +00:00
jenkins-bot 6aaec0c88b Merge "Rename temporary "x" variable in spec class tests" 2021-06-30 11:09:54 +00:00
jenkins-bot 8ca3fa3c99 Merge "Fix broken template serialization test setup" 2021-06-30 11:06:24 +00:00
Thiemo Kreuz 84329a40c8 Rename temporary "x" variable in spec class tests
I forgot to give this variable a proper name. The "x" was not
meant to stay.

Bug: T285483
Change-Id: I482b9282676082f44d5f98a574e5ada05dfb6318
2021-06-30 12:16:50 +02:00
Thiemo Kreuz 466e428a81 Fix spec.fillFromTemplate() not skipping aliases any more
In I04b8a14fbec7be5a1c4defabf92e94f694c1e638 we sepearted params from
aliases. There we missed that re-filling the parameters from the 
template could re-add the aliases.

Bug: T285483
Bug: T285843
Change-Id: I1928b443a5f708bc8c57efa5ad0a86b5915b159c
2021-06-30 10:14:43 +00:00
Thiemo Kreuz bc4aeed86e Avoid the term "canonical order" in template related docs
While the term "canonical" is not wrong, I find it still
somewhat ambiguous.

1. "Canonical" could mean different things. E.g. is the order
of parameters as they appear in the article's wikitext the
"canonical" one? It's possible to argue like this, esp. if a
template doesn't have TemplateData documentation. In this case
the only order known is the one from the wikitext.

2. "Canonical" sounds like the parameters must be reordered.
But this should never happen. Not having dirty diffs is more
important than having the parameters in a specific order.

Bug: T285483
Change-Id: I23658d37fea50b727667677ac6a49066673b2135
2021-06-30 09:38:28 +02:00
Translation updater bot a25a843e96 Localisation updates from https://translatewiki.net.
Change-Id: I99682459dc734480a5eaeb06243505765d8e0e37
2021-06-30 08:26:28 +02:00
jenkins-bot f442bbfd55 Merge "Remove unused MWTransclusionModel.specCache property" 2021-06-29 21:47:14 +00:00
Andrew Kostka 0c141e2581 Add documentation to ve.ui.MWTemplateOutlineTemplateWidget
Change-Id: Ibc0b39fd417fa7eef5cf1cd52b9769c6514ce85d
2021-06-29 21:50:41 +02:00
Andrew Kostka 30917c8ba3 Don't create a checkbox for ve.ui.MWParameterPlaceholderPage
Change-Id: Ia02e86e026e618a4ace31306fe50f003c49080ae
2021-06-29 21:21:19 +02:00
Andrew Kostka 526a49672e Use the parameter's label in the sidebar
Change-Id: Ic2c00f51088d67453bb50ff0fa15f22c9fbd8e56
2021-06-29 20:44:17 +02:00
jenkins-bot 6f5ed6e797 Merge "Remove the fallback for create rights" 2021-06-29 17:18:29 +00:00
Bartosz Dziewoński 32b1961e74 Update VE core submodule to master (144837b20)
New changes:
7777aa0c5 Localisation updates from https://translatewiki.net.
3b32dd4e1 Localisation updates from https://translatewiki.net.
144837b20 ve.init.Target: Handle overlays in toolbar keyboard handling code

Change-Id: I61c75ac6db1a68128b1935059bb8159d8e4c5a56
2021-06-29 18:32:42 +02:00
Roman Stolar 304f3a30c6 Remove the fallback for create rights
It's covered in PM edit rights check throught getPermissionErrors method.

Bug: T272079
Change-Id: Idcf9ced5a638b173389c65d11b9d687f7fa3938e
2021-06-29 19:31:07 +03:00
Thiemo Kreuz 8dca99d38c Fix broken template serialization test setup
This was not really testing anything before. Introduced in
I76c6fe8.

Bug: T285382
Change-Id: I5f8343c9805b9a1adc2efdd13a103a7f1196e15b
2021-06-29 16:29:11 +02:00
jenkins-bot 7426139a41 Merge "Fix possibly uninitialized variable in template dialog" 2021-06-29 13:47:06 +00:00
jenkins-bot 802be178e3 Merge "Extract MWTemplateTitleInputWidget.addExactMatch into a method" 2021-06-29 13:47:03 +00:00
jenkins-bot 17cc6831bc Merge "Revert "Extract "show all" to placeholder class"" 2021-06-29 09:55:53 +00:00
jenkins-bot 82821f6889 Merge "Rename ambiguous "lang" to languageCode in spec class" 2021-06-29 09:46:51 +00:00
jenkins-bot 297cb53e33 Merge "Remove spec documentation that literally repeats the code" 2021-06-29 09:46:49 +00:00
jenkins-bot d588a736c2 Merge "Fix all spec methods to not crash on unknown parameters" 2021-06-29 09:41:07 +00:00
jenkins-bot c84dd3d44f Merge "Use separate data structure to store aliases in spec" 2021-06-29 09:41:05 +00:00
jenkins-bot 73fe8f7a38 Merge "Add icons to the show/hide button in the ExpandableContentElement" 2021-06-29 08:55:46 +00:00
jenkins-bot b3d23f59b3 Merge "Fix the show/hide button for the ExpandableContentElement on mobile" 2021-06-29 08:49:41 +00:00
Andrew Kostka 2c0f44df83 Add icons to the show/hide button in the ExpandableContentElement
Bug: T282996
Change-Id: I2013c00696af2320d871e12c6d523f0da1dcb277
2021-06-29 08:33:22 +00:00
Thiemo Kreuz 121bf88f48 Remove unused MWTransclusionModel.specCache property
This property is a reference to a static variable with the
same name, initialized at the very top of the file. All
instances of the class use the same cache. They all use the
shared specCache directly, not the reference.

Depends-On: I0084410b7eab29048451ad67c18d6c2180c4f1b1
Change-Id: I9fd79ce3abd533dbb48a210e596802ea9e692855
2021-06-29 08:20:21 +02:00
Translation updater bot 080de68972 Localisation updates from https://translatewiki.net.
Change-Id: If7d122051b2bcd459499863f9be1964dc51ac3aa
2021-06-29 08:14:01 +02:00
jenkins-bot 9fcba8bac8 Merge "Minor documentation updates in template related classes" 2021-06-28 14:46:11 +00:00
Andrew Kostka e5cbe69187 Fix the show/hide button for the ExpandableContentElement on mobile
Bug: T283943
Change-Id: I23ae2350dfb9100ed6604fc93628c616c41ab2e1
2021-06-28 15:18:38 +02:00
Thiemo Kreuz (WMDE) e6d3828429 Revert "Extract "show all" to placeholder class"
This reverts commit 950a5300dc.

Reason for revert: This broke several workflows. The reason is
that MWParameterPlaceholderPage & MWParameterSearchWidget both
hold references to the MWTemplateModel. This model is not
always the same. The dialog might be the same when a template
is edited multiple times. But the model might be a new one.
From this point on the MWParameterSearchWidget pulls data from
an outdated model.

Bug: T284636
Bug: T285571
Change-Id: I7b9ea8cab8f17705ec8020f07e3732da6ba0e73c
2021-06-28 14:04:12 +02:00
jenkins-bot 8da60b7864 Merge "Hotfix for broken "Extract show all to placeholder class"" 2021-06-28 11:24:50 +00:00
jenkins-bot 9371e993b0 Merge "Simplify spec code dealing with default values" 2021-06-28 10:58:39 +00:00
jenkins-bot a6a314b580 Merge "Fix getDescription/Sets possibly returning undefined" 2021-06-28 10:55:36 +00:00
jenkins-bot 73c79d74c0 Merge "Better name for spec.isParameterKnown() method" 2021-06-28 10:36:25 +00:00
jenkins-bot 426ca299a0 Merge "Better name for spec.getParameterName() method" 2021-06-28 09:15:07 +00:00
jenkins-bot b661992efe Merge "Add new QUnit test for ve.dm.MWTemplateSpecModel" 2021-06-28 09:11:48 +00:00
Translation updater bot 6204a97ba5 Localisation updates from https://translatewiki.net.
Change-Id: I05a6799b182da122e0cdad318d059afae27e3725
2021-06-28 09:23:44 +02:00
Thiemo Kreuz 6b346442ad Hotfix for broken "Extract show all to placeholder class"
This does not revert commit 950a5300 but applies the most
minimal hotfix I could come up with.

The reason for the breakage is that MWParameterPlaceholderPage
& MWParameterSearchWidget both hold references to the
MWTemplateModel. This model is not always the same. The dialog
might be the same when a template is edited multiple times.
But the model might be a new one. From this point on the
MWParameterSearchWidget pulls data from an outdated model.

This extra check compares this model reference and creates a
new widget when it changed.

Bug: T284636
Bug: T285571
Change-Id: Ib3eca52bbff90ffbf56a257e3984adcbe02b310b
2021-06-27 18:29:23 +02:00
Thiemo Kreuz b3bede3ba0 Extract MWTemplateTitleInputWidget.addExactMatch into a method
Same as in TemplateWizard, see I128bc00.

Bug: T274903
Change-Id: I8693b85625a8640e44c213300d7c6862430bec47
2021-06-25 17:07:32 +02:00
Thiemo Kreuz 4b62bc5bf1 Rewrite MWTransclusionNode.isSingleTemplate for readability
* Introduce variable names that explain better what's going on.
* Add comments.

Bug: T284895
Change-Id: Id5e8be9e52342ce049bdceec71f0f7cd01a6e2e9
2021-06-25 16:51:53 +02:00
Thiemo Kreuz 2966b69609 Fix possibly uninitialized variable in template dialog
There is a codepath where `modelPromise` is undefined and
calling `modelPromise.then()` fails. This codepath implies
that the dialog is empty and there is nothing to update. We
can just close the dialog then.

I found this while debugging the actions in this dialog.
This happens when the dialog is empty (except for a
placeholder) but you submit it anyway. This is typically
not possible as the button is supposed to be disabled.
Still I think it's a good idea to make this code less
fragile.

The relevant code was introduced in Ibc2fc66 (2016).

Change-Id: Ia6b723548456c211b944a2320949bfc23b0afa16
2021-06-25 16:49:30 +02:00