Commit graph

2659 commits

Author SHA1 Message Date
jenkins-bot 9b6b58ae43 Merge "Realtime Preview: Move loading bar to be a proper element" 2022-04-13 19:46:59 +00:00
Sam Wilson f5f39d41d4 Realtime Preview: Move loading bar to be a proper element
Change from a pseudoelement ::before the left pane, to its own
element. This is so that when we introduce the top manual-reload
bar the blue bouncing loading bar can be shifted down below it.

Also moves the CSS out of TwoPaneLayout.less and into
RealtimePreview.less where it more properly belongs.

Bug: T304568
Change-Id: I540f68d528d92b7db8594d729985e5dad3d90ac1
2022-04-13 19:08:23 +00:00
Translation updater bot b9e516e646 Localisation updates from https://translatewiki.net.
Change-Id: I2c392b4564f9ee2a42313fd671401d701f972c6c
2022-04-13 08:33:06 +02:00
Translation updater bot 85098ce2ed Localisation updates from https://translatewiki.net.
Change-Id: Ibe2a27d135939f00001902ff981d69d4e9bd2039
2022-04-12 08:15:10 +02:00
Translation updater bot c124ea606c Localisation updates from https://translatewiki.net.
Change-Id: I63274e7001cb244603e442179825ad1ea84aba9a
2022-04-11 08:14:53 +02:00
Translation updater bot 7341a30e1a Localisation updates from https://translatewiki.net.
Change-Id: Ieb2e00cc8420089eaa511699f0f9785072c1a73e
2022-04-08 08:28:39 +02:00
Translation updater bot 5dcf8253e4 Localisation updates from https://translatewiki.net.
Change-Id: Icd387853d9ca4904cba9bb90d098ed79f26554a2
2022-04-07 08:10:18 +02:00
jenkins-bot 595d9ac447 Merge "Realtime Preview: Refactor event handler for easier re-use" 2022-04-07 03:00:44 +00:00
MusikAnimal b8bdd64ee5 Realtime Preview: add as a Beta Feature
For MW installations where BetaFeatures is not available, Realtime
Preview is enabled solely with the $wgWikiEditorRealtimePreview
configuration setting.

Bug: T304596
Change-Id: I880022883bf526a2aef237f4a75e790b0f9bd4e5
2022-04-06 13:45:44 -04:00
Sam Wilson 981a9c762a Realtime Preview: Refactor event handler for easier re-use
Instead of exposing a way of adding event listeners, just expose
the event handler and let consumers (i.e. CodeMirror) add it
to whatever events it wants.

Bug: T303767
Follow-Up: I8c8c25fe56be55a61f4b8d1d2ef8cf74483aa241
Change-Id: Iee4c885f92dd9ec985a3f9fd92a2fafc00f2e9ff
2022-04-06 13:25:12 +08:00
jenkins-bot 8954cb96cd Merge "Add event logging for Realtime Preview enabling and disabling" 2022-04-04 20:39:08 +00:00
Translation updater bot 59d1aac091 Localisation updates from https://translatewiki.net.
Change-Id: Ifefedb00fbc5354ee2ef1dd0d74bea10e8103dc8
2022-04-04 09:35:26 +02:00
Sam Wilson 119f25e424 Add event logging for Realtime Preview enabling and disabling
Add two new actions for the 'preview' feature:

* preview-realtime-on – The WikiEditor 'Preview' toolbar button
  was clicked to turn the preview panel on.
* preview-realtime-off – The WikiEditor 'Preview' toolbar button
  was clicked to turn the preview panel off.
* preview-realtime-inuse – Fired without user interaction when the
  WikiEditor preview feature is already on when the editing form is
  opened.

This also adds a new hook for the last of these to use and to match
the enable/disable hooks.

Bug: T298218
Change-Id: I1a2545c2b0491c1d07f9508fab70967d03d61594
2022-04-04 14:25:16 +08:00
Translation updater bot 76d17a750e Localisation updates from https://translatewiki.net.
Change-Id: Iaaf73d6cbe4f0c1daaaeb0aa6c7b70914a12554f
2022-04-01 08:27:49 +02:00
jenkins-bot bb9ffaef41 Merge "Persist Realtime Preview state in a user preference" 2022-03-31 13:58:39 +00:00
Sam Wilson e6b77fb2ab Persist Realtime Preview state in a user preference
Store the current state (enabled/disabled) of Realtime Preview in
a new user preference `wikieditor-realtimepreview` and set it
when enabling or disabling the preview pane.

