Page MenuHomePhabricator

DiscussionTools' reply widget might default to visual mode when the user has completely disabled visual editor for articles
Closed, ResolvedPublic

Description

DiscussionTools' reply widget might default to visual mode when the user has completely disabled visual editor for articles. It should behave the same as if the user has chosen "Always give me the source editor" in preferences and default to source mode. (See T250523.)

It seems that if you disable the visual editor, we stop updating the data about which editor you used the last time you edited, but we still remember which editor you used previously. If that was the visual editor, then it seems that the reply widget will also use visual mode initially.

Steps to reproduce:

  1. Create a new account
  2. Open a page for editing (e.g. https://en.wikipedia.org/w/index.php?title=The_Fighting_Temeraire&action=edit)
  3. Switch to the visual editor
  4. Leave the editor
  5. Go to https://en.wikipedia.org/wiki/Special:Preferences
  6. Check "Editing → Temporarily disable the visual editor while it is in beta" and save changes
  7. Go to a discussion page with reply links, e.g. https://en.wikipedia.org/wiki/Wikipedia:Main_Page/Errors?dtenable=1
  8. Click a reply link

Expected: reply widget opens in source mode.
Actual: it opens in visual mode.

Originally reported here: https://www.mediawiki.org/wiki/Topic:Vpmbb9wrfgd5e0id

Event Timeline

@matmarex before anyone starts on this, can you confirm the following?

  1. Fixing this issue will not affect what text input modes – source and visual – are available to people.
  2. Fixing this issue will affect what text input mode people are shown when clicking [ reply ] for the first time.

If both of the above are correct, then this sound good to me. Let's implement what this task is describing.

Change 610150 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] getPreferredEditor() shouldn't return VisualEditor if it's disabled by the user

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

Change 610150 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] getPreferredEditor() shouldn't return VisualEditor if it's disabled by the user

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

JTannerWMF subscribed.

Moving this to Low Priority during my 1:1 with @ppelberg