Commit graph

1648 commits

Author SHA1 Message Date
Thiemo Kreuz 563a44ca72 Change param duplicate numbering to start with 2
… instead of 0. Conditionally add a dash in front as well to
avoid confusing results like '1' + sequence number = '12'.

Change-Id: I345704b00ba3812c4905f85e35cf21a6dfd05437
2021-01-08 14:50:04 +00:00
Thiemo Kreuz 954211d8ba Fix handling of duplicate parameter names
I looks like the Model.params data structure is build in a way
that it allows mismatching parameter "keys" and "names". E.g.

{
    "a": { "name": "a" },
    "a0": { "name": "a" },
}

There are comments in the code that suggest this is
intentional.

I found code that confused these two values and tries to use
the name as a key, for example. This fails, messes up the
paramOrder, and such.

This should not have much, if any effect for users because
users are blocked from doing this anyway, e.g. buttons get
disabled.

Change-Id: I2067024ad8d5b8e985a4f162cf6875f523777a6c
2021-01-08 15:48:55 +01:00
Translation updater bot aaf660f38c Localisation updates from https://translatewiki.net.
Change-Id: Ic7d58568699329a69e787fe17d0dd313fe175b0c
2021-01-06 08:29:20 +01:00
Translation updater bot fce41ca1b0 Localisation updates from https://translatewiki.net.
Change-Id: Ic6f2e55664d902438e6b93e4266bed779f871416
2021-01-04 08:44:53 +01:00
Translation updater bot baad48a17d Localisation updates from https://translatewiki.net.
Change-Id: I58b997ad23ff7c6f864839ced35e507118c2518f
2020-12-30 10:15:07 +01:00
Translation updater bot 00abdd1d6f Localisation updates from https://translatewiki.net.
Change-Id: Ief15a37d5c6f52feb28e81d99ac6ddccc5b1b3ab
2020-12-29 09:48:51 +01:00
Translation updater bot 11f9c006c3 Localisation updates from https://translatewiki.net.
Change-Id: Idb23f4ec35de93a187375d671c11c273c6ebfe39
2020-12-28 10:40:06 +01:00
Translation updater bot cab188ac88 Localisation updates from https://translatewiki.net.
Change-Id: I7f523213eb0b48a45ee979011cb0519f5775530d
2020-12-22 08:32:50 +01:00
Translation updater bot 79b3056f9b Localisation updates from https://translatewiki.net.
Change-Id: I619577f319ddc6bd63e579eb71f17b8222b611ae
2020-12-21 08:40:12 +01:00
libraryupgrader b2d0c24181 build: Updating mediawiki/mediawiki-phan-config to 0.10.6
Change-Id: Id72c71681c613f27880919199280fa0f544a792a
2020-12-20 03:29:33 +00:00
jenkins-bot 39d95be801 Merge "Replace deprecated Language::getFallbacksIncludingSiteLanguage" 2020-12-17 10:50:08 +00:00
WMDE-Fisch b8b1df894f Add tracking for template data presence
This will give results whenever template data is requested e.g. by
VisualEditor or the TemplateWizard.

Bug: T259705
Change-Id: I2a9e864b94b6f8f49ca3adaa46502627ab6b3322
2020-12-16 12:50:44 +01:00
WMDE-Fisch 49bc2e8735 Replace deprecated Language::getFallbacksIncludingSiteLanguage
Change-Id: I24a95ce973169ab3f76abe39ca9780c3bf4ec5a4
2020-12-16 12:07:34 +01:00
WMDE-Fisch 028aaba896 Replace deprecated getNativeData
Change-Id: Icbee3fd7245e81b7c3c49e2aab6607c0a8e61217
2020-12-16 10:36:56 +00:00
WMDE-Fisch ae0dd0e094 Get WikiPageFactory and LanguageNameUtils from services
The bump to 1.36 was overdue because the PageProps are used from
services already.

