Commit graph

19874 commits

Author SHA1 Message Date
daniel 92e52d0bad Remove AutoConfig setting
AutoConfig was used to set VE to call internal REST API endpoints exposed by the parsoid extension.
With DirectParsoidClient available, this is no longer needed.

NOTE: this causes all wikis that do not have a RESTbase backend
configured to start using DirectParsoidClient. This is true in
particular for officewiki and labswiki.

Bug: T320704
Change-Id: Ia4c6184dd75a653c3202ea160b6605335f36f6eb
2022-10-14 10:55:53 +02:00
Translation updater bot 307f5c376b Localisation updates from https://translatewiki.net.
Change-Id: I66c92f482653fa924ef4d0e9cc18f8944316f377
2022-10-14 08:43:25 +02:00
daniel 07afdba500 Don't try to contact RESTbase directly when in PHP direct mode.
If VE is configured to call parsoid directly in PHP, the client
should not try to fetch HTML from restbase. Doing so will
lead to inconsistencies, and may cause edits to fail.

Bug: T320704
Bug: T320703
Change-Id: I98bfdd305dcd188d91db6a8fe5885156cdeca7db
2022-10-13 11:22:52 +00:00
Translation updater bot 09555e4315 Localisation updates from https://translatewiki.net.
Change-Id: I4834936506b2b9e511a2e4da1a10ef287a201a9b
2022-10-13 08:10:11 +02:00
jenkins-bot a87f9882c0 Merge "Local implementation of ParsoidClient (DirectParsoidClient)" 2022-10-12 20:50:20 +00:00
Željko Filipin e63bedb988 selenium: Content editable should insert a table
Bug: T296187
Change-Id: Ic0395637690a40a9b6f889072f80b56e5f02390c
2022-10-12 16:00:25 +02:00
jenkins-bot a34d75f633 Merge "selenium: Move code to beforeEach and afterEach hooks" 2022-10-12 11:42:23 +00:00
daniel 35cb550747 Local implementation of ParsoidClient (DirectParsoidClient)
* DirectParsoidClient makes use of parsoid directly for performing
transformations on both wikitext and/or HTML contents.

* Also, it's used to fetch HTML from parsoid's parser cache. Before,
this operation was done via RESTBase but now it's being fetched in
core's parsoid parser cache.

* This patch also enables VE clients to transform HTML to
Wikitext when switching from HTML to source mode on. It
makes use of the HtmlInputTransformHelper to perform this
transformation.

* Now, VE client can make use of core code for switching
between HTML to source mode and back without RESTBase.

Change-Id: I5c7cfcc4086d8da7905897194d8601aa07418b59
2022-10-11 18:34:06 +01:00
Bartosz Dziewoński d2e49b16f7 Use RevisionLookup methods instead of ApiParsoidTrait methods
Part of my secret plan to delete ApiParsoidTrait.

* Inject RevisionLookup into ApiVisualEditor
* Use RevisionLookup::getRevisionById instead of ApiParsoidTrait::getValidRevision
* Use RevisionLookup::getRevisionByTitle instead of ApiParsoidTrait::getLatestRevision
* Use standard MediaWiki error messages
* Delete unused ApiParsoidTrait::getValidRevision
* Delete unused ApiParsoidTrait::getLatestRevision

Depends-On: I7244ee4916fb011fad5faa1d9f837e83f6ac2dc1
Change-Id: I8089c0c516d9dba52e931a0a80740c0361216dbd
2022-10-11 14:54:40 +00:00
Translation updater bot 80504b2c03 Localisation updates from https://translatewiki.net.
Change-Id: Ife6a6cf66ded6188dc69455a3ce887105f2b7da9
2022-10-11 09:17:46 +02:00
Esther Akinloose 529f004fc6 selenium: Move code to beforeEach and afterEach hooks
Bug: T296187
Change-Id: Iad8482e432491895eac070692fd3448e6362e4ce
2022-10-10 14:36:33 +01:00
Translation updater bot 7b1a6c987c Localisation updates from https://translatewiki.net.
Change-Id: I3789a38b0117a506953adee06c69cb4af131684d
2022-10-10 10:21:38 +02:00
Daimona Eaytoy 16ae2da19a build: Update mediawiki/mediawiki-phan-config to 0.12.0
Change-Id: Ib527ec60ac7894d28e330b7080f0e3b0a2b3ddfc
2022-10-08 02:45:31 +02:00
Bartosz Dziewoński 2b37b479ea Update VE core submodule to master (5dcc0f107)
New changes:
878ebf301 Localisation updates from https://translatewiki.net.
b56ad2792 Localisation updates from https://translatewiki.net.
a3a861bae Localisation updates from https://translatewiki.net.
754ee73dd Fix transformStyleAttributes tests on Firefox on Windows
5dcc0f107 build: Upgrade various devDependencies to latest and make pass

