Commit graph

16319 commits

Author SHA1 Message Date
David Lynch 0d6f984cc5 Change tags method so anon edits will go through
It turns out anonymous users can't apply change tags, so change
I2c1d0f8d69bc03e5c1877c790247e165f160e966 broke editing for them.

Bug: T242184
Change-Id: I7c27e4d9995428e213a980819810f235fdfe9435
2020-02-06 15:31:45 -06:00
David Lynch 078fbcf737 Update VE core submodule to master (e1760b7f7)
New changes:
fb4f0a83b Completion framework

Local changes to wire in the completion framework

Bug: T232601
Depends-On: If6aee9df67e7a1234d47c0ba0c2f05ef47e5bd51
Change-Id: I075cac9aa195574c3d416a40bbdc5ec2d64424e2
2020-02-06 12:05:48 -08:00
Bartosz Dziewoński 9a3fc22080 Update VE core submodule to master (624ec74b7)
New changes:
07c028575 Require two clicks on link for label editing after closing context item
ff0e814ad update-ooui: Fix link to release notes
0d9bdde76 Update OOUI to v0.36.4
c09049edc Change toolbar border hack to add borders instead of remove them
b888802f5 Rebaser: Bump dependency versions
624ec74b7 Localisation updates from https://translatewiki.net.

Bug: T232003
Bug: T232172
Change-Id: I7a74108c08fced3df33617993e98e39649bb4b41
2020-02-06 18:37:28 +01:00
Translation updater bot bbf304c8f1 Localisation updates from https://translatewiki.net.
Change-Id: Icbae912ed98594af2756757ee1b76e3ace7b98ae
2020-02-06 08:20:16 +01:00
jenkins-bot d5ea567039 Merge "Match WikiEditor switching widget to Apex toolbar theme" 2020-02-05 22:40:59 +00:00
Timo Tijhof 761c26e0a0 ve.init.mw.trackSubscriber: Remove 2015 compat for this.timeStamp
I8e82acc12 is from 2015, a long time has passed since then.

Bug: T229577
Change-Id: I656a9994451299c482e6752d6a03663f3270b8e1
2020-02-05 20:09:52 +00:00
Bartosz Dziewoński 6ee5db11dc Correct API documentation for 'tags'
The message wasn't updated when we changed our minds during the
development of d85d30f9b3. Now the
normal tagging is done in client-side code, so it's effectively
always "suppressed" when calling the API.

Change-Id: Ie75ce31e7c723ff2677e8caa205666f5394405fa
2020-02-05 14:20:31 +01:00
Translation updater bot 2cca81a662 Localisation updates from https://translatewiki.net.
Change-Id: I3e5487a089b0a92ba9d0521f6d1d464bea7041d6
2020-02-05 08:19:56 +01:00
jenkins-bot 22c6449d5f Merge "Don't offer switching to VE if it's disabled in preferences" 2020-02-05 01:48:34 +00:00
jenkins-bot 54c8ca6c39 Merge "Fix tab initialization if NWE is enabled but VE is disabled" 2020-02-05 01:48:31 +00:00
Ed Sanders 787d16f512 Match WikiEditor switching widget to Apex toolbar theme
Bug: T223155
Change-Id: I5c14f28ba3c341c74875bac090c6106655c6b4c7
2020-02-04 17:25:59 -08:00
jenkins-bot 582b99781c Merge "Change gallery structure to match Parsoid" 2020-02-05 00:52:51 +00:00
jenkins-bot 0896917030 Merge "ve.ce.MWGalleryNode: Fix how 'mode', 'class', 'style' changes are applied" 2020-02-04 20:03:29 +00:00
Bartosz Dziewoński 353549003a Change gallery structure to match Parsoid
Bug: T214649
Change-Id: Ia5eb2057a8073488de2228315f08a20656ee946b
2020-02-04 20:02:18 +00:00
Bartosz Dziewoński 98ed2311b6 ve.ce.MWGalleryNode: Fix how 'mode', 'class', 'style' changes are applied
* Changing the 'mode' did not clear the old class, only add a new one.
* Clearing the 'class' or 'style' did not really clear it if the field
  was left empty.

Both of these could result in the action not taking effect visually.

* Setting a class unintentionally also removed internal VE classes.
  This doesn't seem to have any negative effects at a glance, but it's
  probably a bad idea.

Change-Id: I304c222a2c8bc9d35b1cfaee401ab1f815251fde
2020-02-04 19:49:01 +00:00
jenkins-bot 124ae7a444 Merge "Tag VE edits from the client-side" 2020-02-04 16:43:59 +00:00
Translation updater bot ab357925de Localisation updates from https://translatewiki.net.
Change-Id: Icb65fd5af73dd906f60325851293327c50b0f9f8
2020-02-04 08:34:24 +01:00
jenkins-bot 48da3746f8 Merge "Disallow switching in NWE welcome dialog if VE should be unavailable" 2020-02-03 23:59:10 +00:00
jenkins-bot f7a61e3f42 Merge "Allow switching in welcome dialog on mobile" 2020-02-03 23:57:18 +00:00
James D. Forrester ff95a56c0c Update VE core submodule to master (d930b6581)
New changes:
d930b6581 build: Update all karma-related tools to latest

