Commit graph

19044 commits

Author SHA1 Message Date
Translation updater bot 98a3a7d269 Localisation updates from https://translatewiki.net.
Change-Id: Ica3606b56e3332f2e9a1e6211edd12884e4913ca
2022-03-30 08:18:50 +02:00
Kosta Harlan 9241add01e Allow hook implementations to modify params
This is needed because the $params array is then passed on to
ApiEditPage, so if the hook implementer wants to alter the data used
with the edit, it needs to be able to modify the $params.

See I494d72a42d9103c28c4d44077cfe0f1269fc7b00 for an example where
GrowthExperiments would like to modify the 'tags' parameter for an
edit.

Depends-On: Idd052281898f99e4f13f241d5633294b59b29329
Bug: T304747
Change-Id: Ia4842a1593028f5fa145de167ccf9b72efa81351
2022-03-29 11:31:30 +00:00
Thiemo Kreuz 912bc34f62 Fill template search results with prefix matches when Cirrus fails
This code is optimized for the 2 most relevant use cases:

1. When Cirrus finds 10 results, we still want to search for the top 1
prefix match. This is critical for templates like !!. This will appear
at the top. unshiftPages() makes sure the limit of 10 is enforced.

2. When Cirrus fails to find anything, we search for 10 prefix matches
and use these instead.

The code can also handle everything in between. For example, when
Cirrus finds 5 results, we search for 5 more prefix matches and add
them when Cirrus missed them. The total number in the end might be 5 to
10 depending on the number of duplicates. This is intentional. Why?
Let's say we always search for 10 prefix matches and add them to the
top when Cirrus missed them. This might remove _all_ Cirrus results.
This shouldn't happen. This extra code is only to fill in glaring gaps,
not to replace Cirrus. 5 results are fine.

Bug: T303524
Change-Id: Ib0471795124c0c7001b6901edaf8e7b380e426b1
2022-03-29 13:18:12 +02:00
Thiemo Kreuz 6bbf7d1907 Full fallback to prefixsearch when Cirrus returns nothing
There is already some kind of "fallback" to prefixsearch. We always
check if the top-1 prefixsearch result is part of the result set.
Because of this the current worst-case scenario is that only this
1 result is shown.

This patch implements a full fallback to prefixsearch. But only when
there are 0 CirrusSearch results. Further tuning might be done in
later patches.

Bug: T304925
Change-Id: I1927eedad60c9b9ac2021481a85376c08ccf6fdb
2022-03-29 13:17:05 +02:00
Translation updater bot 2f8122aec8 Localisation updates from https://translatewiki.net.
Change-Id: I254ae16364387dc9365d2d52ed57b41f0f0b0eb9
2022-03-29 08:06:22 +02:00
Bartosz Dziewoński 4868974bca Update VE core submodule to master (dbcb897f2)
New changes:
14fd3ce2d Initialize ContentBranchNode CSS classes properly
d36dd38ee Refactor renderContents
7b1cf5092 Initialize and document existing property
98fe8c06f Localisation updates from https://translatewiki.net.
61f40aa92 Localisation updates from https://translatewiki.net.
d4db5e375 Revert "Add backtick sequence for <code> formatting"
dc11132c8 Revert "Refactor renderContents"

Bug: T304804
Change-Id: I9a6050fcb23c7266e51b1e00d7e0977107d7e92e
2022-03-28 16:39:36 +02:00
Translation updater bot 83db4cc3e8 Localisation updates from https://translatewiki.net.
Change-Id: I1a16df64dc1f00c793ae9368cea1efa6f5d5daea
2022-03-28 08:22:24 +02:00
jenkins-bot 2913158b35 Merge "Remove delete button from template context" 2022-03-26 17:22:40 +00:00
Translation updater bot 09a378d515 Localisation updates from https://translatewiki.net.
Change-Id: I9ce9d4d898bf7c41e690610aab06a3d8c0d7ca83
2022-03-25 08:35:29 +01:00
Thiemo Kreuz c8af207681 Use boolean RegExp.test() instead of .match() where possible
.test() is the dedicated syntax for a boolean "does match? yes/no?"
check. .match() returns an array of matches, or null. This is just not
needed in these situations.

Change-Id: Ibb996ab843d1a6c7d7af98d6a112990665d543b2
2022-03-24 11:04:43 +01:00
Translation updater bot dbf21a69c1 Localisation updates from https://translatewiki.net.
Change-Id: Ide53e51336412411d7291e55eb2ed64e829d36e0
2022-03-24 08:35:27 +01:00
Ed Sanders be2a1ccf62 Respect useeditwarning user option when tearing down target
Also invert logic and rename variables to make tests in tryTeardown
and switchToWikitextSection identical.

