Commit graph

16956 commits

Author SHA1 Message Date
jenkins-bot 35d846f7af Merge "Better warning messages if $oldid or $etag is funny" 2020-09-01 21:11:52 +00:00
Adam Wight 1e96f47563 Fix config argument to explicitly pass api
These constructors only take a single argument, so the api config was
being ignored and the input would fall back to the default `new
mw.Api()`.

The order is changed so that the "api" config is merely a default,
and can be changed by whatever comes later.

The UserInputWidget currently doesn't accept an "api" config. This
will be fixed in Ifb1dd9d. But this is not a blocker. Merging this
patch here before the other won't have any consequence. It will just
continue to ignore the "api" config. ;-)

Change-Id: I15c35216c717576c6767927cac06ef72198fc95a
2020-09-01 09:36:24 +02:00
Translation updater bot 605e0f7f89 Localisation updates from https://translatewiki.net.
Change-Id: I824db40b99a3abcb63af893ed95ed34fa0ccca0c
2020-09-01 09:18:48 +02:00
James D. Forrester 9a93702cb9 Update VE core submodule to master (89a8d99f5)
New changes:
fc3d84e93 Check $focusTarget is non-empty
baabc080b Fix height of toolbar labels on mobile
c87eec3e0 ve.ce.Surface: Simplify table paste tests
2a0e6ba78 getAdjustedPosition: Rewrite inner loop for performance
89a8d99f5 Localisation updates from https://translatewiki.net.

Bug: T259531
Bug: T260368
Bug: T261634
Change-Id: I132c77cb0d9dce85d90c29bc398ed23be128e608
2020-08-31 17:48:26 +01:00
David Lynch 8cb67a83ea Cast fallback revision_id to a number so it validates
EditAttemptStep requires an integer, and just getting the value of an
input is always a string.

Bug: T261664
Change-Id: I57e76857086474365124b5b016902211b0e63166
2020-08-31 11:04:20 -05:00
Translation updater bot 8366ebb517 Localisation updates from https://translatewiki.net.
Change-Id: Id8d6e84f6bde591f40750677672ef7bf28a02661
2020-08-31 09:49:52 +02:00
libraryupgrader 97e79e449d build: Updating grunt to 1.3.0
Change-Id: I9cda32285abdd0d9a06e0defa8da488b400e66a9
2020-08-30 21:48:51 +00:00
Adam Wight bf72437d63 Show image autocomplete for "File" parameters
The input field becomes a title autocomplete, showing small preview
images and searching only the File namespace.

This is consistent with how TemplateWizard behaves when editing a
File parameter.

Bug: T260886
Change-Id: I7a114e279436ec1ff6f7b8ab66443138ab12637f
2020-08-28 09:55:04 +00:00
Translation updater bot 2bf127aea6 Localisation updates from https://translatewiki.net.
Change-Id: I697b44d0f8cdd0caf765c598fc57c9fb50b44c08
2020-08-27 09:52:42 +02:00
jenkins-bot a7832b6bf5 Merge "Start using edit api results for watchlist UI updates" 2020-08-26 23:32:44 +00:00
Dayllan Maza 4fc73112ee Start using edit api results for watchlist UI updates
This patch starts using watchlist related values from ApiEditPage
results instead of updating the "watch link" based on whether the
checkbox was selected or not at the time of saving the article.

This change does not depend on T261030 and can be merged without it
but T261030 needs to be fixed or temporarily watched items will not
display the right tooltip when hovering the "watch link" or star icon.

Bug: T260434
Change-Id: I2c844223620d7d28f36a0cd8ae3dee4b0c8ae5bf
2020-08-26 23:08:47 +00:00
C. Scott Ananian bf79850262 Better warning messages if $oldid or $etag is funny
Change-Id: I65f02ded600662fd19de36ef3a9ae55ecf249226
2020-08-26 18:56:22 -04:00
James D. Forrester 8a78603988 Drop support for wgCommentByteLimit, hard-coded null in MW nowadays
Change-Id: I767e0633415568134c46fccbafdaceb1ab76dea3
2020-08-26 20:25:38 +00:00
James D. Forrester 9e12aa1d0c Update VE core submodule to master (7470ff141)
New changes:
feb1d87ac Localisation updates from https://translatewiki.net.
6b70f70e9 Update OOUI to v0.40.2
7470ff141 Localisation updates from https://translatewiki.net.

