Commit graph

2328 commits

Author SHA1 Message Date
daniel 9a85a1b67e Add logging for parser cache misses.
This should help us decide whether it would be OK to
rely on the ParserCache to store parsed TemplateData.

This patch should be reverted once we have collected
the desired data.

Bug: T266200
Change-Id: I0631806145d46e4a5e7c177797b8fdfe7a152076
2020-11-02 22:18:38 +01:00
Translation updater bot aa9f53d0e4 Localisation updates from https://translatewiki.net.
Change-Id: I5bb8efaabf0c4ee9fc05c98fd21e962379b2d41c
2020-11-02 08:53:56 +01:00
jenkins-bot 5edb1fd72a Merge "Make extension data JSON-serializable #1 - forward-compat." 2020-10-30 17:56:20 +00:00
Cindy Cicalese b10862a333 Make extension data JSON-serializable #1 - forward-compat.
Transitioning of ParserCache to JSON serialization will add
a requirement that all the extension data is JSON-serializable.

This is the first step in transition - making it forward-compatible.

Bug: T266252
Change-Id: If1c9d9bb5b0039df80a9d9b30c247206d8844c0a
2020-10-30 12:33:20 -04:00
Translation updater bot b760f5db69 Localisation updates from https://translatewiki.net.
Change-Id: I6a5a562c6b4b19924f1ec371e71f33e637cadf56
2020-10-26 08:32:16 +01:00
Translation updater bot cfb65f8d98 Localisation updates from https://translatewiki.net.
Change-Id: If2b838ba59a451b6c49c0c97d87c0262c18a0a7b
2020-10-21 08:27:57 +02:00
Translation updater bot e2618abdc4 Localisation updates from https://translatewiki.net.
Change-Id: I7447ef23e46636a7b08ad179784e77e3dd097e02
2020-10-16 08:29:54 +02:00
diwanshu885 957b52736d Change the value of 'template-doc-param-type-wiki-page-name' from "Page" to "Page name"
Bug: T250292
Change-Id: If3f2a0d6cd1d7bfa91d6a0d63b9f185f2eec770d
2020-10-13 16:44:32 +05:30
Translation updater bot 3ab53de1ab Localisation updates from https://translatewiki.net.
Change-Id: If8aecbb711132f4d38a06437e1bf91138c40dfb7
2020-10-12 08:36:09 +02:00
jenkins-bot 2a477094b9 Merge "Add progressive flags to various buttons" 2020-10-09 14:38:33 +00:00
Thiemo Kreuz c36cdcf862 Fix @covers tags in TemplateDataBlobTest
There is gzip-related code in this test, i.e. it is testing
the …Compressed… subclass as well.

Change-Id: I26c011be318427143a7d527f9f51f5c32c1e4fd3
2020-10-08 11:12:13 +02:00
jenkins-bot bb8e099e4a Merge "Remove unused "changesBooleanValue" property" 2020-10-07 17:04:52 +00:00
jenkins-bot 27e9916941 Merge "Use OutlineSelectWidget/OutlineOptionWidget for maps editing" 2020-10-07 10:06:55 +00:00
jenkins-bot 86a6865512 Merge "Fix parameter extraction from wikitext source" 2020-10-06 23:07:23 +00:00
jenkins-bot a0f98a1ea4 Merge "Also add padding to add parameter panel" 2020-10-06 23:02:38 +00:00
Marielle Volz 8a4e0ec984 Also add padding to add parameter panel
Follow up to Ica6bed595d8

Change-Id: I43d76ac256f18b69b556eadf5a53c20698cd860d
2020-10-06 09:37:09 +01:00
Ed Sanders c61049b8e3 Add progressive flags to various buttons
* Add '+' icon to "Add parameter" footer action
* Add "primary" action to button on add param page