Bug: T294463
Change-Id: Icb86a676c3f315e4a3d229f46eb383dcd7959973
2022-03-23 14:55:13 +00:00
Translation updater bot dac7de1355 Localisation updates from https://translatewiki.net.
Change-Id: I6b452c770a11a794cd44b15b8b9b262612c917d2
2022-03-23 08:25:51 +01:00
Thiemo Kreuz a6f784c095 Fix hiding unused template parameters sometimes not working
We ended mixing two concepts in a single method:

* We need a method that allows us to create the parameter list widget
when it's needed, even if it's empty. This is relevant when a template
is entirely empty, and the first parameter is added. This wasn't
working. Instead the parameter list was created with all parameters.

* On initialization we either want all parameters to be shown, or only
used ones. But this code is only needed once, on initialization. I
ended inlining this code in this patch.

Bug: T300640
Bug: T304046
Change-Id: I6620a870e4420dcb8fecf522b3274458eeec891d
2022-03-22 15:41:55 +01:00
Translation updater bot a824d0c5c8 Localisation updates from https://translatewiki.net.
Change-Id: Ia8f70d7d541c0776e57adadc90c46525fa315748
2022-03-22 08:30:27 +01:00
jenkins-bot 47ac0d243b Merge "Set desktop context / inspector padding to -10px in vector-2022" 2022-03-22 01:14:31 +00:00
jenkins-bot ce9809d113 Merge "Fix resize of MWAceEditorWidget when setting up" 2022-03-22 01:03:48 +00:00
jenkins-bot b98de01cac Merge "Preserve classes on broken media elements" 2022-03-22 01:03:17 +00:00
jenkins-bot 1b45db6d4b Merge "Use "Author" in media dialog" 2022-03-22 01:01:30 +00:00
Bartosz Dziewoński aec82d9a88 Update VE core submodule to master (fc0e3ed33)
New changes:
88a3a714a Localisation updates from https://translatewiki.net.
9b7c4d0fe Localisation updates from https://translatewiki.net.
eaadf3e61 Call parent #setup method in Merge/SumCellsContextItem
ddcb5821d Pass overlay padding when building desktop context (inspector)

Bug: T304202
Bug: T304233
Change-Id: I23d90f62f854cf5dead32104f5ea9e16f9eaabad
2022-03-22 01:34:12 +01:00
Arlo Breault dfa1c315bb Preserve classes on broken media elements
A class, mw-broken-media, was added in
I92359048b42d32fe8a0f2cb79cd348cf5f2c56cc

Bug: T304010
Bug: T270150
Change-Id: I542d7d879868c9030ce00b2686cdfd0077e49491
2022-03-21 17:42:39 -04:00
jenkins-bot 43a06844f9 Merge "Fix review button shown when review panel is already active" 2022-03-21 17:12:37 +00:00
Željko Filipin 636ffbbb98 selenium: Check if editing toolbar is displayed
A better assertion if the VisualEditor is opened would be to check for
editing toolbar instead of checking for a notices popup.

Bug: T296187
Change-Id: Ide816646254bc856b44725490c25b2b9962188c9
2022-03-21 15:54:47 +01:00
Thiemo Kreuz 6eaf0ef55b Fix review button shown when review panel is already active
These two lines forcefully enabled the review/preview buttons, even
when the review/preview panel is already active.

Bug: T300448
Change-Id: I6dbe6ee88728a65233a455b768f17bff668fe3a8
2022-03-21 11:37:58 +01:00
Adam Wight b079440068 Fix template dialog parameter padding on mobile
In the mobile view, parameters don't have left padding so some styles
should only be applied to the desktop stylesheet.

Bug: T304167
Change-Id: I1846512c21aae36f212fe142b7d96ac91e46854b
2022-03-21 09:53:22 +01:00
Translation updater bot 66b76c3958 Localisation updates from https://translatewiki.net.
Change-Id: I8f25d70af6ad2df1e12b2241774ba07947d073e1
2022-03-21 08:15:41 +01:00
Ed Sanders 58f6f0195a Remove delete button from template context
Currently in VE desktop, items which can be deleted with
delete/backspace do not have this button. If that situation is
considered a problem it sould be solved consitently for all
focusable nodes as part of a wider fix.

Adding a delete button to template contexts makes them inconsistent
with other focusable nodes.

Bug: T274263
Change-Id: I2f7508a605852274ba8f40b2afd1dfd56600aa36
2022-03-20 18:09:31 +00:00
Ed Sanders 2fa21ebcdb Use "Author" in media dialog
"Author" is used on Commons and in various places in
MultimediaViewer. Artist is not used in these places.

