Commit graph

16164 commits

Author SHA1 Message Date
jenkins-bot 8a65008317 Merge "EditAttemptStep: Allow session ID override from query string or mw.config" 2019-11-19 14:19:44 +00:00
Translation updater bot 93a9811159 Localisation updates from https://translatewiki.net.
Change-Id: Ib16f2bb9031ee4ee4d4fd73b8fd2e998c3b4c81a
2019-11-19 09:35:30 +01:00
Roan Kattouw eebe4cd993 Unbreak instrumentation of init events
ve.track.js was being loaded twice, once early on as part of the
ext.visualEditor.track module, and again later on as part of the
ext.visualEditor.core.utils module (which it was added to by b676b22).
This caused ve.trackSubscribe()'s buffer to be reset. Recording the
first init event relies on this buffer, because it's logged with
ve.track() before the logger subscribes with ve.trackSubscribe().
Subsequent init events did get logged. Some performance logging during
initialization was also dropped, but the 'ready' event and subsequent
events were logged correctly.

Fix this by loading ve.track.js only once, as part of the
ext.visualEditor.track module. Make ext.visualEditor.core.utils depend
on ext.visualEditor.track, rather than also adding ve.track.js to it.

Change-Id: I781595d27edb2dc0ad662fcc8e3c7cb0ddae78f1
2019-11-18 17:19:16 -08:00
Roan Kattouw 0f97e1dce9 EditAttemptStep: Allow session ID override from query string or mw.config
Similar to WikiEditor, allow the editing_session_id value to be
overriden through the editingStatsId query parameter. Also allow
server-side code to override the session ID by setting
wgWMESchemaEditAttemptStepSessionId in mw.config.

Only apply the override to the first session. Once a second init event
happens, discard the overridden editing_session_id and generate a fresh
one.

Bug: T238249
Change-Id: I4ede70f310a35c95b6eb9cc34cfcf2baa77e69ee
2019-11-18 17:18:10 -08:00
Bartosz Dziewoński 050227aee6 Remove unused message 'visualeditor-loadwarning-token'
No longer used since a701e87caa (2013).

Change-Id: I7708453ac321a92893a1d92c3082023f9ebe769c
2019-11-18 15:18:36 -05:00
Translation updater bot 71ed114518 Localisation updates from https://translatewiki.net.
Change-Id: I6b588e891eaa7ca86e2a2cc324cdc281e529075a
2019-11-18 09:24:46 +01:00
Translation updater bot 99cec5d610 Localisation updates from https://translatewiki.net.
Change-Id: Ie64d17d6a4729377a7d492b1f5cf351f93de7c8b
2019-11-15 09:22:29 +01:00
jenkins-bot 35f2093c62 Merge "Move more code to ArticleTargetSaver" 2019-11-14 21:26:24 +00:00
Ed Sanders b0f4b4c94e Move more code to ArticleTargetSaver
* Add a postWikitext method and split out postContent
  from postHtml
* Move saveSuccess handling into postContent promise
* Connect promise directly to saveComplete instead
* Pass whole response.visualeditoredit object, instead
  of splitting into variadic arguments for saveComplete.
* [DEPRECATION] Make serialize return the postHtml promise
  and deprecate passing a callback.

Change-Id: I905737515578000b2b87214c92e8b9fe9e82f6b7
2019-11-14 14:34:22 +00:00
Translation updater bot ca003af9fb Localisation updates from https://translatewiki.net.
Change-Id: I9482810437bd136282db16877e11238d0fc83d16
2019-11-13 09:27:40 +01:00
Ed Sanders 6caa4601aa Generate internal links locally
Bug: T147230
Change-Id: Ib154ffebb601dc76c708f2d8a8315cbf98ff6da1
2019-11-12 20:36:00 +00:00
Bartosz Dziewoński 3e93c00a28 Update VE core submodule to master (12422dc27)
New changes:
ce76e95d4 Allow config to be passed to mock surfaces
12e2d2686 tests: Put FragmentInspector test runner in shared util

Change-Id: I426ae2cb96ca8dd126656c018740ec122007c2ff
2019-11-12 21:33:59 +01:00
jenkins-bot 84663fab0f Merge "Add missing FragmentInspector tests to MW" 2019-11-12 15:27:39 +00:00
jenkins-bot 206c440a4e Merge "tests: Have MWDummyTarget create the correct surface type" 2019-11-12 15:26:41 +00:00
Ed Sanders 545c6f1301 Add missing FragmentInspector tests to MW
Requires unregistering MWLinkAnnotationInspector

Bonus: Remove unnecessary list of unregsiters as
teardownOverrides is run on init.

