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
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
There were analytics validation errors because events were being logged
without a session ID. The session ID is only set on document-ready, as
it's fetched from a hidden input on the document.
Change-Id: Iaa24d430b780eaad54b78cb0d2ef0670fa2e32b1
The EditAttemptStep instrument is a candidate for migration to the
Metrics Platform [0]. The first step of the migration is to log events
both using the Event Platform (i.e. via mw.eventLog.submit()) and using
the Metrics Platform Client (i.e. via mw.eventLog.dispatch()).
The Metrics Platform Client can mix in additional information -
so-called context attributes [1] - based on the stream configuration.
The majority of the default values mixed into each event via the
mw.eventLog.Schema defaults mechanism are already known to the Metrics
Platform Client.
Note well that the Metrics Platform Client will not log an event without
one or more streams being configured to receive that event. Therefore,
this change is a NOP.
An example stream configuration is given in [2].
[0] https://wikitech.wikimedia.org/wiki/Metrics_Platform
[1] https://gerrit.wikimedia.org/g/mediawiki/libs/metrics-platform/+/aed6738b845/js/src/StreamConfig.d.ts#31
[2] https://phabricator.wikimedia.org/T309013#7953227
Bug: T309013
Bug: T320281
Change-Id: Ia08bac484fb3a2209879531def859a01290120fd
The #wikiPreview element can contain other child elements such
as the already-removed one of .previewnote but also (on category
pages) category lists, which we don't want.
This changes to only clone the specific content element. We could
just create this in JS, but don't at this point have access to
the lang direction.
Bug: T315558
Change-Id: Ifcd02e9cf005e00c8dd69df162893fb673117231
Add `position: relative` to .ext-WikiEditor-realtimepreview-preview`
per this suggestion (T315049#8174670) by Matma Rex.
Bug: T315049
Change-Id: I70813f68ffd74fab4978127ecee9bd557d467ebb
Set inManualMode to the result of the current prefers-reduced-motion
setting.
Add another property (reducedMotion) for later UI/message work
Bug: T314787
Change-Id: Ifeb8b996430830499945e73eca2dcfe0355c8046
Because the manual-mode bar gets hidden when an error message
is displayed, it's necessary to re-show it after the preview
is reloaded from the error message. This was done in the
below patch, but that didn't account for all conditions.
Follow-Up: I26150c190a9d3816e35ba369536e6d0ac11e4b1a
Bug: T307240
Change-Id: I0e9698faebd3f4df41221d6ba0b0f5f82ae3ae5b
Add following logging events:
* preview-realtime-error-stopped: triggered when realtime preview
auto-load is stopped.
* preview-realtime-reload-error: triggered when realtime preview pane
shows an error message and the reload button shown in this message is clicked.
* preview-realtime-reload-hover: triggered when the reload button
that shows on hover in the realtime preview pane is clicked.
* preview-realtime-reload-manual: triggered when the reload button in
the realtime preview pane manual bar is clicked.
Bug: T306176
Change-Id: I0785b0a8e88125a9bb30ff5c64c8a7c50b556c63
* Call the parent constructor.
* Add CSS class to the widget's existing $element, rather than
creating a new one. Doesn't really change anything, just looks
neater.
Change-Id: I67a72b5e2ef0912c7c7f7a44c87b31c08e1f7fcb
Move the resize handler from the RealtimePreview constructor to the
getToolbarButton() method, to prevent it being used when the button
is not used (e.g. if the gadget is misconfigured).
Bug: T309330
Change-Id: I7abc335112648605404785528b37a81d946e900e
Save the current caret position in the textarea before enabling
or disabling Realtime Preview, and restore it afterwards.
Bug: T311496
Change-Id: Ib906e96e4e8b94b4e1fd82f6201005394c8a27c5
It doesn't work well when there are infoboxes etc. and the actual
scroll behaviour is jerky and not very pleasing.
Bug: T294977
Change-Id: I8fbba61ddd902c16b3c63b41fc361afb5d1c1a1b
* Prevent the realtimepreview module loading on anything
other than wikitext pages (as is already done PHP-side
but that is bypassed when loaded as a gadget).
* Give the #wpTextbox1 a class so we don't always style it.
Bug: T307039
Bug: T308176
Bug: T309330
Change-Id: I26111a61c8cf37520b3619faf09d76445973edd3
When either the textarea or the preview pane is scrolled, match the
other to the same vertical scroll percentage.
Bug: T294977
Change-Id: Ieda15868162caf06ef9099065ba55cfd8d8bfd0f
Because the DOM and layout changes reset the scroll position of the
editing text area, it must be manually saved before enabling/disabling
and reset afterwards.
Bug: T294977
Change-Id: I7722213e682401d29b6b53d672a487da042be6a9
Add a pulsating blue dot to the Realtime Preview toolbar button
that displays an onboarding popup when clicked and disappears
forever when dismissed.
Bug: T294589
Change-Id: I7f4dd0858349b0e7c4f4bedea5c7a62a51c6fa3a
Set both drag element lengths to 52px (@affordance-length)
Set the margin on (.ext-WikiEditor-ResizingDragBar span) to 2px
Set (.ext-WikiEditor-ResizingDragBar-ew) background-color to
@colorGray15 (i.e. #F8F9FA)
Remove legacy comment.
Bug: T307105
Change-Id: If0087398920c7ad92e5a2cd1ee5c178644f8d95b
Change the handling of the manual reload button's accessKey to
only refresh the preview if the pane is currently open.
Duplicate change to ManualWidget's handler.
Bug: T307805
Change-Id: I0f07ff346eef4bd93d13d55548381a71c0f660d3
* Always hide the error message after a successful preview.
* Before previewing, make sure the preview node is un-hidden, in
case it was previously hidden by showError().
* Stop checkResponseTimes() from hiding any error (it only handles the
manual mode).
* Stop showError() from hiding the manual bar (it's okay to see both).
Bug: T306965
Change-Id: Ic2ad52fea41070adb196ef2fbd740e808d373e5e
Make the manual-mode loading bar clickable by turing it all into
an anchor element with various mixins for functionality.
Also adds a tooltip to the whole bar, and makes the same accesskey
work (including when the preview pane is closed).
Bug: T306590
Bug: T306906
Bug: T306880
Change-Id: I915a430300c75256d89b929e3925d0ea714807bb
Add a minimal resize limit on the preview pane (`.ext-WikiEditor-twopanes-pane2`) to 248px
Bug: T307105
Change-Id: If05376571bb0b223edac48adecbe124e01293c7a