Bug: T267501
Change-Id: Iccd2d926537a7d4147e6cc8b5c2c9c1ecf4d6b27
2022-03-19 22:22:00 +00:00
Ed Sanders 8c36a630db Set desktop context / inspector padding to -10px in vector-2022
Bug: T258501
Depends-On: Ifaaa0dad4ecda3ff25d5fac54ccd2c95087d6f50
Change-Id: Id1f0a6d74740cf979de2b4a7f2a9f2e197615a13
2022-03-19 13:47:39 +00:00
Ed Sanders f6ea2e3457 Fix resize of MWAceEditorWidget when setting up
Bug: T303964
Change-Id: Ic8efbd7df74213fddaec987aff60e733f9550db2
2022-03-18 22:30:54 +00:00
Adam Wight bf7f022686 Fix right padding on inline descriptions without the new sidebar
This fixes a styling issue with inline descriptions, for the scenario
when the inline description feature is enabled but the new sidebar is
disabled.

Bug: T304167
Change-Id: Ida4da4605da5143de2a27725d87d5876aea7065c
2022-03-18 17:16:48 +01:00
jenkins-bot 7a0ff5b56a Merge "eslint: Lint root files with server rules" 2022-03-18 12:35:52 +00:00
Translation updater bot 6d52a3584b Localisation updates from https://translatewiki.net.
Change-Id: I4d9cfb4c2aea85da292f948feccc4752885be91d
2022-03-18 08:45:33 +01:00
Ed Sanders 60c2239e06 eslint: Lint root files with server rules
Change-Id: I872ab9dd7844eb8885dc30b40a2429875f7591c7
2022-03-17 23:39:53 +00:00
jenkins-bot 401da7ee13 Merge "Remove MWDismissibleMessageWidget and use MessageWidget's showClose option instead" 2022-03-17 11:43:33 +00:00
Translation updater bot 8059f845a3 Localisation updates from https://translatewiki.net.
Change-Id: I21a6287eaae469b68c13cb21ca80685d25cb5aac
2022-03-17 08:37:49 +01:00
Translation updater bot a2a73aab7d Localisation updates from https://translatewiki.net.
Change-Id: I864345e8072818e4b525bcfce2a3d28e8dbda1cf
2022-03-16 08:08:23 +01:00
jenkins-bot 32d9150762 Merge "Rename ve-mw/init/styles to LESS" 2022-03-15 23:16:32 +00:00
Ed Sanders 38dfa608f8 Simplify ve-mw/init/styles LESS files
Change-Id: I49e05c9680e1fe7db8e01df627a6d5fa2836aac8
2022-03-15 23:10:34 +00:00
Ed Sanders 627bbc4aaf Rename ve-mw/init/styles to LESS
Change-Id: I50969b8798637368942b2d9315e7290f2c579f77
2022-03-15 22:16:59 +00:00
jenkins-bot cada5a3ab8 Merge "Extract template scrollToTop method" 2022-03-15 12:17:50 +00:00
Translation updater bot b1478e8b84 Localisation updates from https://translatewiki.net.
Change-Id: I4680f9e44776042d1e6a205d963d23c32ca293ed
2022-03-15 08:25:58 +01:00
jenkins-bot e3d68ed7d9 Merge "Namespace rest of the extension" 2022-03-15 04:28:44 +00:00
jenkins-bot f63c483b56 Merge "Remove Apex skin files" 2022-03-15 01:12:21 +00:00
Reedy 239fbb64e4 Namespace rest of the extension
Change-Id: I4f3e2793099d81401035ea282f268a3afaa03067
2022-03-14 22:27:15 +00:00
Bartosz Dziewoński b22ba16b14 Update VE core submodule to master (6dd669298)
New changes:
3206d66bb Use $.parseHTML() in tests where appropriate
c99d63f66 Localisation updates from https://translatewiki.net.
cd5798146 Update OOUI to v0.43.2
98c7288fd Fix margin wrapper paragraphs in placeholders too
639d81bd1 FocusableNode: Documentation typo fix
23daa81a0 Localisation updates from https://translatewiki.net.
e84c40a5d ve.ui.Sequence: Put optional arguments in a config object
c79dcf48f Add backtick sequence for <code> formatting

Bug: T299817
Change-Id: I56b77aae31b80e2fdef113d3431740340419d2f0
2022-03-14 22:42:35 +01:00
jenkins-bot 3424cf9c86 Merge "Improve messages about duplicate template parameters" 2022-03-14 13:19:59 +00:00
Translation updater bot 9e47ab1892 Localisation updates from https://translatewiki.net.
Change-Id: I699c55784025b2adad6a0e8c145495ceb6f4c1d0
2022-03-14 08:15:01 +01:00
Ed Sanders 1fdda82b58 Remove Apex skin files
The Apex skin (not to be confused with the Apex OOUI theme)
is abandonware. Keeping files around that pretend to support it
is just maintenance debt.

Change-Id: I176e4e25307ab8ca4166a6e9b55e3bec4f058d05
2022-03-12 14:23:23 +00:00
Ed Sanders 5b92c66e97 Use new config option signature when building sequences
Change-Id: Id93327e9afdad8d761a079b17b47e7bbe32bd5e2
Depends-On: I1011602514f0f21c5764b14563d8213ecc19f49a
2022-03-11 17:12:54 +00:00