Bug: T294599
Change-Id: Id5f51c6d77ed0077906d5d5178cbfa785cc04dcf
2022-03-31 21:01:36 +08:00
Translation updater bot f7644064b5 Localisation updates from https://translatewiki.net.
Change-Id: I73cacacadba8a02258c0bb3899b114ad9a380c79
2022-03-31 08:36:37 +02:00
MusikAnimal fe81f28aae Add Realtime Preview vars to the virtual package's versionCallback
This should fix the caching issue we're seeing on Beta

Follow-Up: Iaf49f076c5a290ab9049267b0aede1e6b13a9136
Change-Id: Ibe2fc1b48f4ccc22138f6c16d8170a74500d68e6
2022-03-30 16:54:16 -04:00
jenkins-bot 6089bf9fa8 Merge "Realtime Preview: disable if average response time is very slow" 2022-03-30 17:20:04 +00:00
MusikAnimal f1a2ba96eb Realtime Preview: disable if average response time is very slow
$wgWikiEditorRealtimeDisableDuration is introduced which allows
sysadmins to control the average time after which Realtime Preview
should be disabled. For now, this shows a simple error message that is
intentionally not localized. In a future patch, we will force the
user into a 'manual preview' workflow. See T304568 for more.

Bug: T302282
Change-Id: I2f01eef19fe81c19efedcc0073a28884f0055359
2022-03-30 12:28:23 -04:00
Translation updater bot b801ea8087 Localisation updates from https://translatewiki.net.
Change-Id: Ica3606b56e3332f2e9a1e6211edd12884e4913ca
2022-03-30 08:18:51 +02:00
jenkins-bot 382097499f Merge "Fix dragbar direction for RTL text direction" 2022-03-29 22:45:56 +00:00
Translation updater bot 20956f0510 Localisation updates from https://translatewiki.net.
Change-Id: Iaccdfcb61cad19ca93e4bff8ee201d881e0aa3e0
2022-03-29 08:06:23 +02:00
Sam Wilson 21b36a737d Fix dragbar direction for RTL text direction
Change the sign (positive/negative) of the change amount (in pixels)
depending on whether the text direction is LTR or RTL.

Bug: T304487
Change-Id: I8f01a92e5e1094c9602d2ff334c730241193cedc
2022-03-29 11:21:21 +08:00
Translation updater bot 7fe3687128 Localisation updates from https://translatewiki.net.
Change-Id: I8827a8349c15781d328d374a8d155def5c323055
2022-03-28 08:22:26 +02:00
Translation updater bot 6f938c74b4 Localisation updates from https://translatewiki.net.
Change-Id: I9ce9d4d898bf7c41e690610aab06a3d8c0d7ca83
2022-03-25 08:35:29 +01:00
Sam Wilson cdd01171cc Log realtime preview errors to console
Bug: T303545
Change-Id: Iaa23b85eeb8d9951cbbbf350e55da006d49c84fa
2022-03-24 16:02:03 -04:00
jenkins-bot 07423d1a9f Merge "Add nicer realtime preview error messages" 2022-03-24 20:00:40 +00:00
Sam Wilson 6175e2c519 Add nicer realtime preview error messages
Add a new ErrorLayout to display error messages along with an
image.

