Commit graph

18935 commits

Author SHA1 Message Date
Translation updater bot ed49a9f80f Localisation updates from https://translatewiki.net.
Change-Id: Idebb57875fc8aef064e958267bf60b87ade92c34
2022-02-28 14:29:43 +01:00
WMDE-Fisch 99a251c8e6 Add section fragment to keyboard help link
Bug: T302004
Change-Id: I656f4b4826c8528e304b387f762aef35ec6404b2
2022-02-28 13:33:57 +01:00
Thiemo Kreuz 5a92880da5 Fix bad visualization of empty suggested value
Bug: T299430
Change-Id: I9a0d26c7fc88e1a0c2c68152b3e15a9ba7662991
2022-02-28 08:49:08 +01:00
Thalia b0c0917f19 ApiVisualEditor: Support Special:MyLanguage for preload param
This allows nonexistent translated pages to fall back to the
corresponding page in a suitable language.

Bug: T299544
Change-Id: I43f461e9f595c364ecdaf2faccbd580fc0df6799
2022-02-25 12:23:16 +00:00
Thalia 0c5ed2e772 ApiVisualEditorTest: Avoid using VirtualRESTServiceClient
Use paction 'metadata' instead of 'parse' by default, to avoid
accidentally using VirtualRESTServiceClient when testing cases
that don't require it.

Change-Id: I02492a2dc444cf531a5c8767b0dcfe0d20ac7339
2022-02-25 12:15:37 +00:00
Translation updater bot 09e405386b Localisation updates from https://translatewiki.net.
Change-Id: Id7717ffa2fa37ec29cd883655c1b2610316e3725
2022-02-25 09:46:26 +01:00
Ed Sanders 3f1eb8992f Fix spacing between sticky find bar and field list
Bug: T300899
Change-Id: Ieac47d58eb1037edcd82e0d7ee5c98e125c4e78c
2022-02-24 10:40:37 +00:00
Translation updater bot 026a11357a Localisation updates from https://translatewiki.net.
Change-Id: I6c06fe5619c54ab31919705b2a46b8ee65d2013b
2022-02-24 08:50:19 +01:00
James D. Forrester 10526ca45a Update VE core submodule to master (a75d285a8)
New changes:
a75d285a8 ve.ce.Surface: Fix error on load when document has no content offsets

Bug: T302362
Change-Id: I55cb19b390461264316fc75a09ae90e26bc5f34d
2022-02-23 12:25:00 -05:00
Ed Sanders b0dcf1fc69 Update VE core submodule to master (492815b58)
New changes:
a50d13e3b Localisation updates from https://translatewiki.net.
a0c3637de Localisation updates from https://translatewiki.net.
17daebc83 ve.ce.Surface test: Add test for special image paste handling codepath
f4b688e1b Always use clipboard paste data if "important elements" have been dropped
f0e5c16c9 afterPaste: Add 'figure' to importantElement list
abd5894ef Show copy button when selecting focusable nodes on mobile

Local changes:
* Load new clipboard messages

Bug: T101113
Change-Id: I05f9dc850d3cac740916d26a0c2b0d390e47fbb1
2022-02-23 12:45:42 +01:00
Translation updater bot 5b2d70432e Localisation updates from https://translatewiki.net.
Change-Id: I68902cd40cb95a9d363b47d81c34ab01b56d0b7b
2022-02-23 08:19:42 +01:00
David Lynch 14f99d05fd Avoid undefined index for mobileformat
Bug: T302344
Change-Id: Icf051b6fdec627c6477a7b2abd1ba4ccd5b3a259
2022-02-22 21:23:07 +00:00
jenkins-bot f259cb3072 Merge "Never collapse newly added templates in transclusion dialog" 2022-02-22 15:03:45 +00:00
Translation updater bot e65c63f2ad Localisation updates from https://translatewiki.net.
Change-Id: I9029503fcc32f8c9555d5e173c6221d5b2e388e2
2022-02-22 14:20:50 +01:00
Thiemo Kreuz 0d989b6fee Never collapse newly added templates in transclusion dialog
Bug: T300640
Change-Id: Id400951cf98f1eda780700d726fc10afbc1eaa90
2022-02-22 11:37:21 +01:00
Translation updater bot 596d4e53dd Localisation updates from https://translatewiki.net.
Change-Id: I6dabdf19528a1577d0d019ea7b6ceedd00161903
2022-02-22 08:12:30 +01:00
Ed Sanders b4f3ecbc5c MobileSaveDialog: Also add 'content' class to preview panel
This isn't used yet as NWE is not enabled.

