Commit graph

19681 commits

Author SHA1 Message Date
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
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
Translation updater bot cd913b4f18 Localisation updates from https://translatewiki.net.
Change-Id: I884506f98bb22eb0c3ac46884482c6df6edbd440
2022-09-20 08:35:03 +02:00
Alexander Vorwerk 87ff7a5fec Only die when error string is not empty
Bug: T318083
Change-Id: I21c7a2b2541061a858a9791a2cb12866acd38dc5
2022-09-19 13:25:37 +00:00
Translation updater bot 185bdb1371 Localisation updates from https://translatewiki.net.
Change-Id: I5cb12b5423304482ec3aa3a51a7cd70a6a1e9693
2022-09-19 08:26:12 +02:00
daniel 1177e677e6 Remove redundant ParsoidHelper class from VE
All code that used to live in ParsoidHelper has been moved to
VisualEditorParsoidClientFactory and VRSParsoidClient.
ParsoidHelper is no longer needed.

Change-Id: I21c4a8cd86f8d085e75a601ed6d2509dedd75d42
2022-09-15 19:23:05 +00:00
Translation updater bot 26bc9756fe Localisation updates from https://translatewiki.net.
Change-Id: I3f0cb4841f3673c74c2f871a9f43a39b2898a15b
2022-09-15 09:55:52 +02:00
daniel 0cd6c90d5a Extract RESTbase client code into VRSParsoidClient.
This makes the "direct" client and the VRS based client
implement the same interface, so the caller doesn't have to know
which one it is using.

It looks like ParsoidHelper will not be needed if we use this approach.

Change-Id: Ib1c1d7355951fc0765227dd01a9edfc554fc448d
2022-09-14 18:20:36 +01:00
Translation updater bot c09f6b2d03 Localisation updates from https://translatewiki.net.
Change-Id: I2268528fbe3f561afc6bd40fd06c5d4ab384b6a5
2022-09-14 10:32:15 +02:00
Translation updater bot 4ebdbc2487 Localisation updates from https://translatewiki.net.
Change-Id: Id72f24e0900fc2bc35f18b9f4fb1fcabb2d0101f
2022-09-13 09:26:31 +02:00
Thiemo Kreuz 003f5fc82e Remove redundant/unused CSS for template parameter page
A lot of this just repeats what is already set by some other rule,
e.g. because it is the OOUI default anyway. Warning. This patch is a
little more agressive. I tested it on desktop and mobile, even with
MonoBook, and could not spot a different. Please do some more tests.

Change-Id: I0ee6e70f4f14c20d431643c53031d6d5b8df1aa2
2022-09-12 11:32:39 +00:00
jenkins-bot f153331ee3 Merge "Remove redundant "choose" event handler" 2022-09-12 10:03:52 +00:00
jenkins-bot b3443cd96c Merge "Enable template editor toolbar deeper in the stack" 2022-09-12 09:52:26 +00:00
jenkins-bot 58aacfa046 Merge "Fix parameter labels not being clickable" 2022-09-12 09:50:04 +00:00
Translation updater bot 60e69a0841 Localisation updates from https://translatewiki.net.
Change-Id: I6e831c93427a76ba49188f173fad9f8a4a0c2317
2022-09-12 09:37:23 +02:00
Bartosz Dziewoński 412567995c Update VE core submodule to master (f3cbff8b1)
New changes:
a4ab75072 Localisation updates from https://translatewiki.net.
b1b1c2656 Localisation updates from https://translatewiki.net.
817f0d532 Use improvements of jQuery 3.3
4faef86ad Localisation updates from https://translatewiki.net.
44b501e96 Remove unused message "visualeditor-commentinspector-edit"

Local changes:
* Remove unused message "visualeditor-commentinspector-edit"