Change-Id: Ib72a8a24b528b9e53081f97bed3473c70b25085c
2020-08-26 20:05:12 +01:00
jenkins-bot 6a6cbf40d9 Merge "Fix URL in console warning" 2020-08-25 21:13:55 +00:00
Ed Sanders 7a92aa47cb Run all screenshots in a single test
Makes the test run about 3x faster.

Change-Id: I3fd5f1dde59f2e7122fbfaa27cc064f333b68296
2020-08-25 16:18:55 +01:00
Ed Sanders ef9c124d2e screenshot: Cleanup runner code
Change-Id: I27c35e07d3b6c6e9710c38556869946faac31b2d
2020-08-25 16:18:55 +01:00
Ammar Abdulhamid e15d1903fa Fix URL in console warning
Remove angle bracket from the url. The closing character is breaking
the hyperlinking and is not necessary anyway. Also bypass redirect.

Bug: T261126
Change-Id: Id9839623f5f77766042a0df0dfdd5f93d6faf625
2020-08-25 12:58:50 +01:00
C. Scott Ananian 49a3387323 Remove Parsoid integration hack, added for 1.35 LTS
We'll update this before 1.36 is released, unless we get Parsoid
integrated "properly" before then.

Change-Id: I92d8555b1f5dc121c5f596b5cb6d59414280388f
2020-08-24 15:34:44 -04:00
Translation updater bot e6f180aabc Localisation updates from https://translatewiki.net.
Change-Id: Ie66432be6cc9834f82f03608fe7439a550697fea
2020-08-24 11:59:36 +02:00
jenkins-bot 1518aaa9e3 Merge "ve.init.mw.MobileArticleTarget: Fix floating toolbar workaround for iOS 13.6" 2020-08-22 11:20:02 +00:00
Bartosz Dziewoński b9a0def93a ve.init.mw.MobileArticleTarget: Fix floating toolbar workaround for iOS 13.6
If we call getBoundingClientRect() while the 'transform' animation is
still ongoing, it's going to return values reflecting the transform
- that is, the rect will be partially offscreen - which will trigger
our code that runs the animation again.

I don't know why this wasn't a problem on iOS 13.3 and earlier. Either
the timing was slightly different and the 'transform' animation was
able to finish earlier, or getBoundingClientRect() was buggy and
returned wrong values that conveniently worked right for us.

Bug: T259321
Change-Id: I6be0ddaeb6df54295fb14c45ba15fee41d61e33f
2020-08-21 23:33:37 +02:00
jenkins-bot 095e5a7f78 Merge "Ensure Parsoid doesn't throw when <ref> is used w/o Cite installed" 2020-08-21 07:27:28 +00:00
Translation updater bot 8eb0763efe Localisation updates from https://translatewiki.net.
Change-Id: I2b56d9192b9039fe3e836032f6949394963412fb
2020-08-21 08:42:05 +02:00
jenkins-bot dd95e88589 Merge "ve.ui.MWGalleryDialog: Allow "Add new image" button label to wrap" 2020-08-20 13:41:24 +00:00
Thiemo Kreuz 5e2b7506b6 Reduce duplication/clutter in MWParameterResultWidget
The MWParameterSearchWidget that shows a list of all available
template parameters displays the (human-readable) label and
description of each parameter (both given via <templatedata>), as
well as the parameter's internal name and aliases, if there are
any.

This turns out to be non-helpful in the majority of situations:
* When there is no <templatedata> yet, there are no labels.
  Instead, the names are used as labels, which means they are
  *all* identical and everything is shown twice.
* The same happens when manually adding an "unknown field". Simply
  start typing, and you can add parameters with any name. What you
  type is shown twice (actually 3 times, 1 time in the input
  field, 2 times in the result widget).
