Commit graph

2198 commits

Author SHA1 Message Date
jenkins-bot ef25e831b9 Merge "MobileArticleTarget: Compat for OOUI scrolling fix on iOS Safari" 2019-07-24 11:34:23 +00:00
Bartosz Dziewoński cc1cb63aca targets: Fix silly indirection via a global variable
Since we're inside the Target instance, `ve.init.target` refers to
this object. Some of the code I'm changing even uses `this` instead
of `ve.init.target` on the next or previous line.

Most of the mistakes are a result of mass search-and-replace changes
(478b0bcb, e1a887cc), or moving the code from other classes (d294006d).
But I can't explain the "ve.init.target.getSurface().getDom()" line,
it would be good to figure out why it was this way before we change it.

Change-Id: I0d7c6a48369242d4c99620fcd775ab537420d84a
2019-07-23 22:39:47 +00:00
Bartosz Dziewoński 0fb7d5efda Update VE core submodule to 962335a40293cf4b1314c0236788f35f080ae877
New changes:
a06204317 Fix TableNode unit test getOffsetFromCoords failure on Firefox
dfe0eb025 Refactor mobile context logic into ve.ui.MobileContext

Local changes:
* Pull through for edit cards refactor

Bug: T227532
Bug: T228767
Change-Id: I6c043e039fbef62a56f475b0dc365e171ab7bf59
2019-07-23 22:13:27 +00:00
Ed Sanders 393de5985f Update VE core submodule to abf2bfa85e64e67cdf963601fe1da2a11fd9e89a
New changes:
1a7460058 Remove ve.newMobileContext feature flag

Local changes:
* Remove ve.newMobileContext feature flag

Change-Id: Ia8def997b7cba4623866080752b06068d2118cc3
2019-07-23 22:12:48 +00:00
Bartosz Dziewoński a5867818ff MWEditingTabDialog: Don't use ve.init.target because it may not be loaded
We also show this dialog on the old wikitext editor, where
ve.init.target is not set, because the relevant code is not loaded.

Follow-up to 478b0bcbb9.

Similar to e88cd81f94, which fixed the
same issue in a different file.

I checked all uses of ve.init.target in files under ve-mw/init/ and I
think this was the only remaining mistake.

Bug: T228684
Change-Id: I15551870cdb01d570e24ba9668e67330b8072e01
2019-07-23 19:09:37 +00:00
Bartosz Dziewoński b00190a398 MobileArticleTarget: Compat for OOUI scrolling fix on iOS Safari
Our overlay could be higher than the viewport, allowing the viewport
to scroll again.

Bug: T212159
Change-Id: I1e97d1963b214fc7673c33ae6c14ab7b0b80f31d
2019-07-18 02:11:53 +02:00
Ed Sanders 5aea61add7 Update OOUI icons names for article icons in link cache
Bug: T222079
Change-Id: I8ac2d02dfeaec3a197432d1718792a458d626917
2019-07-17 13:08:50 +01:00
James D. Forrester 18472d84a2 Follow-up Id330efac: Only hide the welcome dialog on mobile
Change-Id: I8fa3c6100652d2f29a60bc22c8e08a4d9e79d37a
2019-07-10 13:10:27 -07:00
Bartosz Dziewoński cde7946bdc MobileArticleTarget: Don't show the welcome dialog
Bug: T227670
Change-Id: Id330eface30d5fad8c7264a2be1ceeb4df3a4952
2019-07-10 18:28:02 +00:00
jenkins-bot 454a4da6b1 Merge "Log editor switches to visualeditorfeatureuse" 2019-07-04 19:30:42 +00:00
David Lynch 38e3c3fbdb Log editor switches to visualeditorfeatureuse
Depends lightly on a patch to WikiEditor, which will hook up the logging there
for the case where the switch is happening from WikiEditor to VisualEditor on
the same pageload.