Change-Id: I3e36ab7736cc8479ab53f40d2eb24c0fa15d3dc0
2019-11-12 13:52:35 +00:00
Translation updater bot 59004a75d9 Localisation updates from https://translatewiki.net.
Change-Id: Ie09a3e51f44cb212a005b7da7929996e6a74adb6
2019-11-12 09:33:12 +01:00
Ed Sanders 3542799ab4 tests: Have MWDummyTarget create the correct surface type
Change-Id: I3cd025d726e9db56a2391ef52852d1cb2f4305a0
2019-11-11 20:22:33 +00:00
Ed Sanders 8d818d9ff0 Update VE core submodule to master (5b9ab1cfa)
New changes:
be8235e82 Localisation updates from https://translatewiki.net.
6f43a6c8d Remove MW-specific code for setting up section editing

Local changes:
* Bring in section editing logic from VE core
  Sets attachedRoot iff there is only one SectionNode in the whole document.

Change-Id: I15b5ebf3848482ef6df6d19114d26a1b1d4a3b13
2019-11-11 18:28:14 +00:00
Translation updater bot 0c1ee6f9bd Localisation updates from https://translatewiki.net.
Change-Id: If77bf5138d50d9d2ab3fff09c1e2737b8d3c3580
2019-11-11 15:35:01 +01:00
Translation updater bot aecf36a04c Localisation updates from https://translatewiki.net.
Change-Id: I7fc15e1aa71cf2f39739adfc48579774af5671d0
2019-11-08 09:49:13 +01:00
James D. Forrester 58eb936fbd Update VE core submodule to master (a6ef2cc7d)
New changes:
69fc4fdd7 Tweak alignment of frameless button in desktop context further

Bug: T237289
Change-Id: Ia315c96b22ac2ed8728dd2e90d02100655194df3
2019-11-07 17:11:21 -05:00
jenkins-bot ef4c7a856b Merge "Follow-up I83b98e41: Always sanitize when using plain text paste in NWE" 2019-11-07 19:04:11 +00:00
jenkins-bot 862ac428c9 Merge "ve.init.mw.ArticleTarget: Fix error handling in #prepareCacheKey" 2019-11-07 16:00:47 +00:00
Ed Sanders 737e9e82f5 Follow-up I83b98e41: Always sanitize when using plain text paste in NWE
Bug: T201561
Change-Id: I0405923b2ebd1b73119d29cb6091f53b8cddc84d
2019-11-07 14:49:57 +00:00
Translation updater bot 8e0813c85c Localisation updates from https://translatewiki.net.
Change-Id: I7c3c852854c4cdfcf98e34b4cf6e314598613d22
2019-11-07 09:45:42 +01:00
Bartosz Dziewoński a53c02f2c4 ve.init.mw.ArticleTarget: Fix error handling in #prepareCacheKey
If the paction=serializeforcache request fails, we were erroneously
converting it to a successful result with no value, which later causes
an exception, because since 381b58585c
other code expects the result to an an object.

The bug was introduced in 2015 in 07001001be,
but until that recent change it would only cause a 'badcachekey'
error, which was handled correctly later.

Change-Id: Ie1ffc8c3e616a7d296f2186fb17eaf039971a44f
2019-11-07 01:36:41 +01:00
jenkins-bot 36bde9d1c6 Merge "Config value for X-Parsoid-Variant" 2019-11-07 00:00:40 +00:00
Ed Sanders d71522c463 Set the plain text 'pasteSpecial' flag when using plain text paste in NWE
This means the multiple lines of html (e.g. '<p>a</p><p>b</p>') are
treated as plain text and only separated by one linebreak.

Bug: T201561
Change-Id: I83b98e41bfd92d1848557b58f961abdd0db26294
2019-11-06 19:11:58 +00:00
Ed Sanders 64be4b2a4b Update VE core submodule to master (2d0f0ec1f)
New changes:
18e32c6ed Simplify paste test runner
7d71154bd Properly support middle click paste

Local changes to use simplified paste tests runner

Bug: T157956
Depends-On: Id66bff4e41a36ed967a8cba2f6653bb26e7b4ea1
Change-Id: I0101e8bc079cd050bfbc65577a10e98213d5f00c
2019-11-06 10:31:38 -05:00
James D. Forrester 676c66f0c0 Update VE core submodule to master (8cba52aa6)
New changes:
fdc0d734f Localisation updates from https://translatewiki.net.
1ab9a6349 Fix DM jQuery linting
ed97c7d11 Localisation updates from https://translatewiki.net.
5f0d866a0 Fix alignment of frameless button in desktop context
3a1d641f7 Replace color with WikimediaUI color palette one
fac4d2e72 Remove toolbar borders from mobile
fbeb687c8 Reduce size of PopupToolGroup indicators on mobile