* Many template parameters are already nice, human-readable. Even
  if <templatedata> exists and specifies labels, these labels are
  often identical to the names. There is no need to come up with
  something else if the name is already good enough. (Exception:
  Localizations, but these are rare.)

Furthermore, this is a *search* result widget. The pretty much
only reason the names and aliases are shown is because the user
can search for them, and needs to understand why a parameter was
found. This still works fine.

For comparison, when a parameter is required you will *never* see
it's name, because the parameter is always there, and never shows
up as a search result.

Change-Id: I6b1dca1c94b2c496930b5bfdfe1c6f76898faa2a
2020-08-20 12:32:02 +02:00
Translation updater bot 4968619c87 Localisation updates from https://translatewiki.net.
Change-Id: Iecc6554c7b089653732c990400d786fac8ba5c51
2020-08-20 08:27:46 +02:00
C. Scott Ananian 29d3e25b4a Ensure Parsoid doesn't throw when <ref> is used w/o Cite installed
Parsoid always enables `<ref>` processing, but our Cite extension
implementation tries to fetch $wgCiteResponsiveReferences, which won't
be set if the Cite extension is not installed.

Change-Id: Idde8af07e5bf40983b2ec878ebf70aabb522a800
(cherry picked from commit 0ca4ae6908b626d34f8445d9048342378d0e3c23)
2020-08-19 12:48:10 -04:00
Translation updater bot f140796f0a Localisation updates from https://translatewiki.net.
Change-Id: I1310318a84a018c91d833182956ec0ec6639e31a
2020-08-19 08:39:56 +02:00
Ed Sanders d62fc8b49a Use Array.prototype.forEach.call in copyAttributes
Change-Id: I6c890fecf6f6002d44b32f0c85a3193c0c2632e3
2020-08-18 23:17:03 +01:00
C. Scott Ananian 879f006b7b Fix regression when opening save dialog
DOM attributes are not arrays, and so don't have Array#forEach.

Fixed regression introduced in 4545f53245.

Change-Id: I1f0f44747a0f8a376c1fb7cbb8862c096a9d1dc9
2020-08-18 18:10:31 -04:00
jenkins-bot 970b0faeca Merge "build: Update eslint-config-wikimedia to 0.17.0" 2020-08-18 16:17:10 +00:00
Ed Sanders ac085df47e Create config option for making VE a BetaFeature, off by default
Currently we always register VE as a Beta Feature, and then
expect users to use $wgHiddenPrefs to hide it, hackily.

Also, set this new preference to false so that 3rd party
wikis don't show the BF by default.

Bug: T254349
Change-Id: I92fe3d44bb4d762ca7b1bc693b7d2e74367c84ec
2020-08-18 15:52:51 +00:00
Ed Sanders 4545f53245 build: Update eslint-config-wikimedia to 0.17.0
Fix instances of variable shadowing.

Change-Id: I6e2befb020d7d4b506c7b46131eafacd951aa6d1
2020-08-18 13:16:49 +01:00
jenkins-bot 09ad8d0686 Merge "ve.init.mw.DesktopArticleTarget.init: Update mediawiki.page.ready dependency" 2020-08-18 05:26:38 +00:00
Ed Sanders 42c7096dbf Gallery: Handle invalid titles
Items which are invalid titles will still get discarded if
the gallery is edited, but this is better than crashing.

Bug: T260584
Change-Id: I5dc20c233fd9ab41bdf48531829bddca2c5b25df
2020-08-17 18:22:42 +00:00
jenkins-bot 7d366a3f6a Merge "ApiVisualEditor: Fix 'false' used as content for non-existent system messages" 2020-08-17 12:29:49 +00:00
Translation updater bot 6442f46e5e Localisation updates from https://translatewiki.net.
Change-Id: Ia8100569e5d435574820211b7076cb21d8d33fae
2020-08-17 08:45:07 +02:00
Bartosz Dziewoński 8415d7f7bf ApiVisualEditor: Fix 'false' used as content for non-existent system messages
getDefaultMessageText() returns false when the message doesn't exist.
It was incorrectly treated as a string by this code.