Bug: T243791
Change-Id: I2616c28c6327921ddd21f0f39b635e0f622a6ecd
2020-02-03 13:09:48 -08:00
Bartosz Dziewoński 06ab627b29 Update VE core submodule to master (daa98ac4e)
New changes:
ab2f2ca1a ve.ce.BranchNode: Detach all children first when calling #detach
dae5a8c7e Localisation updates from https://translatewiki.net.
98e69f146 Remove hack to avoid iOS Safari menu bar area tap stealing

Bug: T206278
Bug: T227628
Change-Id: Id9442f433277bb32b7a581286ab3308bb0b16aae
2020-02-03 19:50:56 +01:00
jenkins-bot cb303c2b65 Merge "Remove hack to avoid iOS Safari menu bar area tap stealing" 2020-02-03 18:46:13 +00:00
jenkins-bot 6cd05e686d Merge "Don't display duplicate protection notices when user can't edit" 2020-02-03 17:33:39 +00:00
Translation updater bot b79f68e762 Localisation updates from https://translatewiki.net.
Change-Id: Idae99750161b4d18014b7af8e538be39f982d0ce
2020-02-03 08:28:47 +01:00
James D. Forrester a318f448e6 Update VE core submodule to master (62458b89d)
New changes:
c5582eab7 Localisation updates from https://translatewiki.net.
33f0680f2 Always use excludeInsertion when translating table selections
6d9d86720 eslint: Use /mediawiki ruleset
48cf4045e ve.dm.SourceConverter: Add a trailing newline to each full paragraph

Bug: T243606
Bug: T243860
Change-Id: Ib2a2025dea1c393e436c0bad1ad42b6aa8a3717e
2020-01-31 17:56:05 -08:00
Bartosz Dziewoński ba3f222e42 Don't display duplicate protection notices when user can't edit
In the core MediaWiki editor, the detailed messages about page
protection are only shown when the user is allowed to edit the page;
otherwise, a generic permission error is shown. Do the same here.

Change-Id: Ia0ca52b9bf556354218b2aa91f141b429b0c5880
2020-01-31 14:55:32 -08:00
Bartosz Dziewoński f525f63b03 Remove hack to avoid iOS Safari menu bar area tap stealing
Explanation of what this code was for: T227628#5339392

As noted on that task, our behavior is actually unintuitive and
distracting, and iOS Safari limitations prevent us from doing it
better.

This reverts commit 600e369347.

Bug: T227628
Change-Id: Id1a5eebd06e4218e3e102165c60791999293d273
2020-01-31 21:22:23 +00:00
jenkins-bot dfb7f7d4a3 Merge "Use autogenerated parameter info for templates without TemplateData" 2020-01-31 21:19:40 +00:00
Máté Szabó ff4f382322 Use autogenerated parameter info for templates without TemplateData
When a template does not have user-provided TemplateData documentation,
the TemplateData API falls back to extracting possible parameters from the raw wikitext
to generate an API response with a list of potential parameters. However, it also
sets the "notemplatedata" field in the response, causing the VisualEditor to think
the response contains no useful information and ignore it. This appears to have been
an unintended side-effect of I97a1bfc9f9ead082a673a91b9d2053630a90309c.

This patch ensures that the VisualEditor will correctly consider such responses from
TemplateData by modifying ve.dm.MWTransclusionModel to check if the response contains
a parameter map. Some unit tests were added for the class to verify this behavior.

Bug: T243868
Change-Id: I72005880d9301a53224473900efe2917379e8708
2020-01-31 13:43:56 +01:00
Translation updater bot e0d7efcef2 Localisation updates from https://translatewiki.net.
Change-Id: I5c1293e09a4a4d33da4620d4ee320be9ae503ea9
2020-01-31 09:54:37 +01:00
David Lynch d85d30f9b3 Tag VE edits from the client-side
This opens up the API so that other tools can use it without being
forced to tag those edits as being from VE.

Also, document that tags is a working parameter that can be passed
through to the edit API.

Bug: T242184
Change-Id: I2c1d0f8d69bc03e5c1877c790247e165f160e966
2020-01-29 21:55:07 -08:00
Thalia cbf259a6ed ApiVisualEditor: Replace calls to deprecated Title methods
Replace Title::userCan with PermissionManager::userCan.

Replace Title::getUserPermissionsErrors with
PermissionManager::getPermissionErrors.

