Commit graph

17301 commits

Author SHA1 Message Date
Kosta Harlan f035ce51f1 Introduce VisualEditorApiVisualEditorPostSaveHook
What:

Add hook that runs after a save attempt is made in ApiVisualEditorEdit.
The hook receives the same data available in ApiVisualEditorEdit, and
implementations of the hook can modify the API response.

Also introduce templated
parameters (https://www.mediawiki.org/wiki/API:Templated_parameters) in
the API parameters; this allows plugins to pass arbitrary data along
with their request using e.g. plugins=linkrecommendation&data-linkrecommendation=foo

Add ServiceWiring files, a PHP namespace, and a HookRunner class to
support the above changes.

Why:

VE plugins may wish to send additional data when saving an edit and take
action based on that data on the server-side. See for example the
AddLink plugin in I7a052f8e which sends annotation data, and then uses
the new hook to perform a database operation.

Change-Id: I392691475fbdcec766acbd832600e82efcb5bfe8
2021-04-30 20:50:01 +02:00
jenkins-bot 1486e5f038 Merge "Localisation updates from https://translatewiki.net." 2021-04-26 07:17:09 +00:00
Translation updater bot 21a536676e Localisation updates from https://translatewiki.net.
Change-Id: Icf91121d01b64bb0376d0324ebf4c074c7eeed32
2021-04-26 09:11:07 +02:00
Translation updater bot 51cedeb9de Localisation updates from https://translatewiki.net.
Change-Id: Ibed58b3fe62a6329f7ea50e864902ad84ecae376
2021-04-26 08:58:24 +02:00
Translation updater bot 788b168073 Localisation updates from https://translatewiki.net.
Change-Id: Icefa5c0035c1f39e9c63d54f15dce401e317d323
2021-04-23 08:37:42 +02:00
jenkins-bot 1f853bb33d Merge "Fix ve.init.mw.MobileArticleTarget.save return value" 2021-04-22 16:33:01 +00:00
Gergő Tisza b902b09784 Fix ve.init.mw.MobileArticleTarget.save return value
Like its parent method, ve.init.mw.MobileArticleTarget.save
should return a promise.

Change-Id: Ic3b390e613aa71aea4e7375a1f6e421cbd4f854c
2021-04-22 14:58:59 +00:00
Translation updater bot 41153a73b1 Localisation updates from https://translatewiki.net.
Change-Id: Ic5281dff4b47a56c93bb406e2499372565d287bb
2021-04-22 09:32:36 +02:00
jenkins-bot 6a08f4b839 Merge "Increase space between fields when using inline descriptions" 2021-04-21 11:33:48 +00:00
Translation updater bot 8a1b127cae Localisation updates from https://translatewiki.net.
Change-Id: Ia0d5f37678266c4204469b01ba23ea6a000fd5e7
2021-04-21 08:53:33 +02:00
WMDE-Fisch e3197a82ff Increase space between fields when using inline descriptions
Bug: T273425
Change-Id: I3bf31622dbf794e1de1fa69b4fac68114c5689f7
2021-04-20 18:27:03 +02:00
WMDE-Fisch 2920c68adf Use verbose label for the example
Bug: T273425
Change-Id: Ia56aa35f98f31859e48781848b7481ebd5e2bd1c
2021-04-20 10:34:52 +00:00
Translation updater bot 6ccda1d394 Localisation updates from https://translatewiki.net.
Change-Id: I03dcffff87e1086b007baeca2d4ae59b793236c1
2021-04-20 08:48:51 +02:00
Translation updater bot 59d5d3721a Localisation updates from https://translatewiki.net.
Change-Id: I090d239b806fb1fe1d3992246b9059dea93d447a
2021-04-19 08:52:09 +02:00
jenkins-bot fd3b938d8e Merge "Relocate parameter descriptions in the transclusion dialog" 2021-04-16 10:00:52 +00:00
Translation updater bot 44f17da3c3 Localisation updates from https://translatewiki.net.
Change-Id: I39281edcb991d51f4f442084bfb588cb887475ef
2021-04-16 09:51:16 +02:00
Andrew Kostka 3c2db5fba9 Relocate parameter descriptions in the transclusion dialog
Bug: T273425
Change-Id: I2044b65ba88ae00e394fb84cb8e96a218995918a
2021-04-15 13:08:53 +02:00
Translation updater bot 60f4429e43 Localisation updates from https://translatewiki.net.
Change-Id: I4a2fe820554817c417664a33797b590af291fb2f
2021-04-15 08:44:26 +02:00
Bartosz Dziewoński c832df5d3a api: Better error when a page with the given title can't exist
Bug: T279711
Change-Id: Icd7e7564bbbca47ea53dfe72c5f34ffa69ff3389
2021-04-14 16:11:18 +02:00
Bartosz Dziewoński aec35a67d0 api: Better error when 'wikitext' parameter is required
Bug: T280072
Change-Id: Ibd03aa2a527ac2d27ef7c3dbaf25df74a2a0fdc5
2021-04-14 16:10:26 +02:00
Andrew Kostka 43c1ec5f42 Add filtering for the suggested values combo box
Bug: T271898
Change-Id: Ifb0deb117fbe40bd43c62d8be235a239a2b37f25
2021-04-14 14:11:50 +02:00
Bartosz Dziewoński dbb71845cf Update VE core submodule to master (ef0a3a720)
New changes:
7eade8d47 Avoid unnecessary wikitext conversion when inserting NBSP in source mode

Bug: T279600
Change-Id: If85b99b69269e44b1c62865960dd85fd33bfc264
2021-04-13 21:59:42 +02:00
jenkins-bot 7ce573802a Merge "Add command to insert non-breaking space" 2021-04-13 19:05:43 +00:00
James D. Forrester c113495445 Update VE core submodule to master (408012182)
New changes:
c3d3de18e Localisation updates from https://translatewiki.net.
1392c51ee build: Update eslint-config-wikimedia to 0.20.0
f76d6a862 Localisation updates from https://translatewiki.net.
f34c09d04 Add extra test coverage for ve.dm.TextStyleAnnotation
a90e5fc98 build: Update devDependencies

Change-Id: Ifbae847bf1cdc15f003eb0f97c1f85568468e71d
2021-04-13 08:11:51 -07:00
Translation updater bot 9ef7814937 Localisation updates from https://translatewiki.net.
Change-Id: Iac896498559626e755ee2bb7b9755aa5c9b8968b
2021-04-13 09:22:10 +02:00
Translation updater bot 1b1913ccbf Localisation updates from https://translatewiki.net.
Change-Id: I98a4122abe86ca34ba279698d42c5bd865605aa1
2021-04-12 08:39:20 +02:00
jenkins-bot 1e4de0e464 Merge "Add a combo box for suggested values in the transclusion dialog" 2021-04-09 10:40:33 +00:00
Translation updater bot bb8d598272 Localisation updates from https://translatewiki.net.
Change-Id: I6992ae8f53822d3b38c21fc04da0b30031e28412
2021-04-09 08:59:43 +02:00
Bartosz Dziewoński 1b34b59aa7 SECURITY: Act like users don't exist if hidden from viewer (VE edit notices)
Applying the changes from the MediaWiki core patch for T120883
(Ife272a0eb1f3322bc8eb30ca803bd21801acba3e) to our duplicated
code implementing the same functionality.

Bug: T270453
Change-Id: I1b2de322aa0c69eb6d3b3ffadaed3fbaa3a58bca
2021-04-08 20:40:08 +01:00
jenkins-bot 2571123285 Merge "Revert incorrect changes to ve.ui.MWBackCommand that made it stop working" 2021-04-08 15:07:14 +00:00
Andrew Kostka de2f5b3055 Add a combo box for suggested values in the transclusion dialog
Bug: T271898
Change-Id: Ic637eea2cac45f79234b62c787e1b76d68b61570
2021-04-08 16:10:22 +02:00
Bartosz Dziewoński fb32aa4978 Revert incorrect changes to ve.ui.MWBackCommand that made it stop working
This would would be correct if it was in a method of ve.ui.MWBackTool,
but this is actually a different class ve.ui.MWBackCommand (they are
both in the same file), which doesn't have a 'toolbar' property.

This partially reverts commit 4984c5ffbb
"Avoid using mw.ArticleTarget methods on global ve.init.target in tools".

Bug: T279613
Change-Id: Ia5e80e34cc5021295639cf18b3c324d2821aecf5
2021-04-08 15:37:46 +02:00
libraryupgrader c57080334e build: Updating eslint-config-wikimedia to 0.20.0
Change-Id: I5bc53208e31a20822d337d3c01ece358c0985e43
2021-04-08 06:54:47 +00:00
Translation updater bot e908f6173c Localisation updates from https://translatewiki.net.
Change-Id: Ib8d6380b6eb465eb992ef38431d1850382a46fdc
2021-04-08 08:41:22 +02:00
Bartosz Dziewoński a431099e0d Update VE core submodule to master (83f89605d)
New changes:
52bdd0c50 Localisation updates from https://translatewiki.net.
b216cda55 Ignore missing matrix cell when importing
ffc1881e8 DiffElement: Add CSS for <code> tag
6b9297f01 Apply monospace,monospace font size fix to <code> tags
4639185b0 Add extra check for annotation node height

Bug: T261992
Bug: T262842
Bug: T277211
Change-Id: I42434f9e8dd68b7dcd115bf22d984ed4ad3e6796
2021-04-08 00:30:59 +02:00
Bartosz Dziewoński 1abb5a5786 Add command to insert non-breaking space
Triggered by Ctrl+Shift+Space on PC.

On Mac, there is no trigger, we rely on the built-in OS shortcut.

Bug: T53045
Change-Id: I9630804c833d755910589022b0ca78208337d804
2021-04-08 00:09:35 +02:00
Translation updater bot bc5a2846d9 Localisation updates from https://translatewiki.net.
Change-Id: I2da8905ac835933d6ee800e61b52b3496993171b
2021-04-07 08:52:55 +02:00
Translation updater bot d81c739426 Localisation updates from https://translatewiki.net.
Change-Id: I63cab53777e1a2be8c46a13cf1c9d822ee455516
2021-04-06 12:03:42 +02:00
Umherirrender ac5bd772a9 build: Remove unneeded @codingStandardsIgnore
line length was increased to 120 in 31.0.0

Bug: T278594
Change-Id: Ie5b28a7bfd5c9f795978d0773b02e080d9fe44a7
2021-04-03 21:41:58 +00:00
jenkins-bot 8fb68f49a1 Merge "Avoid using mw.ArticleTarget methods on global ve.init.target in tools" 2021-04-03 12:59:18 +00:00
jenkins-bot 39800a107d Merge "Replace use of deprecated CSS class 'mw-ajax-loader'" 2021-04-03 12:52:21 +00:00
Translation updater bot ba99a26760 Localisation updates from https://translatewiki.net.
Change-Id: Ic0e41a7a87f2047b9d9584840732f3443babbd2d
2021-04-02 09:49:36 +02:00
jenkins-bot 0c1fcacbd4 Merge "Avoid using User::setOption()" 2021-04-02 02:16:14 +00:00
Translation updater bot a9a1a278fe Localisation updates from https://translatewiki.net.
Change-Id: Ie24cc3aa148a97d50e315b23ca346cc9151258c8
2021-04-01 08:38:22 +02:00
Bartosz Dziewoński 959296df38 Update VE core submodule to master (5d0701ea3)
New changes:
5d0701ea3 Detect NBSPs being inserted deliberately by IMEs

Bug: T53045
Bug: T96701
Change-Id: Ifb0673c856a12a09c764b9ad3135fc36ae7f6b8f
2021-03-31 23:58:12 +02:00
Bartosz Dziewoński e04f78d48a Replace use of deprecated CSS class 'mw-ajax-loader'
Bug: T278894
Change-Id: I100bbe06da198f5175366c25b74daf3af986aae3
2021-03-31 20:46:58 +02:00
ZabeMath 3bd0f02ac2 Avoid using User::setOption()
User::setOption() is deprecated and should be replaced with UserOptionsManager::setOption()

Bug: T277818
Change-Id: I7395a8620064dcbe019b92feba17d9c9996ffbb7
2021-03-30 21:47:04 +00:00
Bartosz Dziewoński 4984c5ffbb Avoid using mw.ArticleTarget methods on global ve.init.target in tools
Bug: T278399
Change-Id: I49475db2aa014ef4807ff55755c1b773e6aa0e6a
2021-03-30 15:27:54 +00:00
Translation updater bot eac3da0889 Localisation updates from https://translatewiki.net.
Change-Id: Iecc3ffd7bab13db27b83dc14c1904a57542cbf97
2021-03-30 08:34:14 +02:00
Bartosz Dziewoński c3637fc233 Update VE core submodule to master (5196ceb1f)
New changes:
d20e04511 TreeModifier: Ignore 'originalVariantInfo' when validating linear data
5196ceb1f Localisation updates from https://translatewiki.net.

Bug: T278064
Change-Id: I6028c0d3e2d35373f05f9d804d6b086e6bc01214
2021-03-29 22:22:04 +02:00