Follow-up to 3ec5e04a37.

Change-Id: Ib94a30697bd20133e46cbd31c14caf5f0c4169dd
2020-08-16 21:06:18 +02:00
Bartosz Dziewoński f712a54384 Update VE core submodule to master (510130eaf)
New changes:
c9e4bc776 Use placeholder name as aria-label
37a4922a7 Localisation updates from https://translatewiki.net.
55a0d0488 Teardown the completion widget when menu is hidden by user

Bug: T253590
Bug: T259277
Change-Id: I7d6e19c45f1dc87d1f4127c75c4812aadd5c5cf5
2020-08-16 20:53:23 +02:00
Timo Tijhof 95d1ea520b ve.init.mw.DesktopArticleTarget.init: Update mediawiki.page.ready dependency
In MediaWiki core, Ic418c23a740 moves mediawiki.page.startup into
mediawiki.page.ready, leaving an alias behind. Once that change lands,
this change is safe to land as well to avoid the indirection and so
that the core alias can be removed swiftly (VE is the only user).

The dependency on mediawiki.page.startup was originally added in
I494b364b485e6 to make sure that accesskey tooltips are computed by
mediawiki.util, before VE initialises (this happened via mw.util.init,
which at the time was called from mediawiki.page.startup.js),
This has all changed a lot in the years since then and might not
actually be needed any more. If that's the case, feel free to remove
the dependency instead.

Depends-On: Ic418c23a7400abba22fd07b17f173d3c5f1d1d10
Change-Id: I250b38a836f28bfb440f19282a9677977f30c615
2020-08-14 23:37:47 +00:00
Translation updater bot 6c8dd899b2 Localisation updates from https://translatewiki.net.
Change-Id: I311205f32b68e4bc985a25d328eac157880fb774
2020-08-14 08:39:58 +02:00
jenkins-bot 0b23c62d7d Merge "Support private wikis in Parsoid zero configuration mode" 2020-08-12 10:11:33 +00:00
Translation updater bot e3dc5953e9 Localisation updates from https://translatewiki.net.
Change-Id: If6d721cad8cf8bb9e87ed55c21551fcc8f0dbf79
2020-08-12 08:20:03 +02:00
Kunal Mehta 45a02ee03e Support private wikis in Parsoid zero configuration mode
Set the 'forwardCookies' flag if the wiki is private (not everyone is
allowed 'read' access).

Bug: T260201
Change-Id: I0b958e8b75c04e4a27f50f91276be221a5b1404d
2020-08-11 16:40:44 -07:00
Bartosz Dziewoński adc4346652 ve.ui.MWGalleryDialog: Allow "Add new image" button label to wrap
The interface has enough space for 2 or 3 lines of text.

(On mobile, the button has only an icon and no label.)

Bug: T260074
Change-Id: I50b08029f843e91d10b8c81985f6dfacbb96c8e7
2020-08-11 16:07:13 +02:00
Translation updater bot 8b5f8988c8 Localisation updates from https://translatewiki.net.
Change-Id: Icbdae0eaa4c591dc86b0dbebd36254ec8ac0977e
2020-08-11 08:21:23 +02:00
jenkins-bot 7d3be3f3a6 Merge "Ignore non-checkbox fields for page saving dialog" 2020-08-10 18:04:44 +00:00
Bartosz Dziewoński 3f5f54264d Update VE core submodule to master (18920ed63)
New changes:
c5496ec1e TargetWidget: Use a white background, not transparent
4efa1529f Support headers in CompletionWidget
fe0ffe6e4 Update devDependencies

Bug: T252084
Bug: T259811
Change-Id: Ic60aaafb1d07db30c72832414e68bba71f5e93df
2020-08-10 18:39:47 +02:00
jenkins-bot 6de167aef6 Merge "Update VE core submodule to master (4b36b447d)" 2020-08-10 11:48:49 +00:00