Bug: T231815
Bug: T237289
Change-Id: I4709f1cdc558e4aa4fd6674a5f3bde617cec4614
2019-11-05 14:31:06 -05:00
David Lynch 46e7b3ba19 Config value for X-Parsoid-Variant
Bug: T229074
Change-Id: Ib1403638b12ec5808f6b81bd114949043aa9ac2e
2019-11-05 10:56:10 -06:00
jenkins-bot 26ebdd0796 Merge "ve.init.mw.MobileArticleTarget: Improve toolbar scrolling behavior on iOS 13" 2019-11-05 14:26:27 +00:00
Translation updater bot 3baba543a4 Localisation updates from https://translatewiki.net.
Change-Id: I5ed68e0ed83a0a74807f1960a2f7ae0913fc25a4
2019-11-05 09:47:07 +01:00
Ed Sanders bfdb664ef7 Add missing dependency for parsing utils
Change-Id: If231b00db6b562fd529c1d0a5143a4613c9835c4
2019-11-04 16:20:51 +00:00
Ed Sanders 4c86c54e46 Replace $.when with ve.promiseAll
Add linting guards, except in preinit

Change-Id: I999641eddb0e0f5b112ec2259dbafc1e816e3437
2019-11-04 22:06:54 +08:00
jenkins-bot e7422385e4 Merge "Avoid use of $.parseHTML in model" 2019-11-04 14:03:02 +00:00
jenkins-bot 15cec5d2c0 Merge "Remove jQuery from ve.dm.MWLanguageVariantNode" 2019-11-04 13:23:40 +00:00
Ed Sanders cc217cef29 Avoid use of $.parseHTML in model
Change-Id: Ide671e7459b14bfbb7385261221c2edd17bd1153
2019-11-04 13:23:12 +00:00
Translation updater bot 45eb1a6fbb Localisation updates from https://translatewiki.net.
Change-Id: I53274b90e57c7d9aa59480dd677c3d4e97e102ca
2019-11-04 10:18:17 +01:00
Ed Sanders 2d4234fac8 Remove jQuery from ve.dm.MWLanguageVariantNode
Change-Id: I849cb6756171aa7bba43dc390cbd390b323328d2
2019-11-02 16:28:32 +00:00
David Chan 22098d6b16 Convert $.Deferred() to ve.createDeferred(), except in preinit
Follow-up to a8e07e026dea4f54241d1dbb6b7bcdbd8c670db2 in core.

Change-Id: I09333adb4876c6e584a4a6b6a1628227c4cd2616
2019-11-02 13:06:28 +08:00
jenkins-bot b00787b572 Merge "Factor out save logic into ArticleTargetSaver" 2019-11-02 01:16:18 +00:00
Ed Sanders 76d0f02116 Use MobileFrontend check for loading DesktopArticleTarget.init
Bug: T236944
Change-Id: I3fd41d0fbb3087d4052db1cb1537e289defa737e
2019-11-01 22:05:59 +00:00
Ed Sanders ffa3742ce1 build: Update linters
Change-Id: I03d1a8e63b730ad98ec07ad5f630ba82698de5be
2019-11-01 16:20:22 +00:00
Ed Sanders 381b58585c Factor out save logic into ArticleTargetSaver
Change-Id: I63fa04598e0d703fe1ba715c9c5a0abbb0d7ba5b
2019-11-01 15:45:27 +00:00
jenkins-bot 6341a4ddb7 Merge "Fix visualeditor-dialogbutton-media-tooltip message" 2019-10-31 22:13:37 +00:00
Bartosz Dziewoński 00eb79d4d7 Revert "Parse relative hrefs on image nodes like on regular links"
This reverts commit 6037fefbe0.
This reverts commit da9b6fffbd.

Bug: T237040
Change-Id: Id6ea5784512e4d4c3cb00927b859d713c3814f89
2019-10-31 22:40:42 +01:00
jenkins-bot f24c823212 Merge "Expand collapsible blocks in editor, like we do with collapsible tables" 2019-10-31 16:27:45 +00:00
Bartosz Dziewoński 95f0d5f428 ve.init.mw.MobileArticleTarget: Improve toolbar scrolling behavior on iOS 13
With this patch, the toolbar slides into place place nicely after
scrolling again, but it still occasionally flickers during the scroll.

* window.innerHeight is now smaller or something, and we have to
  twiddle the scroll position by a larger value.
* document.body.scrollTop no longer works for setting or getting the
  scroll position, so use different methods.
* requestAnimationFrame() now generates an insufficient delay to make
  scrolling happen, so use setTimeout() instead. We actually have to
  add a nonzero delay there, otherwise the toolbar sometimes doesn't
  animate like it should or flashes in random places on the screen.
  This delay is bad because the user can't start scrolling again
  during that time, but I think we can live with that.

Bug: T233470
Change-Id: I6c40ee8ce5994e12eadb085bbffd120ef160d4ee
2019-10-31 16:55:58 +01:00
Translation updater bot dd65c0fac6 Localisation updates from https://translatewiki.net.
Change-Id: I97267311e73ad710c27301753f45758a03bf9995
2019-10-31 09:30:10 +01:00