Bug: T319520
Change-Id: I3fa0175b69b6a97835c7edb856e4ab0af4cb61cc
2022-10-07 11:16:24 +02:00
Translation updater bot 2c7876eeb1 Localisation updates from https://translatewiki.net.
Change-Id: I4614e2bb87d3b372a1816878de707b80e839856b
2022-10-06 08:16:32 +02:00
Translation updater bot 78612067c1 Localisation updates from https://translatewiki.net.
Change-Id: If2ea8076d668f76d00b34da72c6732480ca46e91
2022-10-05 08:25:26 +02:00
daniel 7f9573f994 api-testing: Add assertions to e2e tests
This adds assertions for the return values of the following pactions:
metadata, parse, parsefragment.

It also adds a test that asserts that edits are not possible with
an invalid token.

Change-Id: Idb453d3561a46930afb5366c1a96787895fc8e40
2022-10-04 19:36:39 +00:00
Translation updater bot 1de359e7eb Localisation updates from https://translatewiki.net.
Change-Id: Iab6b37758543ee81cadb6cbc3c39f5431c501e81
2022-10-04 08:30:22 +02:00
Derick Alangi 1746b76129 ApiVisualEditor: Remove parsedoc VE paction
This VE paction was removed in I90d775dd71d5f5a61d651b63d946ab60a27e2ca3
so this code can be deleted per Bartosz, so this patch removes the code.

NOTE: A merged API test that uses this is also removed along side.

Change-Id: I4ff75df57fd58f508ef7212486e52cb11a7cfb57
2022-10-03 14:12:35 +01:00
Translation updater bot 5c5673bc2b Localisation updates from https://translatewiki.net.
Change-Id: I6fc288a7b158f9d5ca463d5b32a279af9f1ae8ef
2022-10-03 09:46:46 +02:00
Translation updater bot a509020bee Localisation updates from https://translatewiki.net.
Change-Id: If9817782dfbd79ec98cde40ee8c7d3069063c30a
2022-09-30 08:55:15 +02:00
Emeka Chukwukere 2749611071
api-testing: Add more visualeditoredit e2e tests
This patch adds more tests covering the `visualeditoredit` action
API.

Change-Id: I3a20afdb4a146672e272a87eafe8203c384e3405
2022-09-30 00:16:28 +01:00
Emeka Chukwukere db6cc66749 api-testing: Add test for creating and saving a page
Testing the visualeditoredit action API for VisualEditor.

Change-Id: I951ecf1c71e2ee66e3d1fc15a29b312b8fe9956e
2022-09-29 21:23:59 +01:00
jenkins-bot 77565dabf3 Merge "De-duplicate replacePageContent methods between desktop and mobile" 2022-09-29 14:00:00 +00:00
jenkins-bot 2cbf2470dd Merge "ve.init.mw.DesktopArticleTarget: Fix double <div class="mw-parser-output"> after saving" 2022-09-29 13:38:40 +00:00
Translation updater bot ba17184845 Localisation updates from https://translatewiki.net.
Change-Id: I459fcd72595dc72c3b38926ca1df46d33882385f
2022-09-29 08:28:30 +02:00
jenkins-bot 9331cf6c38 Merge "ApiParsoidTrait: Remove unused abstract method dieStatus" 2022-09-29 00:50:39 +00:00
Bartosz Dziewoński 78207ee45d Update VE core submodule to master (6b9937c19)
New changes:
945ca158b Localisation updates from https://translatewiki.net.
42ce721c8 build: Update language lists
dfeda8a1a Localisation updates from https://translatewiki.net.
d0d5771cb Localisation updates from https://translatewiki.net.
0b78ead3f build: Update language lists to add 'mrh'
13d8c8d4f Fixup Chromium's native Enter behaviour on Android Gboard
37bdbb860 Localisation updates from https://translatewiki.net.
6b9937c19 Update OOUI to v0.45.0

Bug: T312558
Change-Id: Icfb0c6f4e70ffd53533d3f0e8cf40ca43b3d8663
2022-09-29 01:28:40 +02:00
Ed Sanders 1992281c82 De-duplicate replacePageContent methods between desktop and mobile
Change-Id: Icab82207d516843e7f2e4ba93b8ea4ffea7cad1b
2022-09-29 01:20:55 +02:00
Bartosz Dziewoński db82eb0263 ve.init.mw.DesktopArticleTarget: Fix double <div class="mw-parser-output"> after saving
Follow-up to 327bd736c5. .html()
replaces the inner HTML, .replaceWith() replaces the outer HTML.

