Commit graph

2995 commits

Author SHA1 Message Date
jenkins-bot 8840c90692 Merge "tests: Remove use of QUnit 1.x setup()/teardown()" 2022-05-04 11:34:43 +00:00
jenkins-bot 6a91c1f3ea Merge "Realtime preview: improve toolbar button style" 2022-05-04 11:31:57 +00:00
Translation updater bot 8c3608cb25 Localisation updates from https://translatewiki.net.
Change-Id: Ia52c284389d86c951aa4f69cbb96a43c4829134d
2022-05-04 08:19:07 +02:00
Sam Wilson 9921163d54 Add JSDoc configuration and test
Bug: T307415
Change-Id: I770677608b5d2e4532528467d1c4141019dd01e4
2022-05-03 15:28:02 +08:00
Translation updater bot c23c11ae75 Localisation updates from https://translatewiki.net.
Change-Id: I1f378bb447f2303cc913bfc1aa72ecf9a6eb1da4
2022-05-03 08:45:56 +02:00
Sam Wilson 42192e75c9 Invert RealtimePreview.setEnabled parameter meaning
To make it clearer that setEnabled(true) enables the feature, and
setEnabled(false) disables it, invert the function of the first
parameter. Also improve jsDoc parameter documentation.

Follow-up: I4615f629a0c97fb325721bbddee5c9eb074c3a5c
Change-Id: Icb84bcf0624774b9a7002110f1fac31bf48ebd1d
2022-05-03 13:18:05 +08:00
jenkins-bot 43d15ff91e Merge "Realtime preview: disable preview when screen is small" 2022-05-03 02:49:36 +00:00
Timo Tijhof 17fec690b0 tests: Remove use of QUnit 1.x setup()/teardown()
No longer supported upstream. Was kept compatible via MW core
testrunner.js, which I'd like to phase out so that our custom wrapper
can be removed, and thus other features like `QUnit.module.skip()`
become available.

While at it, also convert the file from an ad-hoc closure to using
the QUnit.module() scope and hooks object, as per
<https://api.qunitjs.com/QUnit/module/>.

Bug: T250045
Change-Id: I8c04c56cf5eec3f19ef12a803a192cd824b82f81
2022-05-03 01:22:12 +02:00
hmonroy 090929cf1d Realtime preview: disable preview when screen is small
Disable preview functionality when screen is less than 600px.

Bug: T293337
Change-Id: I4615f629a0c97fb325721bbddee5c9eb074c3a5c
2022-05-02 15:26:20 -07:00
Translation updater bot 9fa65ba1ed Localisation updates from https://translatewiki.net.
Change-Id: I2ac71dd6ce2e1bbda58116cef83a147e7bb0b25a
2022-05-02 08:20:39 +02:00
Translation updater bot 9def93705d Localisation updates from https://translatewiki.net.
Change-Id: I815ffdc99d1540f2703bbf53696c925f2e9c52f6
2022-04-29 08:44:07 +02:00
jenkins-bot e7e3522ed6 Merge "Realtime preview: don't show reload button on error message" 2022-04-27 11:18:14 +00:00
Translation updater bot 0e1ca8124d Localisation updates from https://translatewiki.net.
Change-Id: I7f909904d39900b41f4f4a48539154d86f4dd7cd
2022-04-27 08:08:54 +02:00
Sam Wilson 37836d7fcc Realtime preview: don't show reload button on error message
When the error layout is shown, hide the hover reload button,
and only re-show it if the preview is successful.

Bug: T306866
Change-Id: I5e72295069ee9e8279c5786c3959db5902da0e25
2022-04-26 16:23:51 +08:00
Sam Wilson 3ab9a863a2 Realtime preview: improve toolbar button style
* Add hover and active styles to match normal toolbar state styling.
* Move border from right to left on `.section-secondary .group`.
* Add a skinStyle for MonoBook so it doesn't get the button style,
  because it provides its own.

Bug: T303991
Change-Id: I6f08906156a9768729d779b6c50c9e804f51fb98
2022-04-26 15:08:28 +08:00
Translation updater bot 45a8a077b1 Localisation updates from https://translatewiki.net.
Change-Id: I271d026b9b1ab86da3308e1b63ea68a49aa90cec
2022-04-25 08:19:25 +02:00
jenkins-bot 06cda6ee49 Merge "Remove all unused "loading" code, messages and animations" 2022-04-22 16:15:39 +00:00
Translation updater bot cea6217c7c Localisation updates from https://translatewiki.net.
Change-Id: I7a5f0eea08288b2814001528c662d4c433bb39fa
2022-04-22 08:23:58 +02:00
jenkins-bot fd701e2f5f Merge "Disable the realtime preview reload button during loading" 2022-04-21 15:06:01 +00:00
Thiemo Kreuz 7573a7dbad Remove all unused "loading" code, messages and animations
The CSS was already unused when the extension was created in 2010.
A comment that still mentioned the CSS class was removed via
I0798864 in 2022.