Change-Id: Ic4b42f58290e15123b281d48be396e8b7e8eeab0
2020-12-15 14:15:47 +01:00
Translation updater bot 4bb17c89f0 Localisation updates from https://translatewiki.net.
Change-Id: Ie010a35fc7d36744316433236c21a85760b8a9ec
2020-12-15 08:37:07 +01:00
Translation updater bot e22cc2262b Localisation updates from https://translatewiki.net.
Change-Id: If89775ed3c5ba4a4471b10b080941c15b91e1769
2020-12-14 08:43:31 +01:00
Umherirrender 88f31acbd7 build: Remove unneeded phan suppression
Possibly not needed after core change
I40a305b5e49d67b3f6d7737c0846b93a80b78fa9

Change-Id: Ided42bd763718f0393a874bbadb0b682b4bb9043
2020-12-13 00:20:53 +00:00
jenkins-bot 6bef0521b9 Merge "Replace HTML with Markdown in Specification.md" 2020-12-11 20:22:34 +00:00
libraryupgrader 4d7ffb97a6 build: Updating dependencies
composer:
* mediawiki/mediawiki-phan-config: 0.10.4 → 0.10.5

npm:
* ini: 1.3.5 → 1.3.7
  * https://npmjs.com/advisories/1589

Change-Id: I5f54f5b504df70819338ca17bf2b67af6851f798
2020-12-11 13:35:56 +00:00
Thiemo Kreuz 09f4c90e48 Replace HTML with Markdown in Specification.md
I suggest this change because this file is not rendered
correctly at
https://gerrit.wikimedia.org/r/plugins/gitiles/mediawiki/extensions/TemplateData/+/refs/heads/master/Specification.md

Change-Id: Iacaba86cfda4ca5d4c68e22fd0368e58693be3aa
2020-12-11 10:29:49 +01:00
Translation updater bot 7ba84047f8 Localisation updates from https://translatewiki.net.
Change-Id: Ic944555f17f6f3b3b6c00df495b64f8581defae4
2020-12-11 08:36:45 +01:00
Translation updater bot b9a3955937 Localisation updates from https://translatewiki.net.
Change-Id: I8793ae6cfa9ba235e0ec4384eeb2eda9d4f74206
2020-12-10 08:35:45 +01:00
jenkins-bot fe3ee9ab6b Merge "Track parameter property changes" 2020-12-09 10:41:03 +00:00
jenkins-bot 248d4dfd9e Merge "Drop unnecessary top-level closures" 2020-12-07 15:34:32 +00:00
Thiemo Kreuz d08a6448e9 Track when (relevant) changes are made to <templatedata> tags
Bug: T267926
Change-Id: I55f72500b7bad7e648238560b516e870bc9130c8
2020-12-07 15:34:13 +01:00
Adam Wight 93b7bc0756 Drop unnecessary top-level closures
Change-Id: Ie8fbde864cd08f0657e4239f525ef9dd087aee41
2020-12-07 15:24:31 +01:00
Adam Wight 80021704d4 Track parameter property changes
This is temporary interaction tracking to better understand how the
dialog is used.

Bug: T260343
Change-Id: I14afa89e18676818f88c142059128a9f62dcadcb
2020-12-07 14:39:05 +01:00
jenkins-bot e6846281be Merge "Rename "property" variable for clarity" 2020-12-07 11:24:34 +00:00
jenkins-bot fed4b5f415 Merge "Assign reused dependentField value to a variable" 2020-12-07 11:24:32 +00:00
jenkins-bot ea80588a2a Merge "Assign reused propertyInput value to a variable" 2020-12-07 11:24:31 +00:00
jenkins-bot ae40b92523 Merge "Send metrics for template property interactions" 2020-12-07 11:24:28 +00:00
jenkins-bot ef57986ce6 Merge "Send metrics when applying changes" 2020-12-07 11:15:47 +00:00
jenkins-bot 4465cf14cd Merge "Send metrics when opening the dialog" 2020-12-07 11:14:08 +00:00
jenkins-bot 8c82e21699 Merge "Higher-level distinction when creating new TemplateData" 2020-12-07 11:04:36 +00:00
libraryupgrader 791af40917 build: Updating mediawiki/mediawiki-codesniffer to 34.0.0
Change-Id: I20e3fd65fc43a475c3040cc468101051b27fcf8b
2020-12-07 03:11:02 +00:00
Adam Wight eb6b61b3a7 Rename "property" variable for clarity
"props" sounds plural, but it is the name of a single property.

