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
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
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
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
* Query permission errors for 'edit' and 'create' in the same way,
and consistently with how MediaWiki core EditPage does it.
* Prefer using Title::getUserPermissionsErrors() instead of custom
code for user blocks. The result is the same, except for an extra
line like "You do not have permission to edit this page, for the
following reason:".
Note that this loses the 'type' => 'block' property on each notice,
which was previously used to track when a block notice was shown.
This was however removed in 96de1353d3,
and could probably be re-implemented by using the root 'blockinfo'
property anyway.
* When Title::getUserPermissionsErrors() returns multiple messages
(for example, you're blocked *and* the page is protected),
display them all in a list instead of only the first one, using
OutputPage::formatPermissionsErrorMessage().
That method returns wikitext, which we have to parse ourselves. This
is a bit silly, but I found this approach in SpecialChangeContentModel
in MediaWiki core, so it should be fine.
Change-Id: Ifaf95d8aab836e45665b1fbdf98dd1980a867d8c
The message ends with "The latest log entry is provided below for
reference:", but we were not providing it. Use the same code as
'protectedpagewarning' and 'semiprotectedpagewarning', which behave
the same.
Change-Id: Ibe5463aa3d93cd1d6d6e3c0b9da82bfa2c813f86
The following sniffs are failing and were disabled:
* MediaWiki.Commenting.FunctionComment.MissingDocumentationPrivate
* MediaWiki.Commenting.FunctionComment.MissingParamName
* MediaWiki.Commenting.FunctionComment.MissingParamTag
Change-Id: If59d450236a7d1afa3c6a05536abea819535f984
New changes:
b90385a44 Update OOUI to v0.36.2
95cf15506 doc: Point to gerrit, not Phabricator Diffusion
57689b9ed doc: Update copyright statement for new year
Change-Id: I3edd80c990101e4ba33163b1da5a45c300654977
It's supposed to be non-editable but deletable text, like mw:Entity.
We decided to handle them this way in 2015 but never implemented it
(T94509). Currently, accidentally editing text inside of
mw:DisplaySpace node causes the changes to be lost when saving.
Bug: T241906
Change-Id: I78a0cc7a75061a7eefb8b677898b5756326615d6
New changes:
06ad0c769 git-build: Fix name of grunt.log.error
6bed6aaa5 CommentAnnotation: Replace 'reply' with 'comment'
Change-Id: If7e298eaafdd7cf9ab07b6314cb9c214a2072229