Topic on VisualEditor/Feedback

Edit notice is not shown when a user switches from wikitext editor to visualeditor

3
Summary by Elitre (WMF)
197.218.82.229 (talkcontribs)

Problem

As a user, when I click the button to switch to visualeditor I expect to see an edit notice (if it exists).

Steps to reproduce

  1. Go to https://en.wikipedia.org/w/index.php?title=Buu
  2. Click edit (make sure this leads to wikitext editor, meta + shift + e), and see edit notice
  3. Click pencil icon
  4. Click "switch to visual editing"

Expected output

A popup with an edit notice containing some text (if it exists).

Actual output

No popup with an edit notice.

TheDJ (talkcontribs)

Note that that is an edit intro btw, which is a rather special case of an edit notice. I'm personally not able to reproduce, but i've seen more reports like this on English Wikipedia recently. Perhaps is is a race condition or something.

197.218.82.229 (talkcontribs)

It probably happens consistently when the user is logged out:

A good guess is probably that the "switched" notice is higher priority than the edit notice so it gets hidden and the edit notice might get discarded. It would also be odd (and a worse user experience) for it to show both notices simultaneously. Although the edit notice should probably be higher priority than the "switched" notice.

An easy way to replicate is to use it on protected pages, and force a switch to visualeditor using a keyboard shortcut (e.g. alt + shift + v).

You can see that the API response contains the text, it is simply not used for some reason:

{
    "visualeditor": {
        "result": "success",
        "notices": ["<div class=\"floatleft\"><img alt=\"AnonEditWarning.svg\" src=\"//upload.wikimedia.org/wikipedia/en/thumb/d/de/AnonEditWarning.svg/9px-AnonEditWarning.svg.png\" width=\"9\" height=\"20\" srcset=\"//upload.wikimedia.org/wikipedia/en/thumb/d/de/AnonEditWarning.svg/13px-AnonEditWarning.svg.png 1.5x, //upload.wikimedia.org/wikipedia/en/thumb/d/de/AnonEditWarning.svg/18px-AnonEditWarning.svg.png 2x\" data-file-width=\"9\" data-file-height=\"20\" /></div> <span style=\"color:#d33; font-weight:bold;\">You are not logged in.</span> Your <a href=\"/wiki/IP_address\" title=\"IP address\">IP address</a> will be publicly visible if you make any edits. If you <span class=\"plainlinks\"><b><a class=\"external text\" href=\"//en.wikipedia.org/w/index.php?title=Special:UserLogin&returnto=Banana\">log in</a></b> or <b><a class=\"external text\" href=\"//en.wikipedia.org/w/index.php?title=Special:UserLogin/signup&campaign=anoneditwarning&returnto=Banana\">create an account</a></b></span>, your edits will be attributed to a user name, among <a href=\"/wiki/Wikipedia:Why_create_an_account%3F\" title=\"Wikipedia:Why create an account?\">other benefits</a>.\n", "<div id=\"semiprotectedpagewarning\">\n<p><b>Note:</b> This page has been <a href=\"/wiki/Wikipedia:Protection_policy#Semi-protection\" title=\"Wikipedia:Protection policy\">semi-protected</a> so that only <a href=\"/wiki/Wikipedia:User_access_levels#Autoconfirmed_users\" title=\"Wikipedia:User access levels\">autoconfirmed users</a> can edit it. If you need any help getting started with editing, see the <a href=\"/wiki/Wikipedia:New_contributors%27_help_page\" title=\"Wikipedia:New contributors' help page\">New contributors' help page</a>.\n</p>\n<hr class=\"fmbox-warning-ruler\" style=\"color: #BB7070; background-color: #BB7070;\"/>\n</div>\n<li class=\"mw-logline-protect\"> 16:34, 14 August 2014 <a href=\"/wiki/User:SlimVirgin\" class=\"mw-userlink\" title=\"User:SlimVirgin\"><bdi>SlimVirgin</bdi></a> <span class=\"mw-usertoollinks\">(<a href=\"/wiki/User_talk:SlimVirgin\" class=\"mw-usertoollinks-talk\" title=\"User talk:SlimVirgin\">talk</a>\u00a0| <a href=\"/wiki/Special:Contributions/SlimVirgin\" class=\"mw-usertoollinks-contribs\" title=\"Special:Contributions/SlimVirgin\">contribs</a>)</span> changed protection level for <a href=\"/wiki/Banana\" title=\"Banana\">Banana</a> \u200e\u200e[edit=autoconfirmed] (indefinite)\u200e[move=sysop] (indefinite) <span class=\"comment\">(Persistent <a href=\"/wiki/Wikipedia:Vandalism\" title=\"Wikipedia:Vandalism\">vandalism</a>: restoring protection per request)</span> <span class=\"mw-logevent-actionlink\">(<a href=\"/w/index.php?title=Banana&action=history&offset=20140814163456\" title=\"Banana\">hist</a>)</span> </li>\n<a href=\"/w/index.php?title=Special:Log&page=Banana&type=protect\" title=\"Special:Log\">View full log</a>"],
    }
}