Page MenuHomePhabricator

Don't show toolbar in LanguageVariantInspector text targets
Open, Needs TriagePublic


Although syntactically it's possible to have formatting inside language variants, anything other than plain text is almost always bad practice.

Therefore the toolbars (there's one per variant) encourage the editor to do the wrong thing, whilst also making the inspector larger and more unwieldy, especially on mobile:

LanguageVariantInspector1.png (596×402 px, 39 KB)

Normally each variant is a single word or short phrase, so the interface feels quite excessive in use.

Event Timeline

Change 698330 had a related patch set uploaded (by Divec; author: Divec):

[mediawiki/extensions/VisualEditor@master] WIP: Don't show toolbar in MWLanguageVariantInspector text targets

Without the toolbars, the interface is less unwieldy and easier to navigate, especially on mobile:

LanguageVariantInspector2.png (596×402 px, 39 KB)

Discussed in meeting today. This makes sense. *Ideally* there would be a way to pop up the toolbar (a small "expand" icon or something like that?) for those cases where there is rich text present, but as @dchan points out, best practice is really *not* to include rich text here. My recollection is that the common case that shows up in rules ends up being either simple boldface or italics markup (which really belongs outside the -{ ... }- markup but sometimes ends up inside) or else <span> tags -- in the latter case the intended usage is something like a gloss "xyz in traditional (pdq in simplified characters)" where the <span> is used to format the gloss. But most cases this will be done with a template anyway.

My recollection is that the toolbar was hidden by default when I originally implemented this inspector, though I could be mistaken. So restoring to that behavior seems acceptable.饿死鬼叭噗 is a reasonable test case with a number of instances of explicit language conversion rules in the source.