Change-Id: I3c963c0a54f5aee4179c37a87466dffceb8c6a87
2022-09-29 01:15:13 +02:00
jenkins-bot d58d1ed036 Merge "Add basic end-to-end tests for action=visualeditor" 2022-09-28 16:48:33 +00:00
Emeka Chukwukere 5b5ed387c9 Add basic end-to-end tests for action=visualeditor
Bug: T318403
Change-Id: I7a607edc69d8fcf51a634ce0f536548979eef95b
2022-09-28 18:28:05 +02:00
Bartosz Dziewoński 8418686893 ApiParsoidTrait: Remove unused abstract method dieStatus
No longer needed after 1177e677e6.

Change-Id: Ie77ff40c6c98208e99efe151ec18544644a3c9b4
2022-09-28 16:00:24 +00:00
Ed Sanders b8bb53b79d ArticleTarget: Only overwrite title when not loading from view page
The previous implementation tried to do this, but looked
at the query string which can be set to action=edit by VE.

Bug: T318772
Change-Id: I4f0f8d52488a6b259033232afb8ea616458275de
2022-09-28 16:44:35 +01:00
Translation updater bot 50c6aa8c01 Localisation updates from https://translatewiki.net.
Change-Id: I570e749eee9827e540bb1aa1d9e55c7b9cbc37d0
2022-09-28 08:23:17 +02:00
jenkins-bot b0b3ab59ec Merge "Add api-testing script to package.json" 2022-09-27 18:11:54 +00:00
Thiemo Kreuz 4ca12d6555 Use same formatting for "Parameters:" in qqq.json
Change-Id: I236a8c360a141e68a079f9dd6878e930332ed856
2022-09-27 16:49:13 +00:00
daniel 1c7468191b Add api-testing script to package.json
The test file is just a placeholder for now, so we can enable the CI job.
Actual tests will follow in a separate patch.

Bug: T318403
Change-Id: I8105f49f8898c8ebfd80eb898d30a49e58db5b25
2022-09-27 13:15:39 +00:00
jenkins-bot f55aa3c9fa Merge "ParsoidClient: Fix getPageHtml() $targetLanguage param inconsistencies" 2022-09-27 08:16:36 +00:00
Translation updater bot fc265cef49 Localisation updates from https://translatewiki.net.
Change-Id: If77c6f4664af13e977035761f9f6698573970d27
2022-09-27 08:32:55 +02:00
jenkins-bot 05de858d9c Merge "Follow-up Ieba322fd: Don't generate postedit notification now we set config var" 2022-09-26 22:17:24 +00:00
Bartosz Dziewoński 209aaf6943 ParsoidClient: Fix getPageHtml() $targetLanguage param inconsistencies
* DirectParsoidClient: Actually allow null to be provided.
  Previously we tried to call methods on it unconditionally.

* VRSParsoidClient: Require the param to be provided (even if null).
  No reason to diverge from the interface, which requires it.

Change-Id: Id9a450dc8b8eb3e82cf87718b96975e5a3c6180c
2022-09-26 22:52:31 +02:00
daniel 0d833c3de1 ParsoidClient: rename language parameter
The language parameter in the ParsoidClient is always the desired output
language.

Change-Id: I10bec964b16fb041d5acfc63f38511e545adafc4
2022-09-26 22:46:22 +02:00
Ed Sanders 596575582c Follow-up Ieba322fd: Don't generate postedit notification now we set config var
Setting the config var then loading mediawiki.action.view.postEdit
will already trigger the notification code, so we can remove this
duplicated code now.

Bug: T240041
Change-Id: If0d1aa4e734dab7cca168e78216f229b9924bab7
2022-09-26 12:08:54 +00:00
Translation updater bot 571b2a2cba Localisation updates from https://translatewiki.net.
Change-Id: Ib577f29030525d628bc0c629e50c2ee2b80c78b8
2022-09-26 08:16:44 +02:00
Translation updater bot 944a2b3cf1 Localisation updates from https://translatewiki.net.
Change-Id: I865f2f749a9065448ba5036d1668c605311b37ab
2022-09-23 08:30:29 +02:00
Translation updater bot 62fa3a1903 Localisation updates from https://translatewiki.net.
Change-Id: I53228cb2c3236df742edf70af600b5110a02fa13
2022-09-22 08:47:41 +02:00
jenkins-bot 03df8cc15d Merge "ParsoidClient: error should be array or null" 2022-09-21 15:03:28 +00:00
Translation updater bot 095d462165 Localisation updates from https://translatewiki.net.
Change-Id: Iceccacde27b4a33554e9a817cb9c873a656588fd
2022-09-21 08:30:02 +02:00
daniel 4c1ec8fc40 ParsoidClient: error should be array or null
This follows up the initial fix with additional sanitation and a
regression test. See I21c7a2b2541061a858a9791a2cb12866acd38dc5.

Bug: T318083
Change-Id: I4e433e711c068336a888f4aafa243455764fd710
2022-09-20 21:05:51 +02:00