Bug: T303383
Change-Id: I1ec27a212b5ab67d3e805c0d7756432850de89ea
2022-03-24 14:56:19 +08:00
jenkins-bot bb2072b5d2 Merge "RealtimePreview: add config setting for debounce time" 2022-03-24 06:35:44 +00:00
MusikAnimal 68e6561857 RealtimePreview: add config setting for debounce time
Change-Id: Iaf49f076c5a290ab9049267b0aede1e6b13a9136
2022-03-24 02:00:19 -04:00
jenkins-bot a80286d291 Merge "Partially revert mistake in JavaScript code optimization" 2022-03-23 08:08:54 +00:00
Thiemo Kreuz fa64decfce Partially revert mistake in JavaScript code optimization
The mistake here was that these are two different fields, but with
variable names that look very similar. Only 2 characters differ. :(

 insertLinkLinkTextField.…
 insertLinkLinkTypeField.…

Bug: T304476
Change-Id: I459133d3ba5c327e34c689ad0d3c046116f438a9
2022-03-23 08:47:19 +01:00
Translation updater bot 925887f8b4 Localisation updates from https://translatewiki.net.
Change-Id: I6b02311705da2350af3f2beef4db995c1ce96594
2022-03-23 08:25:52 +01:00
jenkins-bot 7f5f5aa658 Merge "Realtime Preview: wait for a response before making new requests" 2022-03-22 16:22:10 +00:00
Translation updater bot 6642fe9925 Localisation updates from https://translatewiki.net.
Change-Id: Id1074814fa4568dbe26969ff5036563b9e55d8e4
2022-03-22 08:30:29 +01:00
MusikAnimal 2cbf638f54 Realtime Preview: wait for a response before making new requests
If a preview is requested before one finishes, one final request is
fired off to ensure the preview is up-to-date.

Bug: T302282
Change-Id: I2399fc7cc08cd0987d2d689ca9f297db1ec5edf0
2022-03-21 21:17:26 -04:00
Translation updater bot 4b813cafa3 Localisation updates from https://translatewiki.net.
Change-Id: I99e729ef77c0e586ad56bd598ab3a303c2e43ff4
2022-03-21 08:15:42 +01:00
jenkins-bot f3a9dea20a Merge "Do not add toolbar when textbox is hidden" 2022-03-21 06:41:04 +00:00
Translation updater bot 48d9696e7d Localisation updates from https://translatewiki.net.
Change-Id: I48957edc9da4e05149e9e6edc50c624fcafe7267
2022-03-18 08:45:34 +01:00
Translation updater bot 458b17dec6 Localisation updates from https://translatewiki.net.
Change-Id: I7dde62e9ee5db7aded9afeecacfab32062de552c
2022-03-17 08:37:47 +01:00
jenkins-bot a65aaa0c6d Merge "Streamline smaller pieces of JavaScript code" 2022-03-16 20:52:38 +00:00
Translation updater bot d36f05a9ed Localisation updates from https://translatewiki.net.
Change-Id: I864345e8072818e4b525bcfce2a3d28e8dbda1cf
2022-03-16 08:08:23 +01:00
jenkins-bot b6ae231fd2 Merge "build: Update devDependencies" 2022-03-15 20:43:39 +00:00
Translation updater bot 4eb8589112 Localisation updates from https://translatewiki.net.
Change-Id: I4680f9e44776042d1e6a205d963d23c32ca293ed
2022-03-15 08:25:59 +01:00
jenkins-bot c0b0b33609 Merge "dialogInsertTable: empty preview-hidden row to hide header row when needed" 2022-03-15 06:57:15 +00:00
Pols12 eeaa229523 dialogInsertTable: empty preview-hidden row to hide header row when needed
In “Insert table” dialog, when checking/unchecking “Add header row”,
Example preview first row switches between preview-hidden and
preview-header. Previously, preview-hidden contained 3 TD cells
(while preview-header contains 3 TH cells).

This commit removes the 3 TD to hide the TH instead of replacing with
TD, since, in the generated wikitext, the header row is not included in
row count.

Bug: T303690
Change-Id: I38c1bb081a30e25875de8beaadccc075189ad397
2022-03-14 07:31:41 +00:00
Ed Sanders 930335fc0d build: Update devDependencies
Change-Id: Ibe0e5fb26ecbdf6dbf3792bbb5b53d92c88eaf20
2022-03-13 22:46:07 +00:00
Sam Wilson 411be83bc3 Add toggle button and two-pane layout for realtime preview
* Toolbar button to toggle a two-pane layout on and off.
* Resizable bar for the width of the two panes.
* Resizable bar for the edit box height, even when realtime preview is off.
* Only enabled when $wgWikiEditorRealtimePreview = true.
* Fires JS hooks when enabled, resized, and disabled.

Bug: T293347
Change-Id: Id09d44519249c0b7f5c33d48d524b7c92a5a9106
2022-03-13 07:28:01 +08:00
Translation updater bot 27020ae196 Localisation updates from https://translatewiki.net.
Change-Id: Ib8f60f24b9f6cc0ce850594a8622ea46b7e5687d
2022-03-09 08:10:21 +01:00