Bug: T221191
Change-Id: Ibafec77b2eabd3b3b3767472b7b5a40e3312bf18
2019-07-03 23:58:30 -05:00
jenkins-bot a5e87bca9a Merge "Pass newRevId through to MobileFrontend" 2019-07-02 19:16:07 +00:00
jenkins-bot bad500da7b Merge "ArticleTarget: saveSuccess wasn't receiving expected arguments" 2019-07-02 19:16:03 +00:00
David Lynch 4d3ddb07e0 Pass newRevId through to MobileFrontend
Bug: T226847
Change-Id: I22daf4e7637c412aa444d98ec971bb294e4ade06
2019-07-01 15:59:55 -05:00
jenkins-bot 7796b569c9 Merge "MobileArticleTarget: Prevent unwanted page zooming on focus on iOS" 2019-07-01 16:14:35 +00:00
David Lynch c898838585 ArticleTarget: saveSuccess wasn't receiving expected arguments
Way back in 2c24efae in 2015 this got disconnected, which resulted in
saveComplete logging not having the expected updated revision_id.

Bug: T226847
Change-Id: I6dc14bb4b2dacedbe27493a97fa25c9b0542818c
2019-07-01 11:06:16 -05:00
Bartosz Dziewoński 2563bb3d89 MobileArticleTarget: Prevent unwanted page zooming on focus on iOS
Bug: T216446
Change-Id: I48beb1e120b5b087533b0827904212be9286529f
2019-07-01 15:53:29 +02:00
jenkins-bot 2699566577 Merge "iOS browser menu bar tap stealing hack for bottom contexts" 2019-06-26 20:38:47 +00:00
Ed Sanders 5c62ae20ef Clear edit summary when switching section and discarding changes
Bug: T191590
Change-Id: I1d3c4528dd07fcff90ffa378ade1d6982fc68791
2019-06-26 19:51:16 +00:00
jenkins-bot 552c5e3331 Merge "Improve debug bar margins on mobile" 2019-06-22 21:14:23 +00:00
jenkins-bot 115382f4db Merge "Prevent text on save/publish button from wrapping on mobile" 2019-06-20 19:20:51 +00:00
Bartosz Dziewoński 0af3ea84de Prevent text on save/publish button from wrapping on mobile
If the translations of save/publish button messages like
'visualeditor-savedialog-label-publish-short-start' contain spaces
(e.g. in Bengali 'bn'), the button on mobile would wrap over two
or more lines, due to weird styles we have for the mobile toolbar.

Change-Id: Ieb439ae489ab7110b81382ffdcf0d3d3ad2f84ac
2019-06-20 20:29:52 +02:00
Ed Sanders ad87c6c009 Improve debug bar margins on mobile
Change-Id: I6fd8b89dd44d5d8d933822851499264e4d0f4585
2019-06-20 13:15:52 +01:00
Timo Tijhof 45f3b5644c trackSubscriber: Remove use of 'ext.eventLogging.subscriber' alias
Deprecated in favour of 'ext.eventLogging'.

Bug: T221281
Change-Id: I16ca136be84b9c50208c4e702ec75d7ca33afd96
2019-06-20 00:57:17 +01:00
Ed Sanders 22f43207fe Apply active external link fix to all skins
Change-Id: Ic66082fca53f803f9ede6c100beb9072b40a0c00
2019-06-18 15:23:10 +01:00
jenkins-bot 69ff78868f Merge "Remove 'mobile-ab' config for section editing" 2019-06-17 20:37:51 +00:00
Bartosz Dziewoński 600e369347 iOS browser menu bar tap stealing hack for bottom contexts
Change-Id: I7607bef4253fde894e307bcecaac6bd342864c0c
2019-06-14 23:49:38 +02:00
Ed Sanders df8feb6faf Move mobile context to bottom of page
Hidden behind ve.newMobileContext feature flag.

Bug: T204733
Depends-On: Id276686a0e82c12c457c81eaec9939722c65c7ec
Depends-On: Id5f7ead769dc30c0fbd2a8b8f6f6c4d68dcfabac
Change-Id: Ibd4b699dfe4bb9bcaec6898b6b82357eb287d128
2019-06-14 20:57:22 +00:00
jenkins-bot 8cce3fa72a Merge "Avoid setting '&section' (with no equals or value) when switching to OWE" 2019-06-14 18:41:19 +00:00
Bartosz Dziewoński a68cc38b22 Avoid setting '&section' (with no equals or value) when switching to OWE
mw.Uri requires undefined rather than null to unset a parameter;
null instead generates a parameter with no value (and no equals sign).
Our own code in ve.init.mw.DesktopArticleTarget.init.js parseSection()
can't parse that and causes an exception.

