Commit graph

25 commits

Author SHA1 Message Date
Sam Wilson 56b4ba8476 Realtime Preview: remove Beta Feature and onboarding popup
Delete almost all code realting to the onboarding popup (blue
pulsating dot) and Beta Feature. Leave only one line to delete
any existing localStorage item that was used to remember the
dismissal of the onboarding popup.

Bug: T327515
Change-Id: I8d05e143858a2269dd6f3302dcc6cee6b0855ffd
2023-03-17 15:22:32 +08:00
David Lynch 843efa2f46 Don't do logging if MobileFrontend is active for the current page
Visiting a ?action=edit URL can, depending on user settings, result in
the MobileFrontend overlay appearing on top of WikiEditor. In these
cases, don't log anything.

Bug: T320281
Change-Id: Ib98d2cd6f2e541423e5aeebd3093bad97d6fcc4f
2023-03-07 11:58:43 -06:00
Sam Wilson 68c6d366ce Add config var to disable Beta Feature
Add new $wgWikiEditorRealtimePreviewBeta configuration variable
to make it possible to turn off the RTP Beta Feature even when
the BetaFeatures extension is installed.

Bug: T323033
Change-Id: Ib79f4eaee9cee7404ff883f5e0685610d9dba9d9
2023-01-09 13:08:55 -05:00
Sam Smith 96e5f4e6f3 Hooks: Use $revId of -1 for ::logEvent() calls
EventLogging::logEvent() overwrides the $revId parameter when the schema
has been migrated to the Event Platform. Add a note and use a $revId of
-1 to make this consistent with other calls to EventLogging::logEvent()
for schemas that have been migrated to the Event Platform [0].

[0] https://codesearch.wmcloud.org/search/?q=%3A%3AlogEvent%5C(%20%27%5Cw%2B%27%2C%20-1

Bug: T318263
Change-Id: I5b58161a81ce1f4886f23500ee33ed74397d7107
2022-10-19 14:10:09 +00:00
James D. Forrester 0e3f7c44b2 inEventSample: Avoid invalid character warning from sampling code, hash into hex
Bug: T314896
Change-Id: I377bbe54686fdb9d765543320aef14a99ee2cd7f
2022-08-10 09:24:43 -04:00
David Lynch fd0841a899 Log if an edit attempt began from the sticky header
Bug: T298634
Depends-On: I871494b6e783018b1433f294e09b0d53dded6c3d
Change-Id: I07d3c91a63e78f091a1046ca49830e141f6ef8d4
2022-06-15 02:54:03 -05:00
jenkins-bot b62c5cf06a Merge "Use new ResourceLoader namespace" 2022-05-25 02:16:51 +00:00
Tim Starling 6b2cca3b2b Use new ResourceLoader namespace
Extensions using Phan need to be updated simultaneously with core due
to T308443.

Bug: T308718
Depends-On: Id08a220e1d6085e2b33f3f6c9d0e3935a4204659
Change-Id: I289b8cb5e74b5d87e26bfe6b779a22eaaa1071ee
2022-05-24 22:59:49 +00:00
David Lynch ce2ecf084f Update schema logging of bucket for new DiscussionTools A/B test
Bug: T304030
Depends-On: I5e57bb9b7958576f3a04373748331a86f4626fb5
Change-Id: I084d26c95d5be78eddb4edd1b42aa52eef909356
2022-05-19 09:50:04 -05: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 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
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
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
MusikAnimal 68e6561857 RealtimePreview: add config setting for debounce time
Change-Id: Iaf49f076c5a290ab9049267b0aede1e6b13a9136
2022-03-24 02:00:19 -04: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
Reedy 07c823679c Use namespaced EventLogging class
Change-Id: Ia5a0ba6846ee1bd6a5436e003d65be955a06d565
2022-03-06 16:15:32 +00:00
Reedy 51c3fe42bd Swap to AutoloadNamespaces
Change-Id: I4eb121b4e81b4ec4833ce0bea81ae041abbdacc9
Follows-Up: I0be9b88accafce97f7e9b7524ec740fb576fa11c
2022-02-06 13:55:54 +00:00
David Lynch fda6c3c117 New bucket for abtest data
Bug: T291308
Change-Id: I7aa47139e3fe552833798d6b8daacc1b30517915
2022-02-02 15:50:21 -06:00
jenkins-bot 9a065b82ee Merge "build: Load ConfirmEdit as phan dependency" 2021-12-13 09:48:13 +00:00
Ed Sanders b4f144057e Tag WikiEditor edits with a hidden tag
Bug: T249038
Change-Id: Ia4267bc430ba0f12cce496ebf6f8c1773ae355a6
2021-12-07 23:30:27 +00:00
jenkins-bot 7fbd917c15 Merge "Use HookHandlers, implement hook interfaces and inject services" 2021-11-25 22:02:37 +00:00
Fomafix 0d4d037968 Use HookHandlers, implement hook interfaces and inject services
The static function WikiEditorHooks::editPageShowEditFormInitial is
kept for compatibility because there are usages in other extensions.

Change-Id: I7ba9f56fd3d00d575696f00f9f1c868fa7ad223b
2021-11-25 19:12:16 +00:00
Umherirrender c062d047ce build: Load ConfirmEdit as phan dependency
Bug: T296287
Depends-On: I549a97923fe994820358c65ee1cd725f6d9bba1a
Change-Id: If45b296a24e86d7ef6c581b3d822eb0adfa1f245
2021-11-23 19:30:25 +01:00
Alexander Vorwerk 538e543a32 Fix namespace for ConfirmEditHooks
ConfirmEdit should be added as a phan dependency, so thing like this no
longer happen in the future.

Bug: T296287
Change-Id: Ic9942b3a6d872c0d3c0e3a53d9462df6f82b06c6
2021-11-23 12:09:44 +01:00
Fomafix 4da6f5b3b5 Use namespace MediaWiki\Extension\WikiEditor in PHP
Change-Id: I0be9b88accafce97f7e9b7524ec740fb576fa11c
2021-11-20 09:30:11 +00:00
Renamed from includes/WikiEditorHooks.php (Browse further)