Change-Id: Ib22ff31137f62943d01b7c1daf3f0ea1bc6c9536
2022-09-10 06:53:55 +02:00
Translation updater bot 6c31c28a11 Localisation updates from https://translatewiki.net.
Change-Id: I8f2be21444913f86be49f7136151281f419b63ab
2022-09-09 10:11:04 +02:00
jenkins-bot 5d24bea80a Merge "Start with last item when shift+tabbing into parameter list" 2022-09-08 12:40:40 +00:00
jenkins-bot ee9866bfc9 Merge "Make "(undocumented parameter)" part of the parameter label" 2022-09-08 11:52:52 +00:00
Translation updater bot bd173ad476 Localisation updates from https://translatewiki.net.
Change-Id: I37351c6027bc65b7400bcfee32fd02f653c3cfa9
2022-09-08 10:00:12 +02:00
Translation updater bot 948773fd15 Localisation updates from https://translatewiki.net.
Change-Id: I3f3acd353c4cfcc1ba484374a17f7f7e25341bb7
2022-09-07 09:55:25 +02:00
jenkins-bot 47cba98037 Merge "Improve some API param docs and validation" 2022-09-06 22:40:13 +00:00
jenkins-bot b00c52556b Merge "DesktopArticleTarget.init: Get $targetContainer after jQuery ready" 2022-09-06 22:17:23 +00:00
Derick Alangi 8bfe88b8b1 ParsoidHelper: Make VisualEditorParsoidClientFactory required
In order to make this interface cleaner and not promote the
use of optional parameters when not needed, make the factory
required so that callers should worry about it and not overwork
the helper.

In this case, DiscussionTools extension is already using this
interface and has the factory injected appropriately.

Depends-On: If682af406c0fc7a9eca106eb3ebd95e6c14baddd
Change-Id: I836c0ad73687d8b99d1e067a5c3a3e512b4bd37a
2022-09-06 21:44:29 +01:00
Derick Alangi 8c458e78b4 ParsoidHelper: Remove unnecessary $config
Getting the correct client is now done via the VisualEditorParsoidClientFactory
so this is no longer needed. Follow-up of: I787c0afb227308aab56770d.

Depends-On: I4b9e7362a1bf1b4f224c8c652d40851a18c19824
Change-Id: I175aef2326a0d784fb8211542a3fe90cbf6c6d08
2022-09-06 12:05:39 +00:00
Derick Alangi b029fd8ede Introduce VisualEditorParsoidClientFactory
This patch introduces a factory service for creating VE Parsoid
clients.

NOTE: This patch also injects a GlobalIdGenerator to the client
 and avoids usage of deprecated UIDGenerator class.

Change-Id: I787c0afb227308aab56770d14d62e08eb0084a6c
2022-09-06 12:47:43 +01:00
Translation updater bot df2309bd9f Localisation updates from https://translatewiki.net.
Change-Id: I85d94f1eb1aab3293c3da1ed220bc24bbfabcbeb
2022-09-05 10:12:21 +02:00
Jon Robson ecfc3f18e4 DesktopArticleTarget.init: Get $targetContainer after jQuery ready
$targetContainer was calculated at the top of the file,
but it's only guaranteed to be available after jQuery ready event.

Bug: T314952
Change-Id: Id5d0c71433bfc51cb7193ee1b931a7dd8a4324d9
2022-09-04 02:43:19 +02:00
Bartosz Dziewoński 0ade4be5b6 Restore the $oldid condition for funny ETag logging
Follow-up to 951348dbbf. When creating a
new page on a RESTBase wiki, ETag is actually expected, but it will be
in a different format; the code comment was wrong.

Bug: T316969
Change-Id: Ia36488616ced70b900d2e67ce8e28993cc2c7514
2022-09-03 05:06:44 +02:00
Bartosz Dziewoński 6f3de6d7f0 Improve some API param docs and validation
Change-Id: Ic1319f82e581b1a3c2108ab32449ce75aa187831
2022-09-02 04:20:41 +02:00
jenkins-bot 4687e27ffa Merge "Fix logic for getting the *available* preferred editor" 2022-09-01 20:41:25 +00:00
Ed Sanders a625d0b7b7 Fix logic for getting the *available* preferred editor
Factor out getAvailableEditPageEditor from getEditModeFromUri
and use instead of getEditPageEditor everywhere.

Bug: T316776
Change-Id: I34bab092b829124c52f8bc0e262a9c3aa17f2c52
2022-09-01 22:25:53 +02:00
Ed Sanders 35138e00be DesktopArticleTarget: Fix popstate handling when action=edit (single edit tab)
This means if you load the editor on a single edit tab wiki,
then press back then forward, the editor will re-open.

Bug: T316869
Change-Id: I1ea33de7d7324a53399be9155c474a14ae21dfe8
2022-09-01 14:56:05 +01:00
Translation updater bot 3b0a4c60ae Localisation updates from https://translatewiki.net.
Change-Id: I86ceeb77df14a063f764ef6c0918ea8c55526468
2022-09-01 09:35:09 +02:00
Ed Sanders 45b36ad683 Fix broken history management in onEditSectionLinkClick
This code is supposed to be similar to the code in activatePageTarget()
however it was checking if the *link* URL looked like a veaction link,
not the view URL. It also then tried to push this.href as the new state
which was always undefined. This meant:
* If the section edit link was veaction= then nothing happened. The URL
  in the address bar would get updated *after* the editor loaded by code
  in DesktopArticleTarget.
