Page MenuHomePhabricator

Toolbar collapses while loading, causing page content to jump
Closed, ResolvedPublic8 Estimated Story Points

Description

Bisect blames this on the upgrade to jQuery 3: https://gerrit.wikimedia.org/r/#/c/322812/

Pausing shows .wikiEditor-ui-top is empty

image.png (370×760 px, 111 KB)

Event Timeline

Jdforrester-WMF set the point value for this task to 8.
Jdforrester-WMF moved this task from To Triage to TR1: Releases on the VisualEditor board.

The problem is that wikiEditor is initialised twice, once in ext.wikiEditor.js without a toolbar, and once in ext.wikiEditor.toolbar.js with a toolbar. Previously these happened in one clock cycle despite both being wrapped document.ready calls ( $(fn) ), but I imagine this has changed with jQuery's changes to already resolved promises being async.

Krinkle renamed this task from [regression] Toolbar collapses while loading, causing page content to jump to Toolbar collapses while loading, causing page content to jump.Apr 25 2017, 6:53 PM
Krinkle added a project: Regression.

Having discussed with @Catrope and @TrevorParscal (the original authors) I think the best approach is to get rid of some of WikiEditor's modularity. The toolbar is essential to using the editor so should be merged into core. The dialog module is enabled by default, and making is disable-able servers no real purpose so enable that always too.

This will allow us to remove the empty initialisation and rely on the toolbar initialisation to load the editor.

Change 351681 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/WikiEditor@master] Make toolbar and dialog part of the core module

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

Change 351681 merged by jenkins-bot:
[mediawiki/extensions/WikiEditor@master] Make toolbar and dialog part of the core module

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

It seems that this remove everything from the non-dialogs mode, but still actually 'goes' through the non-dialogs mode during setup, as described in T166857: The globe in WikiEditor disappears when loading is finished. I think that was an oversight...