Page MenuHomePhabricator

Shorten "add parameter" and "add template" button labels (VE template dialog)
Closed, ResolvedPublic1 Estimated Story Points

Description

Both the "add undocumented parameter" and template search components have add buttons with long labels which don't work well on mobile, especially in longer languages.

Requirements

  • Shorten undocumented parameter input button label to "Add"
  • Shorten template search button to "Add"

Note: change applies to desktop, mobile, and narrow-mode

Mocks

Screen Shot 2022-06-22 at 09.15.10.png (1×764 px, 97 KB)

Screen Shot 2022-06-22 at 09.15.53.png (1×750 px, 138 KB)

Event Timeline

@ECohen_WMDE, is this only for the mobile view, or should the buttons always say "Add", no matter in which context they appear?

@thiemowmde Good question. This change would affect all views/contexts, not only mobile - I'll add to the requirements so it's clear.

Also responding to a question that came up in story time: should we add a min-width to the input field?

  • I don't think so, since currently the input shrinking is how the OOUI component adapts to smaller screens. If we set a minimum-width, then the button would have to adapt if the label too long to fit (either by wrapping underneath the field or adding a line break within the word, increasing the height of the button/field). While a small input is not ideal, the component design doesn't work well with these other options either. Hopefully this change decreases the severity of the problem. I tested with german (Hinzufügen) and the input still allows for ~25 characters to be visible at one time.

Change 811286 had a related patch set uploaded (by Awight; author: Awight):

[mediawiki/extensions/VisualEditor@master] Shorten text for add buttons

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

awight moved this task from Doing to Tech Review on the WMDE-TechWish-Sprint-2022-06-22 board.
WMDE-Fisch set the point value for this task to 1.

Change 811286 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Shorten text for add buttons

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

Sidebar "Add template" and header for the add template section should still use the long label.

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

[mediawiki/extensions/VisualEditor@master] Use "Add template" label in the sidebar and as the header

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

Change 811685 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Use "Add template" label in the sidebar and as the header

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

Lena_WMDE moved this task from Demo to Done on the WMDE-TechWish-Sprint-2022-07-06 board.