Commit graph

16094 commits

Author SHA1 Message Date
Ed Sanders b345ae203b Fix documentation position
Change-Id: I8e1045f38e0cca3a937a5e2a07b1db820f64bee1
2019-10-24 14:31:38 +01:00
Translation updater bot e1f09e45c7 Localisation updates from https://translatewiki.net.
Change-Id: I9db7be57966bbda4751160c818ec2ce8e3d96960
2019-10-24 10:48:51 +02:00
Ed Sanders b676b2295b Update VE core submodule to master (3fac5f1f2)
New changes:
8cbedc3c8 build: Update linters
a211e9fd8 TargetWidget: Use surface view focus/blur events
57aeb8b38 Separate utilities required for DOM parsing into separate file

Local changes:
* Setup modules for new parsing utils files

Change-Id: Ie4e59650fdb869e7e4148c97cd03d79ce35187dc
2019-10-23 18:34:17 +02:00
Translation updater bot bcfd96477f Localisation updates from https://translatewiki.net.
Change-Id: Id718c4eb13106f3ce0f899e29b4c0511c1b491d0
2019-10-23 09:54:17 +02:00
jenkins-bot e4efbe2a46 Merge "ve.init.mw.MobileArticleTarget: Remove error handling hacks for MobileFrontend" 2019-10-22 15:42:32 +00:00
jenkins-bot 23e5ff5572 Merge "Update VE core submodule to master (6c506a6aa)" 2019-10-22 12:57:32 +00:00
jenkins-bot 182b9c78ad Merge "Try using structured logging again" 2019-10-22 12:39:41 +00:00
James D. Forrester 7c40a7ecd7 Update VE core submodule to master (6c506a6aa)
New changes:
4ae766c0f Grammar fix in doc
5b2dac1aa Use plugin to ensure all message keys are documented
6c506a6aa Localisation updates from https://translatewiki.net.

Bug: T235502
Change-Id: I827d14a3ea78369321c557cca8fb16726a1dc03a
2019-10-22 13:12:39 +01:00
jenkins-bot 0f1281750e Merge "Don't retry when etag is undefined because the page doesn't exist" 2019-10-22 10:37:53 +00:00
Translation updater bot 43f1ee59f7 Localisation updates from https://translatewiki.net.
Change-Id: I877cb15aa7086decef34ca74d34ff6c620056055
2019-10-22 09:15:38 +02:00
Bartosz Dziewoński f3dfd98e55 Don't retry when etag is undefined because the page doesn't exist
Follow-up to 5d1a67757a.

Bug: T233320
Change-Id: Ice27187862dde75c69bbdb666c0981fce94249ba
2019-10-21 19:21:59 +00:00
Bartosz Dziewoński e82f5ccf02 ve.init.mw.MobileArticleTarget: Remove error handling hacks for MobileFrontend
As of commit c65ed0e7a8ac5f32a3a6e4cb2760dae03e4fca22 in MobileFrontend,
it uses errorformat=html queries (the same as we do), so we no longer
need to massage the responses to make it happy. The same commit also
turned parseSaveError() into a no-op, so we can remove that as well.

Change-Id: I4f0109ce120ebf94e5709d47d775a8178ce216fa
2019-10-21 20:26:10 +02:00
Bartosz Dziewoński f7ee7dc807 Try using structured logging again
The configuration of Wikimedia wikis should be fixed.

This reverts commit 04407e9eb1
and also makes similar changes to new logging code added in
5d1a67757a.

Bug: T234564
Change-Id: Ic999b050e68b71f5a1737366e16f133e5a557307
2019-10-21 17:04:23 +02:00
James D. Forrester 618225d4ed Update VE core submodule to master (b2939de73)
New changes:
fe82a8073 Update OOUI to v0.35.1
c9ed3a117 Localisation updates from https://translatewiki.net.
552d703b7 Localisation updates from https://translatewiki.net.
cab4264f1 build: Unbreak language lists, swapping 'szy' language for old 'ais' code
25b446256 Localisation updates from https://translatewiki.net.
0cd49c0c8 Avoid a "wiggle" when inserting a missing table cell
0babef010 Make test names clearer
b2939de73 TreeModifier: Ignore removed nodes properly when normalizing from a text node

Bug: T234108
Bug: T235959
Change-Id: Ifef6a96828a388f38f58ca4440f8ea6d31b1743a
2019-10-21 12:06:57 +01:00
jenkins-bot 0abcda599d Merge "build: Bump mediawiki-phan-config to 0.8.0" 2019-10-21 10:31:49 +00:00
Translation updater bot 7792044600 Localisation updates from https://translatewiki.net.
Change-Id: If5f9fd6cd9fbf7027f311bd87ba2d86488c0b68a
2019-10-21 10:01:17 +02:00
Daimona Eaytoy dd1d022c9d build: Bump mediawiki-phan-config to 0.8.0
Change-Id: Iafcf36672189c7729e9936634d95e585ed2247be
2019-10-20 12:27:16 +00:00
jenkins-bot 23213a17bd Merge "eslint: Add extra restrictions to ve-mw/dm/ folder" 2019-10-18 23:12:20 +00:00
Ed Sanders 837b01b534 Use consistent tag style when constructing nodes
Change-Id: I6a2d4d7d791a74b26770ef84d15659642401b0e7
2019-10-18 23:42:54 +01:00
Ed Sanders 2846144e96 eslint: Add extra restrictions to ve-mw/dm/ folder
Same as in core, follow up to I63fa04598e.

