This reverts a change from 5a792b6558. The hook only requires
a PageIdentity, and we only used toPageRecord() because it takes
a parameter to read latest data, and toPageIdentity() does not.
Instead call another method to update the internal data within the
Title instance. Maybe it's not great to rely on this side-effect…
Bug: T340568
Change-Id: If9cbd95eb84b6c39bf50af4564710839628a9bc3
React to hooks fired by core when the inline diff type switch is
present. VE needs to be able to disable the inline switch
when 'visual' mode is selected and enable the switch when 'wikitext'
mode is selected. When the 'wikitext' mode is selected and there is an
inline switch, the interface needs to show the diff type format previously
selected.
Toggle using new `mw-diff-element-hidden` class that is used by core so
that there's no clashes when hidding and showing the diffs.
Bug: T331589
Depends-On: Ie6a48e495f2bb299d8b984e7c40363d534c7915b
Change-Id: I4f790370dbfeb521f3b61c4d604245f77094abe9
Sometimes we call this API and then reload the page (or navigate to
another URL), without using the page content it returns. Save some
work and some data transfer and don't generate it in those cases.
Change-Id: Ic5fac61f3ef9b2dfce6ff757f1d414a9f41f217d
Having per-wiki statistics is neat but expensive. Now that VE has been
switched to not use RESTbase on all wikis, Go back to collecting
all stats under a single key. The relevant dashboards have already been
adjusted accordingly.
Change-Id: I9666bfa3fed547f3f619a9e0c9c24b9240edc359
There are no occurrences of the error message in our error logging
data, so it most likely can never happen.
https://superset.wikimedia.org/superset/sqllab/
```
select count(*)
from editattemptstep
where event.save_failure_message = 'visualeditor-docserver'
```
Change-Id: I8172564057418283468c657cbc6d42ce8ddb35f4
This will ensure that media have the mw-file-element classes so that the
styling changes in I70c61493fe492445702f036e5b24ef87fc3bdf43 apply.
Older 2.7.0 content still in storage is missing the classes and doesn't
render correctly.
Note that I545ed75ed3c87e88b5e776696754e23c05645f81 made sure that
editing of both versions was always compatible.
Bug: T337596
Depends-On: Ia70f819df79fbb12a5b1dd6a98bfe0b968808d18
Change-Id: I40ed887e03f983e0737e1ee7cba5a4012fea31db
Presumably VE will move in lock step with the Parsoid library but this
retains the ability to negotiate even at this level.
Change-Id: Ice3beabcb1a475f2de9ad61e0f234a9cc23f80bd
Use the new hook to add the diff-mode selector to the area directly before
the diff table.
Also toggles the new inline-diff legend, when the initial diff-type is 'inline'.
Depends-On: I2a3c67bcfa47313dee597e602a62073e4e298cd2
Bug: T324759
Change-Id: I1584a84b3caea9eb142afba976c6ff47650c3832
Currently we only disable the desktop init code when this hook
returns false, but other integrations may want to know about this,
e.g. MobileFrontend.
Bug: T174180
Change-Id: I0268239cc9ea2d397140e617fcb6e4e104a75f31
Also supporting changes to support the new HelpCompletionAction,
including adding a preference to disable it if required.
New changes:
985b553cc Localisation updates from https://translatewiki.net.
aa26e27dc Localisation updates from https://translatewiki.net.
4cdc753ab Update OOUI to v0.47.0
bfc96a7ee Completions: always abandon if the first input is a space
616a6458f Fuzzy command bar
92b6525a2 Tweak the fuzzy command bar's behavior
fd2f048e4 Fuzzy bar: change how command groups are generated
Change-Id: Ic77b8822baecf5ad1ab466d94df29bb945172b55
Add a check of `$diff->getTitle()->getNamespace()` to ensure early
return on NS_SPECIAL pages.
Bug: T336582
Change-Id: I251db11e8cb5b785744ee2c111d20a346937b78c
Use MediaWiki core helpers to provide intro messages (including edit
notices), initial page content, and CSS classes for the edit area.
The following intro messages were previously unimplemented,
and will be shown now:
* 'sharedupload-desc-create'
* 'sharedupload-desc-edit'
The following intro messages were previously unimplemented,
but they only apply to pages where VE should never be available,
and will be shown now when editing those pages with 2017WTE:
* 'code-editing-intro'
* 'talkpagetext'
The following intro messages were previously unimplemented,
and are now explicitly skipped:
* 'editpage-head-copy-warn'
The following intro messages were previously unimplemented,
but they only apply to pages where neither VE nor 2017WTE should
ever be available:
* 'userinvalidconfigtitle'
* 'usercssyoucanpreview'
* 'userjsonyoucanpreview'
* 'userjsyoucanpreview'
Depends-On: If0b05710cb52a977bf4e85947d72d68683a0a29e
Bug: T201613
Change-Id: If26e39e383b983f7ee834ed6dd73b80e0545b068
The DifferenceEngineBeforeDiffTable hook is run when viewing a
diff after switching from visual to source editing, but the
mode selection widget shouldn't be shown then.
Bug: T324759
Change-Id: Ieb8a1b77928201a45635af46635b902cac01a36d
Visual editor is not in beta, and this preference is not temporary.
Change the message key to avoid outdated on-wiki overrides.
Unfortunately the internal preference name still has "betatempdisable"
in it. We should investigate renaming it later.
Bug: T197282
Change-Id: If1475a18474e85cd3a260224c738d087d472af70
The `preload` parameter currently does not work with i18n
messages, as pages representing those messages are known, but
do not exist. Resolve this by running any NS_MEDIAWIKI page
through wfMessage() first.
This feature will be used by Personalized praise in GrowthExperiments,
which requires the preload from i18n messages capability. As a benefit,
it also makes it easier to create i18n'ed preload-based systems
(one can create MediaWiki:Foo, MediaWiki:Foo/cs and MediaWiki:Foo/de);
MediaWiki will select the best language version automatically.
MediaWiki core equivalent is uploaded as
I693bcaf71d7b8557c63538a426d7a6bd4c3edf3d.
Bug: T330337
Change-Id: I961ff7ae2263e61161e686107d80bdafa3fe3c32
As temporary users will not have access to user preferences (T330815),
use cookies or localStorage to save them, like we already do for
logged-out users.
Also add some comments to point out where we intentionally distinguish
logged-out and temp users.
Bug: T332435
Change-Id: Ic83dd8bc8bc107f603a9b0340bd9e2bcaad8ff5a
Visual diffs are always enabled on history pages, there is no
long a need for this to be configurable.
Change-Id: I9cef558b2b9d32bc86c47f6a6095270220d036db
More could be done, but these are the ones that annoy me the most,
and I'm not willing to do more changes right now.
Change-Id: Ia02af09d631fea191e57da75420f0d2d1ed46c19
Use the new hook to add the diff-mode selector to the area directly before
the diff table.
Also toggles the new inline-diff legend, when the initial diff-type is 'inline'.
Depends-On: I6de30bf79eb5ac262285951792782b870d075e00
Bug: T324759
Change-Id: Ifc133856dd793693c3a2722a7b1319dfe74555a2