Change-Id: Idc5f83afdbffb2336c6949fcd16a08a00e28a1a3
2020-10-06 08:26:43 +00:00
Ed Sanders 91214f0a6f Use OutlineSelectWidget/OutlineOptionWidget for maps editing
Change-Id: I90ab11c9a0941e8a487a7253d69f0a6cb1dc8dc5
2020-10-05 21:04:44 +00:00
Ed Sanders a990bcfc54 Move sub-page warning to dialog when opened
This is an important warning, and should not just be hidden.

Instead show it in the dialog as well in case the user ignored
it on the edit page.

Change-Id: If6f2d4b15157096a915186921d767a860edbc86a
2020-10-05 19:37:59 +01:00
Ed Sanders 39ba318938 Use MessageWidgets instead of LabelWidgets in Dialog
Change-Id: Ia9c34f446d4af7c2f56903ee83b6a57c4ef100dd
2020-10-05 19:37:59 +01:00
jenkins-bot e729bc7d84 Merge "Use a MessageWidget for the sub-page warning" 2020-10-05 14:48:20 +00:00
jenkins-bot e00962d7bf Merge "Remove default padding from panels, uses padded:true/false instead" 2020-10-05 14:07:29 +00:00
Translation updater bot 535560d609 Localisation updates from https://translatewiki.net.
Change-Id: I645d5f9825a2c4dee930da3dde4de9b69a2a4f21
2020-10-05 08:43:40 +02:00
Ed Sanders d79e07f059 Remove default padding from panels, uses padded:true/false instead
Change-Id: Ica6bed595d8f1b2ac7cb6f30d3081536b7e8561b
2020-10-04 15:53:15 +01:00
Ed Sanders 2d55fa64b1 Use a MessageWidget for the sub-page warning
Change-Id: I8b2878a9a817d14d3a4542a083e98a9f70cfde8d
2020-10-04 14:05:26 +01:00
Translation updater bot 71627e9061 Localisation updates from https://translatewiki.net.
Change-Id: I70fd304ef0940e45444d30a3820051e47f91186e
2020-10-02 08:25:12 +02:00
libraryupgrader 44b26329b5 build: Updating mediawiki/mediawiki-phan-config to 0.10.3
Additional changes:
* Dropped .php5 files from .phpcs.xml (T200956).

Change-Id: I009704249014f2be31f60cf8de2f9732c24e8652
2020-09-25 10:34:56 +00:00
Thiemo Kreuz de434822b4 Fix all eslint warnings
Change-Id: I731ea4a54b001a8d30743ca32188edb1c039253e
2020-09-24 13:31:18 +01:00
Ammar Abdulhamid 0b03b04dcc Force tag content to string before constructing TemplateDataBlob object
This null was being forced to string by PHP before strict typing in I9a20335

This is a rare error as self-closing tag is not allowed as far as
I can see and will emit proper syntax error after this change; but
it should not raise fatal exception

Bug: T263605
Change-Id: I1d9f674fb92d1f1cf70b57e820f8fc3312be9cc8
2020-09-23 05:35:37 +01:00
Thiemo Kreuz f6de5d3493 Fix parameter extraction from wikitext source
This fixes a series of issues:
* The JS implementation had a trim() in one place that was
  missing in PHP.
* The actual parameter name in the paramNames/$params array was
  trimmed, but the "normalized" name (this is only for duplicate
  detection) was not trimmed.
* It was possible for an empty parameter to show up.

This resulted in very strange behavior, e.g. {{{ 1}}}{{{1 }}}
was detected as "1" and "10" (?), i.e. it would try to renumber
the duplicate in a strange way (string "1" plus a counter that
starts with 0).

Change-Id: I0a6371f3633b03b5b21809ecd06ea4c72d7d914d
2020-09-22 18:27:23 +02:00
Translation updater bot e446676c91 Localisation updates from https://translatewiki.net.
Change-Id: I88b99a6a80da23676cd930ecf76956384d0c4e9b
2020-09-22 08:35:29 +02:00
Translation updater bot 3778a345ac Localisation updates from https://translatewiki.net.
Change-Id: Ic41baa98cd6962ab3f22891284a5618917d2c9af
2020-09-21 08:30:37 +02:00
jenkins-bot 077cb83cc9 Merge "Add and update soft PHPDoc type hints" 2020-09-21 01:00:27 +00:00
jenkins-bot 6d6ef56ea2 Merge "Prefer Html::rawElement instead of open/closeElement" 2020-09-21 00:53:23 +00:00
Thiemo Kreuz 0323e78308 Add missing ResourceLoader module for the trash icon
Without this, there is no guarantee the icon is there.