Change-Id: I2ea4697c2a5ba57f537e646e3d0fb7d89fd04c7b
2022-02-22 00:23:35 +00:00
jenkins-bot e9f8ffa5a1 Merge "Log whenever browser plugin spam is detected" 2022-02-21 23:29:39 +00:00
Ed Sanders 4501771243 Log whenever browser plugin spam is detected
Our theory is that browser plugin spam shouldn't reach
the DM document unless we've made a coding error like
I194ff1d57. Log future errors so if there is more plugin
spam in the future, we can investigate the cause.

Bug: T298147
Depends-On: I705195bc5d0f76a38da5d2cc09fab184a2c32401
Change-Id: I3403859906ceaa51be63b0d79f474f0289ab4408
2022-02-21 22:48:46 +00:00
Thiemo Kreuz 0b47a8c85b Improve messages about duplicate template parameters
There are some combinations that can result in a message that is
more confusing than helpful. For example, when a parameter is
already in a template, but via an alias, that alias is potentially
shown in the sidebar (only when the parameter doesn't have a
label). When the user enters the primary name of this parameter,
the message talks about a "duplicate", but the user can't
understand what this duplicate is.

Just make all messages repeat the parameter's label as shown in
the sidebar. This is often redundant, but sometimes crucial
information.

This patch also improves the qqq.json documentation. All messages
get 2 parameters, even if some of them use only 1.

Bug: T285869
Bug: T291059
Change-Id: I826e341cebd8f89dba63d64de67baba1ec8f2001
2022-02-21 17:35:47 +01:00
jenkins-bot 839a62829d Merge "Add and fix default values in parameter documentation" 2022-02-21 13:41:51 +00:00
jenkins-bot 8c1ad11a7d Merge "MWEditSummaryWidget: Handle multi-line comments" 2022-02-21 13:39:01 +00:00
jenkins-bot fe69e22761 Merge "tests: Mock wgVisualEditor instead of relying on SpecialPage value" 2022-02-21 13:32:51 +00:00
jenkins-bot d79527e1f2 Merge "Always scroll to top when loading VE source mode" 2022-02-21 13:23:28 +00:00
Thiemo Kreuz bc0a34b0ed Add and fix default values in parameter documentation
Same random finds while working on something else. I carefully
checked and made sure these methods are actually called without the
optional parameter.

Change-Id: Iab36fd130258322985b5d6e7f8e1f7b4ee235ba2
2022-02-21 13:19:21 +00:00
jenkins-bot aa8b08bd1a Merge "DesktopArticleTarget.init: Handle popState target reactivation properly" 2022-02-21 13:14:38 +00:00
jenkins-bot ba5f31ef8f Merge "DesktopArticleTarget.init: Make getInitialEditMode re-usable" 2022-02-21 13:12:00 +00:00
jenkins-bot 400770088b Merge "build: Update stylelint-config-wikimedia to 0.12.1" 2022-02-21 13:09:17 +00:00
jenkins-bot 2a72f4e290 Merge "Remove not needed self = this indirections" 2022-02-21 12:57:41 +00:00
jenkins-bot e497efca9e Merge "Use .bind() syntax where it makes code more readable" 2022-02-21 12:55:26 +00:00
jenkins-bot 86d01b6c04 Merge "selenium: Wait for VisualEditor to load" 2022-02-21 12:22:52 +00:00
Thiemo Kreuz 3c042049bf Use .bind() syntax where it makes code more readable
This focuses on a few trivial cases where the syntax helps making
the code more readable. One level of indirection is gone with this.

Change-Id: Ibf25d7eaa06952e69b36bd5a78a48d04ac62890c
2022-02-21 10:34:03 +00:00
Thiemo Kreuz 58e27f56d6 Remove not needed self = this indirections
These are only needed when we need to access a specific `this` from
within another `function () {}` context. This is not the case in the
situations here.

This is split from Ibf25d7e to make it smaller and easier to argue
about.

Change-Id: Ide1476de91fc343aa992ad92a1321d3a38b06dd0
2022-02-21 10:52:24 +01:00
Translation updater bot a6ffafb982 Localisation updates from https://translatewiki.net.
Change-Id: Ic09d05200ddc74ef9c26799f019a154292a9a7db
2022-02-21 08:17:15 +01:00
Ed Sanders e21acbe847 build: Update stylelint-config-wikimedia to 0.12.1
Change-Id: I989c038e86610ae2b724b3d9f08c9cd33047bfea
2022-02-20 13:59:31 +00:00
Lucas Werkmeister 957036fa19 MWEditSummaryWidget: Handle multi-line comments
The `.` character class matches any character *except* line terminators,
but edit summaries can contain those. Use [^] to match truly everything
in the comment part. (In the section part, I assume `.` is okay.)

