Page MenuHomePhabricator

Drop support for views/tabs in WikiEditor
Open, Needs TriagePublic

Description

WikiEditor has a method "addView" which sets up a extra tab, with the default being "Wikitext". This is not used anywhere, and possibly never has been. This code was for a now-deleted feature that was never used in production (see T380034#10378008).

Example:
$('#wpTextbox1').data('wikiEditor-context').fn.addView({name:'new', title: 'New'})

image.png (279×203 px, 17 KB)

Codesearch: https://codesearch.wmcloud.org/search/?q=addView&files=&excludeFiles=&repos=
Global search: https://global-search.toolforge.org/?q=%5C.addView%5C%28&regex=1&namespaces=2%2C4%2C8&title=%28Gadgets-definition%7C.*%5C.%28js%7Ccss%7Cjson%29%29

Event Timeline

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

[mediawiki/extensions/WikiEditor@master] Remove $controls / $tabs / $buttons interfaces

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

This was used for the tabbed interface, where you had wikitext/preview/changes tabs with live updates. This was developed as part of the original WikiEditor, but never made it to WMF production. The majority of the code was then removed in 2017 https://gerrit.wikimedia.org/r/c/mediawiki/extensions/WikiEditor/+/392899 by @Catrope and @Jdforrester-WMF .

These leftovers seem to have been forgotten, or we didn't want to accidentally break any scripts perhaps that hooked into them.

As a follow up, we might remove the wrapping ui-view as well, but it can be a separate patch.

Change #1091643 merged by jenkins-bot:

[mediawiki/extensions/WikiEditor@master] Remove $controls / $tabs / $buttons interfaces

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

These leftovers seem to have been forgotten, or we didn't want to accidentally break any scripts perhaps that hooked into them.

I vaguely think it was the latter, but by now they've had a long time to be fixed.

Change #1101924 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/extensions/CodeEditor@master] Fix appending of CodeEditor statusbar

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

Change #1101926 had a related patch set uploaded (by TheDJ; author: TheDJ):

[mediawiki/extensions/WikiEditor@master] [WIP] Remove wikiEditor-ui-view wrapper

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

These leftovers seem to have been forgotten, or we didn't want to accidentally break any scripts perhaps that hooked into them.

I vaguely think it was the latter, but by now they've had a long time to be fixed.

Yeah it seems that there are quite a few extensions depending on that wrapper providing the border..
https://codesearch.wmcloud.org/search/?q=wikiEditor-ui-view&files=&excludeFiles=&repos=
not sure if it is worth it to rearrange all this.

How on earth is the patch still not merged?! We've been missing errors and warnings for weeks!

@Nardog: See a calendar and the few days in-between since patch creation. In general, see https://www.mediawiki.org/wiki/Gerrit/Code_review/Getting_reviews

Change #1101924 merged by jenkins-bot:

[mediawiki/extensions/CodeEditor@master] Fix appending of CodeEditor statusbar

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

Change #1101926 abandoned by TheDJ:

[mediawiki/extensions/WikiEditor@master] [WIP] Remove wikiEditor-ui-view wrapper

Reason:

I don't think this is worth the trouble.

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