Add a 'reload' button to the right-side preview pane (that shows
on hover, and stays in the same place when the preview is
scrolled), and also an accesskey to trigger the preview. If the
preview is not open when the accesskey is pressed, it'll be
opened.
Bug: T303532
Change-Id: Ifa77ad7cf6d2ed6a8b955f9a324986d1c6f9a993
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
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
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
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
$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
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
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
* 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