Commit graph

2242 commits

Author SHA1 Message Date
Translation updater bot a9720ff610 Localisation updates from https://translatewiki.net.
Change-Id: I49d4a7b5f0efa410cf3e09d9bb915a181eb21b82
2023-01-18 08:30:38 +01:00
EpicPupper 1e0cecd494 Improve API examples
Bug: T271040
Change-Id: I5b9bbc932d887086d647ce89fb77d192a896d32d
2023-01-17 01:08:27 +00:00
Translation updater bot 8da02d58ce Localisation updates from https://translatewiki.net.
Change-Id: If35f31d9c6cd31e1268ee47f3fca62597acc02c1
2023-01-11 09:02:45 +01:00
Thiemo Kreuz ec72e43858 Move var declarations (and initializations) down in Dialog class
Note the code style in this file is already a mixture of some early
declarations and others that happen in place. We mostly prefer the
later nowadays because it makes the code much more readable. Some of
the code touched in this patch was really a little confusing, I would
argue.

Change-Id: Ib2777c6f6c86876c016e50d7bd2fe3d82c611914
2023-01-10 20:27:23 +00:00
jenkins-bot d1b7f188ad Merge "Reduce code duplication when switching dialog panels" 2023-01-10 01:41:11 +00:00
jenkins-bot 5bd60cee9e Merge "Fix broken maps panel in TemplateData editor" 2023-01-10 01:39:18 +00:00
Translation updater bot 5969457cda Localisation updates from https://translatewiki.net.
Change-Id: I920a42dff01c80a6a11ebaf3d9e805e87121a4b6
2023-01-09 09:29:24 +01:00
thiemowmde 73ec256285 Fix broken maps panel in TemplateData editor
A change in OOUI made .addItems() silently ignore non-array input.
The most robust fix is to make all callers follow the documentation
instead of relying on undocumented behavior.

The change to onMapItemRemove is not strictly needed but done to make
this piece of code much more robust.

Change-Id: I95f9a058766720d3809c3e56309326c2a91f2bcd
2023-01-05 16:47:00 +01:00
thiemowmde 8f6493a198 Reduce code duplication when switching dialog panels
Main change is that we don't map between strings and object
references any more but use the object references directly.

Change-Id: Iecc011f62089d902bb5cbd9ff3b4189d3258a2b4
2023-01-05 15:27:13 +01:00
Translation updater bot 5567d3c9d7 Localisation updates from https://translatewiki.net.
Change-Id: I77abf04867f26ed85380fb89ffb1b7a46ebb997e
2023-01-05 09:11:10 +01:00
jenkins-bot 9bca2b9d36 Merge "Set focus to first input field on all panels" 2023-01-04 19:17:52 +00:00
jenkins-bot 3e66ede265 Merge "Use type info instead of repeating individual field names" 2023-01-04 19:05:32 +00:00
Translation updater bot a7860516b8 Localisation updates from https://translatewiki.net.
Change-Id: Iea006af6de78ad14b62523f6dd4568f1a5a4bb5c
2023-01-04 08:29:54 +01:00
Translation updater bot db97ea522d Localisation updates from https://translatewiki.net.
Change-Id: I0559506367f17171dc3e4964f662c54c1755e80c
2023-01-03 08:21:37 +01:00
Translation updater bot 0d3114ac25 Localisation updates from https://translatewiki.net.
Change-Id: I872ae642c661048cc01c353c4defee0e6f2f0e39
2023-01-02 08:44:29 +01:00
Thiemo Kreuz 7d0f0da623 Use type info instead of repeating individual field names
The data structure at the top of Model.js uses types like "string",
"array" and so on. Fields that share a type behave identical. I find
it odd to repeat parts of this data structure in the code. That's
what the types are for.

Change-Id: Iae55c18ececb809a56e40d3179d2cde357309d0a
2022-12-31 10:45:48 +01:00
Translation updater bot 260fdf76df Localisation updates from https://translatewiki.net.
Change-Id: Id95df1299ffc63919eb624ae314d57124ff01e78
2022-12-29 10:02:39 +01:00
jenkins-bot dda14a168c Merge "Fix copy paste mistakes and outdated code documentation" 2022-12-29 01:12:27 +00:00
jenkins-bot 080eacfe08 Merge "Extract named isValidCustomFormatString() method" 2022-12-29 01:06:39 +00:00
jenkins-bot d24fc8ee2f Merge "Streamline code duplication in nested if in Dialog.js" 2022-12-29 01:01:27 +00:00
jenkins-bot 088b0c8600 Merge "Rename message not specific to suggestedvalues" 2022-12-29 01:00:27 +00:00
jenkins-bot b0cb613a58 Merge "Create dialog elements from "type", not from element name" 2022-12-29 00:57:03 +00:00
Translation updater bot 1d86dd01c4 Localisation updates from https://translatewiki.net.
Change-Id: I9f2e6e0086dc4314dc7477bbde4a4c8edaa97b5d
2022-12-26 09:11:18 +01:00
thiemowmde 981054937d Streamline code duplication in nested if in Dialog.js
… by turning the nested `if` around and simplifying the remaining
parts a little. This patch is intentionally minimized. More
meaningful changes will be done in the next patch.

