Page MenuHomePhabricator

Toolbar drop shadow flickers after target loading is complete
Closed, ResolvedPublic

Description

When VE loads we

  • Show an empty dummy toolbar
  • Then once the code/doc is ready we transition in the real toolbar

The second step only needs to fade in the contents of the toolbar, not the whole toolbar (including the drop shadow), otherwise the drop shadow: appears, disappears then fades in.

This is a lot easier to see if you slow down the transition by running the following in the console:

mw.util.addCSS('.ve-init-mw-desktopArticleTarget-toolbar > .oo-ui-toolbar-bar { transition: opacity 2s }');

Event Timeline

It's possible that at some point the drop shadow was on the parent of .oo-ui-toolbar-bar, which would make this a regression, but we presumably moved it for a good reason, so we can just change the selector for the transitions.

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

[mediawiki/extensions/VisualEditor@master] DesktopArticleTarget: Fix fade-in of toolbar tools

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

To make the transition more visible after the patch, use:

mw.util.addCSS('.ve-init-mw-desktopArticleTarget-toolbar > .oo-ui-toolbar-bar > * { transition: opacity 2s }');

While testing this, I noticed another issue that I think we should resolve at the same time: during the loading animation, the page title flickers between two shades of grey. I amended the patch to fix this as well.

BeforeAfter

Change 805850 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] DesktopArticleTarget: Fix fade-in of toolbar tools

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

ppelberg claimed this task.