Change-Id: I4b63ef9d07205d91d6c20db310ab350f4160c3bc
2019-10-18 23:26:26 +01:00
jenkins-bot 932286063f Merge "Improve message for the infamous "HTTP 404" error" 2019-10-18 10:57:17 +00:00
jenkins-bot 416323bdca Merge "Fix media embeds which don't link to the file page" 2019-10-18 10:55:58 +00:00
jenkins-bot 4452062bab Merge "Detect mangled etags from RESTBase and retry via MediaWiki API" 2019-10-18 10:50:39 +00:00
Bartosz Dziewoński 3a7f5703dd Improve message for the infamous "HTTP 404" error
(This is the error from T233127.)

It's still somewhat unhelpfully generic because it can appear in many
situations. But at least it'll be searchable, and less ambiguous about
where the 404 happened when a user reports getting this error.

Change-Id: I9e771934c436f39dd380fa5a06edcfbce9efad4c
2019-10-18 11:05:19 +02:00
Bartosz Dziewoński 6037fefbe0 Fix media embeds which don't link to the file page
Follow-up to da9b6fffbd.

Bug: T235707
Change-Id: Ie5a12bf274ae6178106f81a4c84686a88307c9fb
2019-10-17 22:12:58 +02:00
Translation updater bot b901f8f107 Localisation updates from https://translatewiki.net.
Change-Id: I8067e58fda7ae83d73f86fc60a8d280bda7c7e34
2019-10-17 09:54:06 +02:00
Translation updater bot 0ee9f78297 Localisation updates from https://translatewiki.net.
Change-Id: I6aa2e183d73f7253bae6be5f59aaa886c2bdb546
2019-10-16 20:42:57 +02:00
Bartosz Dziewoński 5d1a67757a Detect mangled etags from RESTBase and retry via MediaWiki API
Something is causing the 'ETag' headers produced by the "public"
RESTBase (queried directly from the client) to be mangled or lost.
My theory is that some proxy or browser extension is doing that.

When we detect a bad etag when fetching the page contents, discard
the result and try querying the "private" RESTBase via the MediaWiki
API (similar to what we do on private wikis, except there we talk
directly to Parsoid instead of RESTBase). After I463a84de63, that
returns the etag as part of the payload rather than HTTP headers,
and should pass unharmed through whatever is mangling the data.

Also compare and log the two etags.

Bug: T233320
Change-Id: I2ef0ca872597566f74b650aea71bf3f15747a6d7
2019-10-16 19:53:43 +02:00
jenkins-bot a79b587cb1 Merge "ApiVisualEditor: Always return 'etag' with 'content'" 2019-10-16 15:06:18 +00:00
Translation updater bot bae38531bd Localisation updates from https://translatewiki.net.
Change-Id: I03dbafb688c8af17cdad08d67ad30da560793ca0
2019-10-16 10:41:39 +02:00
Bartosz Dziewoński 679e777cfa ApiVisualEditor: Always return 'etag' with 'content'
For consistency, I guess. Also I need this in I2ef0ca8725.

Previously, when querying the HTML content of an existing page, we did
not return the 'etag', on the assumption that anyone who needs it will
instead query RESTBase directly.

Bug: T233320
Change-Id: I463a84de631598243893946ad1d060a9aa0b180e
2019-10-15 18:31:56 +00:00
James D. Forrester dec54cf56e build: Upgrade mediawiki-codesniffer to v28.0.0
Change-Id: I23702d16eee09292b63051f94103a3bca3b1dd13
2019-10-11 12:42:23 -07:00
jenkins-bot 389fd5c668 Merge "Catch errors during document initialization" 2019-10-11 16:24:02 +00:00
jenkins-bot b15eea1cb0 Merge "Fix Vector wikitext surface padding overrides when using custom browser font-size" 2019-10-11 15:23:17 +00:00
jenkins-bot cc1bd58e83 Merge "Parse relative hrefs on image nodes like on regular links" 2019-10-11 15:22:29 +00:00
Ed Sanders 57d8e53111 Catch errors during document initialization
Change-Id: I5dc29666f99ac10bbf63a56153ba9a32d3568daa
Depends-On: I57fb6319bc3a9cee347c39fc75f555543991d703
2019-10-11 15:13:10 +00:00
jenkins-bot 2c243647d3 Merge "Enforce that some files must not use the ve global" 2019-10-10 19:27:22 +00:00
James D. Forrester 8bb02cc454 Update VE core submodule to master (2f2cdd89d)
New changes:
8ff4683d3 libs: Update papaparse to 5.1.0
210518d4a eslint: Remove unused prefer-template rule; use proper globals values
fd8bf7425 Localisation updates from https://translatewiki.net.
f09a8f327 Remove <style> tags from $pasteTarget immediately
0f76791ac lib: Unset the executable bit on the papaparse.js library
8d05203fa TreeCursor: cross ignored nodes properly from the end of a text node