The message is unused since I9fb7e66, that was in 2021.

Change-Id: I25cd31efc4ee61ff3f857c280b5cd18c3ae4bd00
2022-04-21 15:29:15 +02:00
Translation updater bot 8ec5192822 Localisation updates from https://translatewiki.net.
Change-Id: Icbd21bd5c091650d3dcfe35ef5d87c856e32fe37
2022-04-21 08:12:50 +02:00
Sam Wilson a8833fcd3b Disable the realtime preview reload button during loading
Make the reloadButton into a class member so that it's
accessible in doRealtimePreview().

Bug: T304568
Change-Id: I81c1870becd81884894353921f878653cd690d7a
2022-04-21 11:16:54 +08:00
Sam Wilson 84b41f07be Reduce $wgWikiEditorRealtimeDisableDuration from 10 to 6 seconds
Bug: T304568
Change-Id: I70c7b0e42b47f564ea3106544da0674fa28d1b71
2022-04-21 11:10:12 +08:00
Sam Wilson 4da4db0472 URI-decode external link page names when turning them into local links
Decode local page names after the "looks like internal" dialog,
to avoid invalid page names. If it can't be decoded, use the full
page title string.

This doesn't decode text in the ArticlePath, but that sounds like it's
much rarer and could perhaps create other issues.

Bug: T25789
Change-Id: Iac03573515affbc509f674db155767a81bad8b9f
2022-04-21 11:03:04 +08:00
jenkins-bot e0aa0ee307 Merge "Realtime Preview: display manual-reload bar when previews are slow" 2022-04-21 00:55:21 +00:00
jenkins-bot 2354e775b6 Merge "Realtime Preview: make button toggle state more visible in MonoBook" 2022-04-20 19:12:21 +00:00
MusikAnimal 472cf0c07c Realtime Preview: make button toggle state more visible in MonoBook
Bug: T305953
Change-Id: Ibb0ee08837b7e3f5e98fa11d9e7a97dcef2dee9e
2022-04-20 12:30:30 -04:00
jenkins-bot 3c2223fd3b Merge "Fix return value of TitleInputWidget.looksLikeExternalLink()" 2022-04-20 07:45:58 +00:00
Sam Wilson 6cd0094581 Fix return value of TitleInputWidget.looksLikeExternalLink()
This method is supposed to return a boolean.

Change-Id: Id8fd80879770b6eeb5fcfce00eab4f124a8c1a56
2022-04-20 14:47:03 +08:00
Translation updater bot 62dd62cbb6 Localisation updates from https://translatewiki.net.
Change-Id: I9dc5477fc87cd7ee13c44ebe6b455deb5f286fb1
2022-04-20 08:19:26 +02:00
Sam Wilson 4c760f8634 Realtime Preview: display manual-reload bar when previews are slow
After three slow preview requests, switch to showing a bar at the
top of the preview area that contains a manual 'reload' button.

The manual bar will be hidden when an error message is show, but
re-shown again after the error is dismissed. Closing and
re-opening the preview pane doesn't reset the manual mode.

Bug: T304568
Change-Id: Ia72bd1ceab68fdaed5de53137bd8ac5961db4714
2022-04-20 13:01:14 +08:00
Translation updater bot 5480b54dbf Localisation updates from https://translatewiki.net.
Change-Id: I1eaef8564fdc9eb57e8f4eb9e1643dbbc89b8b9c
2022-04-19 10:16:17 +02:00
Translation updater bot b498cddbea Localisation updates from https://translatewiki.net.
Change-Id: I109962acbc42b5eba91ad36ebb82afb691646ff5
2022-04-18 10:07:10 +02:00
Translation updater bot a1d5af1a6e Localisation updates from https://translatewiki.net.
Change-Id: I2da7f5fd35ac927ca2075cc95a2508cedebd2a89
2022-04-15 09:57:11 +02:00
Translation updater bot 6e4bdee149 Localisation updates from https://translatewiki.net.
Change-Id: I693c71f81b1e837720d8c5ae3c7ef3ef7a7176ae
2022-04-14 08:27:36 +02:00
Sam Wilson 94d4912103 Realtime Preview: add hover button for reloading
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
2022-04-14 08:08:58 +08:00
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