Change-Id: I1afec4ba62185c3cd555a10ae35cef01b7194221
2020-01-29 20:58:19 -08:00
jenkins-bot 4c8c0e0253 Merge "ApiVisualEditor: Refactor edit notice code" 2020-01-29 21:46:00 +00:00
jenkins-bot 430d890cfb Merge "Pass the "count" parameter to 'cascadeprotectedwarning'" 2020-01-29 21:45:34 +00:00
jenkins-bot c72e3fbd48 Merge "Display log entry underneath 'titleprotectedwarning'" 2020-01-29 21:30:11 +00:00
jenkins-bot 9be7403342 Merge "Enable visual diff code on mobile" 2020-01-29 20:32:48 +00:00
jenkins-bot 32b121e221 Merge "ArticleTargetLoader: Fix loading visual diffs when no RESTBase" 2020-01-29 20:29:30 +00:00
Bartosz Dziewoński c1ea108327 Enable visual diff code on mobile
Bug: T242351
Change-Id: I4cf6c9ef846d24847a844d443952c7026fcd306b
2020-01-29 11:15:18 -08:00
Bartosz Dziewoński 4fc5d964db ArticleTargetLoader: Fix loading visual diffs when no RESTBase
When mw.libs.ve.diffLoader#fetchRevision was calling this method, we
were accidentally making no query at all if RESTBase wasn't in use.

Change-Id: Ia98343aa1ba7f4f3be0c1a8ee5864653c429fb82
2020-01-29 11:15:18 -08:00
Translation updater bot 01990fcb4d Localisation updates from https://translatewiki.net.
Change-Id: I92e0f4ed5133d38e2bf96179c0bf5ae50e785b47
2020-01-29 08:19:12 +01:00
Bartosz Dziewoński 3458d8a27e Don't offer switching to VE if it's disabled in preferences
In many places we check whether VE is available before doing things
(init.isVisualAvailable). This variable includes checks for whether
the page is wikitext, etc. Now it will also include checking whether
VE is enabled in user preferences.

In almost all places where init.isVisualAvailable is used, we were
already also checking if VE is enabled, so this doesn't affect the
behavior. But notably, we didn't do it when showing the option to
switch to VE in the welcome dialog and in the toolbar, causing T243723.

Changing init.isVisualAvailable this way makes it consistent with
init.isWikitextAvailable, which has always included a checking whether
NWE is enabled in user preferences.

Bug: T243723
Change-Id: Ie174bc3f16bceb29cb155b9223e0acef70167fd6
2020-01-28 16:26:03 -08:00
Bartosz Dziewoński 0791dd352d Fix tab initialization if NWE is enabled but VE is disabled
Bug: T178976
Change-Id: I16b7ef564e8c28c0c583c724ffb482b2c9fcbadb
2020-01-28 16:26:03 -08:00
Bartosz Dziewoński 5c8d04afdb Disallow switching in NWE welcome dialog if VE should be unavailable
When NWE is enabled but VE is supposed to be unavailable on the page
(e.g. in talk namespaces), do not show the option to switch to VE in
the welcome dialog.

This is relevant if new users use NWE, due to config like below
(we use this on WMF Office wiki):

    $wgDefaultUserOptions['visualeditor-newwikitext'] = true;

Change-Id: Iee8c3d3604a13dcd20efa713e49461ba9b885749
2020-01-28 16:26:03 -08:00
Bartosz Dziewoński 36c2cb90ab Allow switching in welcome dialog on mobile
This code works perfectly on mobile now, I believe change
4fb17205b6 fixed that.

Note that the dialog is currently never shown due to the override
in MobileArticleTarget, but I tested after removing it.

Change-Id: I305a01fc78366a3d2d13662e6d71711864e0dffc
2020-01-28 16:25:53 -08:00
Translation updater bot ff6c7ec702 Localisation updates from https://translatewiki.net.
Change-Id: I7763599de42e8d33c3c0a83f55ce50592e3d0a4b
2020-01-28 08:26:55 +01:00
libraryupgrader 1baeb9ef0c build: Updating composer dependencies
* mediawiki/minus-x: 0.3.2 → 1.0.0
* mediawiki/mediawiki-phan-config: 0.9.0 → 0.9.1

Change-Id: Ibf55f382c586603967da0086f86bfe4924e7cf96
2020-01-26 18:27:39 +00:00
Ed Sanders 62145b11e6 Fix variable scope in ArticleTargetSaver
Also fix docs

Change-Id: Ida47968c995166b1dca36fc9fe28fac374010564
2020-01-24 15:32:46 -08:00
jenkins-bot 2abe5931e9 Merge "Update VE core submodule to master (13a8f4092)" 2020-01-24 22:21:42 +00:00
Translation updater bot 4984b3d7da Localisation updates from https://translatewiki.net.
Change-Id: I0898365c628b60cbd351a806fd0297fe60c0b71f
2020-01-24 08:16:00 +01:00
James D. Forrester e73ecef638 Update VE core submodule to master (13a8f4092)
New changes:
b609a378c Localisation updates from https://translatewiki.net.
908602288 Localisation updates from https://translatewiki.net.
13a8f4092 Update OOUI to v0.36.3

Change-Id: Ib615394fac35a007d98eca80468a256912f0bcce
2020-01-23 16:26:06 -08:00