Page MenuHomePhabricator

VisualEditor: "Clear formatting" should never be highlighted
Closed, ResolvedPublic

Description

I'm not sure if this was done on purpose, but when selecting text containing some formatting in some or all of the selected text (e.g. part of a link and some text after it, or part of a bolded string) the toolbar shows the "Clear formatting" button highlighted (similarly to how the "Bold" icon is highlighted when selecting bolded text).

The toolbar is supposed to reflect current state of selected text. Showing the "Clear formatting" button already activated seems like an impossible state (it would theoretically mean some hypothetical "clear" annotation is applied to the selected text, which is incorrect. The only case in which that would technically be correct is if you apply text that is already cleared of formatting).

This highlighting for the "Clear formatting" button is confusing from a UX point of view. I would associate it with how "bold" is highlighted when bolding is applied.

When encountering this strange UX behaviour earlier today, it took me a while to figure out what it is supposed to mean (longer than it should for an intuitive editor). I don't think this is because I'm familiar with VisualEditor's previous state, but more in general.

I think the correct approach would be to never highlight the clear formatting button in the toolbar, and have it be an "apply" button, you select text, and then activate (not deactivate) "clear formatting".

This concept also exists in other popular editors.

Alternatively, though that would be a new concept for people to learn, perhaps change the icon to something that means the opposite of no formatting, so that it being turned on for selected text, and being able deactivate it, like it currently does, actually makes sense as an action take.


Version: unspecified
Severity: normal

Details

Reference
bz58371

Event Timeline

bzimport raised the priority of this task from to Low.Nov 22 2014, 2:15 AM
bzimport set Reference to bz58371.

Created attachment 14068
Selecting text spanning across a link shows "Clear formatting" active

Attached:

ve-selection-clearformatting.png (638×390 px, 44 KB)

Created attachment 14069
When using the link inspector, "Link" and "Clear formatting" are active

Attached:

ve-selection-link_clearformatting.png (888×592 px, 71 KB)

This was done in the changes to the toolbar.

This now happens again. If you:

  1. Select an image
  2. Click Bold. This bolds the caption (this is a separate bug)
  3. Select something else, then select the image again (otherwise the clear formatting button doesn't get enabled)
  4. Click Clear Formatting.
  5. Observe that Clear Formatting is now depressed.

Obviously there are lots of other weird things going on, but it seems that the only way that Clear Formatting button manages to not be depressed is by assuming that it will always successfully clear all formatting and therefore be disabled next.