Bug: T234881
Bug: T235068
Change-Id: Icf9e0ca80575e45577ebf51764247da4dd82bdba
2019-10-10 12:02:20 -07:00
Bartosz Dziewoński 3f0f302577 Enforce that some files must not use the ve global
Previously, the ve-mw/init/ directory contained two kinds of files:
those that were used when initializing VE, and those that may be
loaded even if VE is not going to be initialized at all. The latter
kind must not use the `ve` global variable.

After moving those files to ve-mw/preinit/ we can enforce this with
.eslintrc.json in that directory. This would have prevented T228684.

(Technically they merely must not use `ve.init`, and may use `ve`,
but that's harder to enforce. We should instead move the few non-init
methods out of `ve`: now, track, trackSubscribe, trackSubscribeAll).

Also, group some files under ve-mw/init/: targets/ now (only)
contains ve.init.mw.Target and its subclasses, apiresponsecache/
now contains ve.init.mw.ApiResponseCache and its subclasses.

Bug: T228684
Change-Id: I945249a27f6a0fa10a432d5c5dc57bc7e0461fd8
2019-10-10 15:15:40 +00:00
Translation updater bot 435d6d2a63 Localisation updates from https://translatewiki.net.
Change-Id: Iacfa47502110f9c0089f18f759603b4ff7a887fa
2019-10-10 09:34:02 +02:00
Translation updater bot 955a114c01 Localisation updates from https://translatewiki.net.
Change-Id: I7c04a8109d0a39803f028e9d2b5422b66d2a2c71
2019-10-08 09:34:53 +02:00
jenkins-bot 6096eccbf7 Merge "eslint: Remove unused prefer-template rule; use proper globals values" 2019-10-07 18:45:57 +00:00
Ed Sanders fd43701de2 eslint: Remove unused prefer-template rule; use proper globals values
Change-Id: If98be563304baa46a746d78c94dd8945f94d545c
2019-10-07 17:22:24 +00:00
Bartosz Dziewoński b8867f425b Merge "Update VE core submodule to master (2c8e48194)" 2019-10-07 16:04:23 +00:00
jenkins-bot def3261c49 Merge "Fix linking to pages in media dialog/media context/internal link context" 2019-10-07 15:13:02 +00:00
Bartosz Dziewoński 621c6f4759 Update VE core submodule to master (2c8e48194)
New changes:
fec3647e7 TreeModifier: return correct position in ensureNotText
2c8e48194 TreeModifier: Ignore more attributes when validating linear data

Bug: T234489
Bug: T234742
Change-Id: Ib83dfa2f2e02a63a8e9774f3383e5796a624cb64
2019-10-07 16:45:56 +02:00
Bartosz Dziewoński 55aec8f977 ve.ui.MWDefinedTransclusionContextItem: Fix handling of template names
The ...target.wt property contains the wikitext used to generate
the template name. It can contain trailing newlines (T234817) and
all kinds of funny wikitext syntax. Instead, use ...target.href,
which is the title of the page that is actually transcluded. Compare
the new code to ve.dm.MWTransclusionNode.prototype.getPartsList.

Additionally, fix some confusion about namespaces (treating template
names as titles in the main namespace). The template names in the
configuration page (visualeditor-template-tools-definition.json)
now support overriding namespaces in the same way as in wikitext.

Bug: T234817
Change-Id: I7c557d28e961d0b9117fc0380c65cdd42035ae96
2019-10-07 14:56:16 +02:00
Bartosz Dziewoński 7579f6eb1f Fix linking to pages in media dialog/media context/internal link context
If you had an image thumbnail for a file 'Foo?.png' on the page,
ve.ui.MWMediaContextItem and ve.ui.MWMediaDialog did not escape
the '?' when linking to it, which resulted in incorrect links.
Similarly, if you had an internal link to the page 'Foo?',
ve.ui.MWInternalLinkContextItem did not escape it.

Additionally, the links were always generated as if the wiki was
using short URLs, even when it is not (T233628).

The approach using mw.Title is copied from ve.ui.MWGalleryDialog.

Bug: T233628
Change-Id: I10256ed6883dae0ea216de4c0719f03d7fd19ae4
2019-10-07 14:27:02 +02:00
James D. Forrester 052a879c3c Update VE core submodule to master (8347ba91b)
New changes:
7cabb6fd2 build: Update eslint-config-wikimedia
8347ba91b Localisation updates from https://translatewiki.net.

Change-Id: I3260da9afe8f3230c124588419606ddbc42ae277
2019-10-03 14:26:19 -07:00
David Lynch d03db0e4f2 ui.MWSaveDialog: checkbox tracking was getting duplicated on every setup
Bug: T232790
Change-Id: Id19aa59c71432d0179fc06b6a30014d1037074ae
2019-10-03 12:44:43 -05:00