Page MenuHomePhabricator

VE Template Dialog: Remove [[]] button
Closed, ResolvedPublic3 Estimated Story Points

Description

Background

Currently, there is a wikitext button represented by the [[]] icon. When clicking it, it removes any validation or any specialized input. It only appears for some inputs. We plan to remove it without providing a direct replacement (the alternative behavior when needed is to simply switch to full wiki-text editing mode – this is already done frequently, is necessary in many situations, and seems to be the standard workflow, even with the button).

Issues:

  • The button is confusing. In testing users did not understand what it was for. Adding to the confusion, it's unclear why it shows up sometimes and not others.
  • It almost never necessary to click this button to type in wikitext. The standard input fields almost always understand wikitext and do not block users. Making it seem like a separate action is needed, can add confusion to an already established issue of users not understanding when wikitext is needed/allowed within VE.
  • It increases the number of tab stops needed to get from input field to input field, making keyboard navigation more difficult.
  • It was originally added with the idea of validation being added in the future. After the research of this project, adding validation to the huge variety of community-created templates would not be recommended, maybe not even possible. Validation only currently occurs in a few limited ways.

Requirements

  • Remove all [[]] buttons from the template dialog. The button should not be shown for any situation, including the edge case below.
  • Functionality should remain for edge cases, e.g. when a boolean uses the number 2. This value should be shown in a wikitext field. The button is still not displayed.

Nice to have:

  • Any extra styling (gray color, monospace font) is removed. No need to do anything about this for now. Will be removed when we can delete all unused code from the codebase.

Event Timeline

Notes from todays sprint planing:

  • Let's say you edit a template with a boolean field, but the field contains an invalid value like "2". This automatically triggers what the button would do and replaces the checkbox with a raw wikitext input field. This feature must stay.
  • Even in this situation the button should not be shown. This means the user can not switch back to the checkbox. That would not be helpful anyway, we believe. It's in no way obvious what a click on the button would do. What happens to the old value "2" then? Is it deleted? Replaced with what? It's probably best to let the user decide, which means it must be done in the wikitext input field anyway.

I realize most of this is already in the ticket above. Just to be sure.

Open questions (@ECohen_WMDE?):

  • Should we remove the gray & monospaced styling of the raw wikitext input field and just show it as if it is an ordinary string input field? I mean, the visual separation is not needed any more without the button, right?
  • I'm not sure what should happen if the user deletes the invalid checkbox field from my example above. I think what should happen is that the value "2" is gone and the field appears as a checkbox the moment I add it back.

Writing to confirm the notes - this was my understanding of our decisions as well. For your questions:

Should we remove the gray & monospaced styling of the raw wikitext input field and just show it as if it is an ordinary string input field? I mean, the visual separation is not needed any more without the button, right?

Yes please remove. I don't think it gives the user any clear information about the situation. Wikitext is also accepted in the other input field types, so I think it actually causes confusion.

I'm not sure what should happen if the user deletes the invalid checkbox field from my example above. I think what should happen is that the value "2" is gone and the field appears as a checkbox the moment I add it back.

I agree that if unchecked then added back, the field should be in the 'intentional,' reset state - in the boolean example this would be the checkbox.

Lena_WMDE renamed this task from DRAFT - VE Template Dialog: Remove [[]] button to VE Template Dialog: Remove [[]] button.Aug 9 2021, 8:25 AM
ECohen_WMDE set the point value for this task to 3.Aug 11 2021, 1:58 PM

Change 715049 had a related patch set uploaded (by Andrew-WMDE; author: Andrew-WMDE):

[mediawiki/extensions/VisualEditor@master] Remove wikitext buttons from the content view

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

Change 715049 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Remove wikitext buttons from the content view

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

thiemowmde updated the task description. (Show Details)
thiemowmde moved this task from Demo to Done on the WMDE-TechWish-Sprint-2021-08-18 board.