Change-Id: I62184d00d03e297568e1c335f31c961aa6983406
2020-12-04 18:44:48 +00:00
Adam Wight 5206188129 Assign reused dependentField value to a variable
Change-Id: Ie77fd61d5bb7d886ab069472d0294daf4039d4e2
2020-12-04 18:44:40 +00:00
Adam Wight 8e65e4d8fb Assign reused propertyInput value to a variable
Change-Id: Ic8ea8ae283112801266303eb1d2520931e47a418
2020-12-04 18:44:32 +00:00
Adam Wight 415286e377 Send metrics for template property interactions
Bug: T260343
Change-Id: I050eb4b87ccb9c8910847b929b86c3b3cb269b8a
2020-12-04 18:44:01 +00:00
Adam Wight 1d108b5104 Send metrics when applying changes
Bug: T260343
Change-Id: I6fea4195107baf301dd8f66967c86e9c7a762bd1
2020-12-04 18:43:30 +00:00
Adam Wight d8e418671d Send metrics when opening the dialog
Distinguish between create and edit.

Bug: T260343
Change-Id: I5cd29dff0c4db7e024395a9090c465a01527f079
2020-12-04 18:43:23 +00:00
Adam Wight a9a4485b22 Higher-level distinction when creating new TemplateData
This is needed for metrics collection.

The patch shifts responsibility for filling out an empty record when
there is no existing TemplateData, or it's corrupt.

We could clean up further by making logic robust to missing `params`
in the original templatedata, so that an empty structure is simply
`{}`.

Bug: T260343
Change-Id: I6ddc2660257890290cd40c54f9c8507ab5206d6c
2020-12-04 18:43:09 +00:00
Adam Wight b7fee749ab Migrate to package files: ext.templateDataGenerator.editTemplatePage
Change-Id: Ie03284701c1870b06116b7ce6a8ca1759c28d03b
2020-12-04 19:41:50 +01:00
Adam Wight bda6215309 Migrate to package files: ext.templateDataGenerator.data
Bug: T260343
Change-Id: Ifd171b40de704bff8c063da46b711a384238a0f5
2020-12-04 19:41:30 +01:00
jenkins-bot d2e46c5d27 Merge "Migrate to package files: ext.templateDataGenerator.editPage" 2020-12-04 17:41:48 +00:00
jenkins-bot 0ad3562e4b Merge "Migrate from jsduck to jsdoc" 2020-12-04 17:09:34 +00:00
Adam Wight 479a5a4f12 Migrate to package files: ext.templateDataGenerator.editPage
This is trivial, only I'm splitting into its own patch to bisect a
test failure.

Bug: T260343
Change-Id: Ia6d581a0278b21cbfdcfdad0d6193fb965f35814
2020-12-04 17:00:37 +00:00
Adam Wight 1ff3ddc105 Lint with "commonsjs" rules
This will allow us to migrate to ResourceLoader "package files"
modules.

Bug: T260343
Change-Id: Id4c0a018ea6f3d9a54d468fc3e6c35bfdf5ce1dd
2020-12-04 16:39:00 +00:00
Translation updater bot 44d2957dfa Localisation updates from https://translatewiki.net.
Change-Id: I715274ef1716c702fb266a8ff25936793a4f78d0
2020-12-04 08:34:09 +01:00