Bug: T258820
Change-Id: Ibe16db80ba8aec53477c48553c8f9c244d9f9a3b
2020-09-18 15:53:40 +02:00
Thiemo Kreuz fa7d16a373 Update a few confusing variable names in editor code
Change-Id: I8e7bc84539e62784059e0a43ca3de48c31abe6cf
2020-09-18 15:50:51 +02:00
Thiemo Kreuz 9f878897cf Turn static variables into private constants
These are not really variables. They are never modified, and not
meant to be modified. Using "static" was a common workaround
when we had no private constants in PHP.

Change-Id: Ie1234ce8833986431be95f8537282fa174978063
2020-09-14 14:17:25 +02:00
Translation updater bot 32f032b597 Localisation updates from https://translatewiki.net.
Change-Id: I6de788f2b8d9ca1c4fe32b9e77b1987c40c0b03b
2020-09-14 09:16:24 +02:00
Translation updater bot 08fcc89d8e Localisation updates from https://translatewiki.net.
Change-Id: I9c43b672d7083fbbfda9dae35ef248cbe588eb47
2020-09-10 09:50:06 +02:00
Thiemo Kreuz ac0630edd1 Add all missing PHPDoc comments
Change-Id: I4bf77867209e8aef524707b02363ae0ff7ca1f2a
2020-09-09 17:05:54 +02:00
Thiemo Kreuz eeffc4bf38 Prefer Html::rawElement instead of open/closeElement
Html::open/closeElement are hard to read and possibly error
prone. We can easily avoid it in this case here.

Change-Id: I2251cb63e58bc132ced0bb684e3f0e3be35ab1aa
2020-09-09 16:54:59 +02:00
jenkins-bot 6dd0b66fea Merge "Make TemplateDataBlob::normaliseInterfaceText() private" 2020-09-08 22:45:15 +00:00
jenkins-bot 8e56813b6e Merge "Use more canonical (object)[] instead of new stdClass" 2020-09-08 22:45:13 +00:00
jenkins-bot 3319103531 Merge "Make properties in TemplateDataBlob private" 2020-09-08 22:17:40 +00:00
jenkins-bot 81c7cc823e Merge "Make subclass constructors properly call each other" 2020-09-08 22:17:39 +00:00
Translation updater bot 750b4f53f4 Localisation updates from https://translatewiki.net.
Change-Id: I3f3c4b9bf9b891733e41d38cfebc6fc172654eae
2020-09-08 10:25:27 +02:00
Translation updater bot dca6117405 Localisation updates from https://translatewiki.net.
Change-Id: I501c350459c4c7fba6616e3ec11aa5a08fdcc67b
2020-09-06 20:56:52 +02:00
libraryupgrader e96711d7bb build: Updating npm dependencies
* eslint-config-wikimedia: 0.16.2 → 0.17.0
  The following rules are failing and were disabled:
  * no-shadow

* grunt: 1.2.1 → 1.3.0

Change-Id: Id43b02523bb5e0a706f64c1a40d1c1841aa3d345
2020-09-04 23:21:12 +00:00
Thiemo Kreuz f2306a2eab Make properties in TemplateDataBlob private
No subclass is directly using these. They don't need to be
protected. There are getters, if needed.

Change-Id: I27dcb8bee37b9559242451774c52240b490a18af
2020-09-04 15:28:15 +00:00
Translation updater bot 060dc52f44 Localisation updates from https://translatewiki.net.
Change-Id: I33eb67c0371614ed7edb6ca7c9c2a4157ef56c47
2020-09-04 09:28:23 +02:00