Page MenuHomePhabricator

Allow extensions to disable VE
Closed, ResolvedPublic

Description

Currently we have hard-coded a few extension pages that are not compatible with VE (FileImporter, Translate, and TwoColumnConflict). There should be a way for extensions to declare when VE can't be used.

Current hack:

// Not on pages which are outputs of the Translate extensions
// TODO: Allow the Translate extension to do this itself
mw.config.get( 'wgTranslatePageTranslation' ) !== 'translation' &&

// Not on the editor in the FileImporter dialog (T298345)
// TODO: Allow the FileImporter extension to do this itself (T174180)
!mw.config.get( 'wgFileImporterEditor' )

Event Timeline

Deskana moved this task from To Triage to Freezer on the VisualEditor board.

Change 756599 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/VisualEditor@master] Allow disabling VE and 2017 wikitext editor from FileImporter

https://gerrit.wikimedia.org/r/756599

Change 756599 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Allow disabling VE and 2017 wikitext editor from FileImporter

https://gerrit.wikimedia.org/r/756599

The above patch just adds another extension to the list. It probably should not have been tagged against this task.

Change 758852 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] DesktopArticleTarget.init: Add a disableVE method for extensions to use

https://gerrit.wikimedia.org/r/758852

Change 758853 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/Translate@master] Disable VE on translate pages using new disableVE method

https://gerrit.wikimedia.org/r/758853

Change 758900 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/FileImporter@master] Disable VE on Special:ImportFile using new VisualEditorBeforeEditorHook hook

https://gerrit.wikimedia.org/r/758900

Change 758852 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Introduce VisualEditorBeforeEditorHook

https://gerrit.wikimedia.org/r/758852

Change 758900 merged by jenkins-bot:

[mediawiki/extensions/FileImporter@master] Disable VE on Special:ImportFile using new VisualEditorBeforeEditor hook

https://gerrit.wikimedia.org/r/758900

Change 767514 had a related patch set uploaded (by Esanders; author: Esanders):

[mediawiki/extensions/VisualEditor@master] Remove logic for disabling VE when certain extensions are running

https://gerrit.wikimedia.org/r/767514

Change 758853 merged by jenkins-bot:

[mediawiki/extensions/Translate@master] Disable VE on translate pages using new VisualEditorBeforeEditor hook

https://gerrit.wikimedia.org/r/758853

Change 767514 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Remove logic for disabling VE when certain extensions are running

https://gerrit.wikimedia.org/r/767514

ppelberg claimed this task.

Change 923381 had a related patch set uploaded (by Bartosz Dziewoński; author: Esanders):

[mediawiki/extensions/VisualEditor@master] Output config var when VE disabled by hook

https://gerrit.wikimedia.org/r/923381

Change 923381 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Output config var when VE disabled by hook

https://gerrit.wikimedia.org/r/923381