Change-Id: I783ea6b91c115b79bbd9deac6669bea0661139af
2019-06-14 20:20:26 +02:00
jenkins-bot 355a54b792 Merge "trackSubscriber: Migrate away from deprecated 'schema.' modules" 2019-06-14 00:27:11 +00:00
jenkins-bot ed6d540289 Merge "MobileArticleTarget: Update loading interface for new design" 2019-06-13 20:00:34 +00:00
Timo Tijhof fda2729ebc trackSubscriber: Migrate away from deprecated 'schema.' modules
The EventLogging extension no longer uses these internal modules.
They were phased out as part of last year's "lightweight EventLogging"
project (detailed at T187207). Migration notes at T205744.

VisualEditor has migrated already, mostly. It still depended
on the existence of these module names for some condition guards.

* The subscriber for 'mwTimingHandler' was guarded by 'schema.EditAttemptStep',
  but did not emit events of that schema. What 'mwTimingHandler' really
  needs is the '*SamplingRate' variable for its call to 'inSample()'.
  This previously worked because the variable and the schema are both
  provided by the WikimediaEvents extension.

* The subscriber for 'activityHandler' had a separate schema guard. This
  might suggest an intent for the code to silently degrade if WikimediaEvents
  were to be changed to no longer supply the second schema, or for the code
  to work for third-parties without WikimediaEvents if they register only
  the schema. However, this subscriber too calls 'inSample()' and needs those
  variables.

I've assumed for now that it is okay for these to all be guarded together.
Even if the schemas were to be removed and we were to forget updating this
code, the new EventLogging client degrades gracefully from this (no errors).

Bug: T221281
Change-Id: I260c25752c3becfe6e499813197fbf7a3dba88c3
2019-06-13 18:28:49 +00:00
Ed Sanders 87a3402203 Remove 'mobile-ab' config for section editing
Test is over.

Reverts I2c22d7636ae11d2db7780ae5adb3abe9df532b7c

Change-Id: I883dc8d6de6f2f39afc6b42c60503c3155f9fd8f
Depends-On: If3d24b44e37ca53826c60ada02cdf5636aa8606a
Bug: T225645
2019-06-12 17:45:20 +01:00
jenkins-bot 9114e5403b Merge "Reorder calls so that window is scrollable when trying to scroll to section" 2019-06-11 22:18:13 +00:00
Bartosz Dziewoński baa8bcb476 Reorder calls so that window is scrollable when trying to scroll to section
Bug: T225292
Change-Id: I07d899098cff13cf4f8224c45f118290bc392c53
2019-06-11 22:02:39 +00:00
Ed Sanders 2b7bbf0737 Cleanup mwcore messages and dependencies
* Move many messages from mwcore to articletarget or mwsave
* Delete old unused messages
  - visualeditor-beta-label
  - visualeditor-toolbar-savedialog
  - visualeditor-toolbar-savedialog-short
* Remove unused core messages (showtoc/hidetoc)
* Fix typos in comments

Change-Id: I59455f4cad272db9fd05f45f8a66069e5da0421d
2019-06-11 20:42:01 +00:00
Ed Sanders 7ad624f0a3 Remove switch confirm dialogs
Bug: T220007
Change-Id: I81b39a02d573d96bcb6b4238aabbcd077e874906
2019-06-11 22:35:34 +02:00
Bartosz Dziewoński eb8aede95f MobileArticleTarget: Update loading interface for new design
* Remove animation for toolbar sliding into place. It now happens on
  the fake toolbar in MobileFrontend shown before the real toolbar
  loads, and our toolbar just transparently replaces it.