* If the section edit link was edit= (single edit tab wikis) then the
  view URL would get replaced with and edit URL, meaning if you browser-
  backed out of the editor, the URL was stay as the edit URL.

Bug: T316771
Change-Id: Idb5e3c51a22361e0d9916d3c31444daeff310ed2
2022-08-31 13:57:02 +01:00
Translation updater bot 5eef7c3036 Localisation updates from https://translatewiki.net.
Change-Id: Ic25644afabb8deb1993c36c83fc29896fa99b1de
2022-08-31 09:36:04 +02:00
jenkins-bot 736cca3a18 Merge "DesktopArticleTarget: Set wgPostEdit when redirecting after save" 2022-08-30 22:26:58 +00:00
Bartosz Dziewoński c047b7f098 Update VE core submodule to master (059f7d91d)
New changes:
b2817d12a Localisation updates from https://translatewiki.net.
a26f98f7b Don't enforce alphabetical order in i18n files
693d4f78d ve.ce.Surface: Fix scope typo in middle-click paste handling
882af5d8a ve.ce.Surface: Preserve internal paste data when doing fake middle-click paste

Bug: T315065
Bug: T316054
Change-Id: I3d13da9f45c8fe387181f1d236e1e053c184b918
2022-08-30 22:31:15 +02:00
jenkins-bot 182eb7340e Merge "Fix calling order in template dialog .getSetupProcess()" 2022-08-30 13:28:51 +00:00
Thiemo Kreuz 663936ab6e Fix calling order in template dialog .getSetupProcess()
This fixes two issues:
1. .initializeAllStickyHeaderHeights() is now executed after the
   .ve-ui-mwTransclusionDialog-single-transclusion CSS class is set.
   This is critical because in this mode the sticky header does
   have a different height.
2. We get rid of 2 references to .sidebar that should not have been
   in this class in the first place.

Also bring some more calls in an order that makes sense. This does
not make a difference and is only for readability.

Bug: T315292
Change-Id: I22f6c11de8f693edb03485adcaa186bd4b283b2f
2022-08-30 14:20:42 +02:00
Thiemo Kreuz 337ee1588e Remove redundant "choose" event handler
I'm pretty sure this extra call is just pointless. This "choose"
event is triggered every time a new parameter is added to the list of
parameters. But there is another code path that is triggered in the
exact same situations: the onReplacePart event handler.

As far as I remember this "choose" handler was added very early when
the other events haven't been implemented yet.

This should be fairly easy to test. The only situation where this
could make a difference is:
1. When you have a template with 3 parameters and you add a 4th
   parameter.
2. When you edit an existing multi-part transclusion that contains a
   lot of parameters, but the parameters are initially hidden. The
   widgets are only created when you click "show all" or start
   searching.

Change-Id: I59e3873a4fe6fa5a01d681fce89fbe00756ae815
2022-08-30 12:23:07 +02:00
Thiemo Kreuz e5d6af728e Add missing call to .recalculateStickyHeaderHeight()
This was missing when you:
* Insert a new template and select a template with a lot of
  parameters.
* Same when you edit an existing multi-part template and add a new
  part (Ctrl+D) with many parameters.

Bug: T315292
Change-Id: Icd281c21a1b40d8e29343fa4975e27e8d927cd15
2022-08-30 11:57:23 +02:00
Translation updater bot 75ba4b9bcd Localisation updates from https://translatewiki.net.
Change-Id: Ifda2701f04d66e4eea570b50d3b4799ceacfc303
2022-08-30 09:31:00 +02:00
Thiemo Kreuz d92da786a2 Fix parameter labels not being clickable
This is only an issue when a long parameter description is collapsed.
The float is a left over from a time when there was a delete button
on the right side of each parameter label. This is gone.

Bug: T310137
Change-Id: I249f0592de9c73a07af22bd7f86241caf0207770
2022-08-29 17:12:28 +02:00
Thiemo Kreuz 299738307e Make "(undocumented parameter)" part of the parameter label
This makes it possible to click on "(undocumented parameter)"
to focus the input field – the same effect as when clicking the
parameter name.

This also lower-cases the initual "(U…". This is not the beginning of
a sentence.

Change-Id: Ibfa5bbaee39c2b3a4fefbcee33102b85ca3ba9c0
2022-08-29 17:00:23 +02:00