Bug: T302103
Change-Id: I29fcdd7489d118674bab5cfe5c0a15b8e4efac64
2022-02-18 19:54:03 +01:00
Ed Sanders e4c22ec0d6 Don't suppress teardown prompt when pressing escape
Follow-up to If9e5d1fbf00f8359.

Bug: T302096
Change-Id: I60fcddee7bf0dfb3a39e92d26898da2963861c19
2022-02-18 18:15:40 +00:00
jenkins-bot 0db6720128 Merge "Move methods from DesktopArticleTraget to ArticleTarget" 2022-02-18 18:04:28 +00:00
jenkins-bot d7a33aa9f9 Merge "ApiVisualEditorEdit: Pass useskin & mobileformat to ApiParse" 2022-02-18 18:01:45 +00:00
jenkins-bot a1a518236e Merge "DesktopArticleTarget.init: Only bind event listener once" 2022-02-18 17:52:20 +00:00
Ed Sanders c8072f1af2 Move methods from DesktopArticleTraget to ArticleTarget
To allow them to be used by MobileArticleTarget.

Change-Id: I33e8b3c2361c2dfd0fae8aa41eacf993c93c9c48
2022-02-18 17:04:04 +00:00
Ed Sanders 93a7f33989 ApiVisualEditorEdit: Pass useskin & mobileformat to ApiParse
Passing the useskin parameter ensures that output hooks are run
on the new page HTML. This already happens because we request
the 'subtitle' and 'categorieshtml' props which also trigger
skin mode (along with the 'headhtml' which we don't request).

However it is better for us to be explicit that we want the rendering
for a specific skin, rather than relying on these props to trigger
the correct mode.

Also pass through mobileformat param, which is added by a hook
in MobileFrontend.

Change-Id: I1cd2c5c5c13ae0b90cc32e441b453532343a434a
2022-02-18 16:59:07 +00:00
Translation updater bot acbcc68034 Localisation updates from https://translatewiki.net.
Change-Id: Ida6e604a86787ff6a921377d7abf7c2d17b9fd6b
2022-02-17 08:12:26 +01:00
Ed Sanders 54cd911db0 DesktopArticleTarget.init: Handle popState target reactivation properly
This ensures the full loading sequence is shown when the
user opens VE using history navigation.

Bug: T301843
Change-Id: Ia7a641c8bd5a036f23c9da94bc539d8cf66c5021
2022-02-16 15:56:24 +00:00
Ed Sanders c3f88d72c8 DesktopArticleTarget.init: Make getInitialEditMode re-usable
Also let parseSection handle undefined.

Change-Id: I2ec9e7e642d116a555c03af6070f7577ce7030a7
2022-02-16 15:56:24 +00:00
Ed Sanders ca6ed21835 Always scroll to top when loading VE source mode
Change-Id: Ibfbb241f523fbdfcf6eb9fd1aeaa0e13782586aa
2022-02-16 15:17:19 +00:00
Ed Sanders 88609cb885 DesktopArticleTarget.init: Only bind event listener once
Previously we were adding an event listener every time the
target was opened, and not removing the old ones.

Change-Id: I0ce609f1d9e2d6fb00b605dcade6f27e7a887b9d
2022-02-16 14:41:04 +00:00
Željko Filipin 09668285d6 selenium: Wait for VisualEditor to load
Bug: T296187
Change-Id: Iac98690dd49b6e82062973da05ce30c6f08ba8bc
2022-02-16 14:57:13 +01:00
Timo Tijhof bdb7737a5a tests: Mock wgVisualEditor instead of relying on SpecialPage value
Found via Iaf989bc50363a (patch set 6):

> FAILED TESTS:
>   ve.init.mw.DesktopArticleTarget
>     ✖ init
>     Died on test #1
>     TypeError: Cannot set property 'pageLanguageCode' of null
>         at Object.<anonymous>

Bug: T89434
Change-Id: I8ad2cc4c115224eb276d1488091b9518fde739f9
2022-02-16 10:19:11 +00:00
Translation updater bot d1e6239567 Localisation updates from https://translatewiki.net.
Change-Id: If9fe790be7f6f5735fd85d5af9d07a59391a5103
2022-02-16 08:13:45 +01:00