Page MenuHomePhabricator

VisualEditor: Empty editnotices appear as notices
Closed, ResolvedPublic

Description

The VisualEditor toolbar has a section for "notices" between the "Leave feedback" and "Cancel" buttons. This includes the "You are using an alpha version of the VisualEditor. It may be slow and make erroneous changes - please check each edit that you make." notice, as well as a relevant edit notice where one exists, separated by a gray line. However, when there is no edit notice, the section still says "2 notices" and places an empty div resulting in a gray line at the bottom.


Version: unspecified
Severity: normal

Details

Reference
bz43460

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 1:09 AM
bzimport added a project: VisualEditor.
bzimport set Reference to bz43460.

This is due to English Wikipedia's self-invented system for edit notices where their [[MediaWiki:Editnotice-0]] / [[Template:Editnotice load]] displays an html structure even when there is no edit notice created (namely the link to "create" the edit notice, hidden/shown with usergroup css).

Although that system is rather unhandy (as it means there will always be an edit notice even when this is not intended), it is possible to work around it by parsing the edit notice client side in javascript and applying the local stylesheet and check whether there are any non-hidden nodes.

This was done and fixed in master. It will be deployed in the next branch.

  • This bug has been marked as a duplicate of bug 43013 ***