Bug: T217784
Depends-On: If21aa0ea619ec2500ce5fca6fe81eb27f26bb047
Change-Id: Ib6ff7594e1982d1b46e9ca89d6b9722d025e8207
2019-06-05 12:43:33 -04:00
Bartosz Dziewoński f48b5bcc9a MobileArticleTarget: Fix silly indirection via a global variable
Change-Id: I71349313b493c18cebe30df0b1b03defe81bb80e
2019-06-05 16:40:18 +00:00
Bartosz Dziewoński 9cbc22c70d MobileArticleTarget: Remove a method that just calls the parent
Follow-up to 500462f4b2.

Change-Id: I1916a58b8814d1f03a14a35881f531d9de319736
2019-06-04 15:52:13 -04:00
Bartosz Dziewoński 4184d44dc5 MobileArticleTarget: Remove duplicate way to trigger abandon warnings
Abandon warnings are already handled by the code in MobileFrontend's
EditorOverlayBase. Using window.history.back() causes that code to run.
Having a duplicate way to trigger them only results in inconsistencies
because our dialogs animate in a different way.

Bug: T222315
Change-Id: I19c5616a6aeecf0ac63f37a564ef44f11df010b0
2019-06-04 15:50:59 -04:00
Bartosz Dziewoński 8ae4925676 Allow switching from WTE to VE with changes in non-RESTBase mode
* Change the query in ve.init.mw.ArticleTargetLoader#requestParsoidData
  so that in non-RESTBase mode with wikitext it still returns the
  metadata required to initialize the editor, using the backend API
  code added in I1b35b28e428a1f86d2e34d90ddbe73361ce14818. This fixes
  the exception from T222312.

* Introduce new configuration option $wgVisualEditorAllowLossySwitching
  to control this feature. It is enabled by default, fixing T214542.
  We allow it to be disabled because switching in non-RESTBase mode may
  cause "dirty diffs" (non-semantic changes to the wikitext), which are
  undesirable on wikis where users carefully review all changes.

Bug: T214542
Bug: T222312
Change-Id: I58879cba5612002c70c24731306214d2577c2c52
2019-05-30 20:18:53 +02:00
Ed Sanders b1ac5b74d3 Update VE core submodule to master (06f1ebb8e)
New changes:
06f1ebb8e Local/SessionStorage refactor

Local changes:
* Update for core storage refactor

Depends-On: I3cc1d5adfbce794e8345b7f1090c10fb0d42d150
Change-Id: If855ee33b0993788cc159d8c3acf03070e6a9566
2019-05-29 14:49:53 -07:00
jenkins-bot 795e7b13fb Merge "Special-case redlink URLs to load preferred editor" 2019-05-28 23:21:28 +00:00
Ed Sanders 4dc8ee52a1 Use nullSelectionOnBlur when section=new
Section=new behaves more like a form than a full
document editor, so allow focus to be fully moved
to the title input without leaving a deactivated
cursor behind.

Change-Id: I7e3835da925b27f5df79dcbdd4550445795cdc51
2019-05-27 12:39:19 +01:00
Ed Sanders 4a692e762d Special-case redlink URLs to load preferred editor
In general action=edit could be bound to a wikitext-specific
edit link, but in the case of redlinks we can use the
preferred editor instead.

Bug: T223793
Change-Id: Ib0851e9e2ce441ae93311153801e2c3de0a2063d
2019-05-26 17:55:38 +01:00
Bartosz Dziewoński fbb56d66fa Store 'canEdit' property when auto-saving or switching editors
Added in b9835f75d3.

Bug: T224319
Change-Id: I05d6aa500ba921d114f33972369ad4dd53b8e140
2019-05-24 23:15:38 +02:00
Ed Sanders 5b4158860a 'scrollCursorIntoView' -> 'scrollSelectionIntoView'
Change-Id: I202b1bdb3196b318c26422577b66de66d37080c8
Depends-On: Iac446ce9fce170b43c96001ca89e8af4825522ca
2019-05-24 10:11:38 +00:00
jenkins-bot 603223152c Merge "Replace call to setToolbarHeight with setPadding" 2019-05-23 18:25:46 +00:00