Change-Id: I56cfa5c8ac8ca29acd42bd71786f5433e884e1b2
2022-12-23 12:06:36 +01:00
Translation updater bot 28c1471f10 Localisation updates from https://translatewiki.net.
Change-Id: Ic2e51ff97bd84c5c0c091153406cb69fb2c72ad7
2022-12-22 11:04:48 +01:00
Translation updater bot f6b6a4228d Localisation updates from https://translatewiki.net.
Change-Id: I3d3f85804287152158b31726ba911822881e9511
2022-12-21 09:18:09 +01:00
Translation updater bot b0b9863752 Localisation updates from https://translatewiki.net.
Change-Id: Ieb5d7b42543243e87f6ba982ae1954c3f95ea2c0
2022-12-19 09:04:52 +01:00
thiemowmde e222666e1f Rename message not specific to suggestedvalues
This fixes a FIXME in the code.

Change-Id: I3302352d000d865f074ddafe479d3f1afa62e93d
2022-12-19 07:39:17 +00:00
jenkins-bot 310bf46cf9 Merge "Simplify some overly complex comparisons with undefined" 2022-12-16 22:51:30 +00:00
thiemowmde b4c960287a Unhoist a bunch of variables in Dialog.js
Previously, our eslint configuration required all variables
to be declared together at the top of the scope, but that
was changed, and declaring the variables where they are needed
is clearer.

Change-Id: I87e74ceadd5374a6ba6b7a4f8f49dca03a5c4bca
2022-12-16 09:31:46 +01:00
thiemowmde ca5a2f26ea Create dialog elements from "type", not from element name
The data structure in Model.js, starting at line #125, does have a
"type" property that's supposed to do this. What kind of input element
we need depends on the type. Repeating individual element names here
means we are duplicating parts of the data structure.

The mapping is unambiguous, i.e. the new code is guaranteed to do the
same as before.

This is a tiny cleanup patch in preparation for later changes.

Change-Id: I162dcd6f9a31f5ab2c6eb7027befd4736de40ca5
2022-12-16 09:29:20 +01:00
jenkins-bot 09677910fe Merge "Inline some trivial single-use variables" 2022-12-16 03:05:52 +00:00
jenkins-bot fa5e7f6b7d Merge "Renaming misleading "type" variable" 2022-12-16 00:40:55 +00:00
Thiemo Kreuz 505a835c49 Extract named isValidCustomFormatString() method
Bug: T301337
Change-Id: I02e81c264e7ebeb60483d7eacf9fa7b27ad1e545
2022-12-15 12:15:35 +00:00
Translation updater bot b32440e201 Localisation updates from https://translatewiki.net.
Change-Id: I01b46a6618c02ecfd6cfcde2b024b96072a503e9
2022-12-15 11:36:58 +01:00
jenkins-bot e1b5970d3f Merge "Split parameter validation off as separate methods" 2022-12-13 21:09:37 +00:00
Translation updater bot 105cd084bd Localisation updates from https://translatewiki.net.
Change-Id: Id2ba35da287320bcf4b8f02f04bba77533343732
2022-12-12 08:23:04 +01:00
Translation updater bot dae60f3f5d Localisation updates from https://translatewiki.net.
Change-Id: Ib74628b732ceea82836d686a485c852394b3a261
2022-12-08 08:30:06 +01:00
thiemowmde b53d754639 Renaming misleading "type" variable
"children" is an array. See line #148 in Model.js. What's called "type"
here is just the numeric index in this array.

Change-Id: I73c190f754d113ac90f5df76fb8cc8b7a75fc927
2022-12-07 15:30:18 +01:00
libraryupgrader fca0a973a2 build: Updating qs to 6.11.0
* https://github.com/advisories/GHSA-hrpp-h998-j3pp

Change-Id: I0934ddbfe8da4c49086b1374f6b7f6dd3094ebb2
2022-12-07 03:46:29 +00:00
Translation updater bot 5447a0be4a Localisation updates from https://translatewiki.net.
Change-Id: Id12e7c05b040847aa944ebd7c6ed50e320eaaecc
2022-12-05 08:34:30 +01:00
Translation updater bot 1023c3b6d7 Localisation updates from https://translatewiki.net.
Change-Id: Icac1790074d953f708f4bf10bb9277b02ae859b4
2022-12-01 08:16:51 +01:00
Translation updater bot 0f08ad71ef Localisation updates from https://translatewiki.net.
Change-Id: Ia33f7b6b76f27a30847e1491fb28e5bcf898cc50
2022-11-30 08:53:30 +01:00
Translation updater bot 3045f0d20f Localisation updates from https://translatewiki.net.
Change-Id: I833544e05f728c44fe1309260b8c9b6b91e99f9b
2022-11-29 08:59:22 +01:00
Translation updater bot 73a5daaec2 Localisation updates from https://translatewiki.net.
Change-Id: I6657f6fdc873ececb04e1208be8afce507a03188
2022-11-28 08:50:22 +01:00
Translation updater bot a21beea765 Localisation updates from https://translatewiki.net.
Change-Id: I27799f2b03cc214b95fba58d792a3a5ec3f59309
2022-11-24 08:18:20 +01:00
Translation updater bot fdac4fc38d Localisation updates from https://translatewiki.net.
Change-Id: I47a427206b28d962600d793009122eab3073b0b6
2022-11-22 08:34:41 +01:00
jenkins-bot 88ef4aca7f Merge "build: Updating dependencies" 2022-11-17 19:31:02 +00:00
Translation updater bot cc335e5e62 Localisation updates from https://translatewiki.net.
Change-Id: I1c3903be2add2e3f76cc6744ee997a76e8f2ec11
2022-11-17 08:28:01 +01:00
libraryupgrader 5d79e1a3af build: Updating dependencies
composer:
* mediawiki/mediawiki-codesniffer: 39.0.0 → 40.0.1

npm:
* stylelint-config-wikimedia: 0.13.0 → 0.13.1

Change-Id: I7099c88e4fddd44321d0d81e7db08a41245b599b
2022-11-16 23:25:35 +00:00