Page MenuHomePhabricator

Add combobox to VE to display suggested values
Closed, ResolvedPublic1 Estimated Story Points

Description

Requirements

  • Implement behind feature flag
  • If parameter has the property of 'Suggested values' in TemplateData, the values are displayed using the OOUI widget: ComboBoxInputWidget (filtering on input)
    • Only have this visible for the following parameter types: Content, Line, String, Unknown, Number, Unbalanced wikitext. Otherwise, hide suggested values.
  • Users can add a value not included in suggested values. If a user does this, display the following message after clicking out of the widget: "This is not one of the suggested values and may not work with the template." This is displayed using OOUI widget: FieldLayout with notice message
  • Ensure the above requirements work on mobile
  • Ensure the above requirements work on RTL

Mocks

Screen Shot 2021-01-13 at 11.22.06.png (196×481 px, 24 KB)

Related tickets

Relevant prototype commits:

Event Timeline

Lena_WMDE renamed this task from DRAFT: Add combobox to VE to display suggested values to Add combobox to VE to display suggested values.Jan 27 2021, 2:13 PM
Lena_WMDE set the point value for this task to 5.Jan 27 2021, 2:26 PM

Change 670856 had a related patch set uploaded (by Andrew-WMDE; owner: Andrew-WMDE):
[mediawiki/extensions/VisualEditor@master] [WIP] Add a combo box for suggested values in the transclusion dialog

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

Andrew-WMDE changed the point value for this task from 5 to 1.Mar 31 2021, 8:30 AM
awight moved this task from Review to Sprint Backlog on the WMDE-TechWish-Sprint-2021-03-31 board.
awight added subscribers: Andrew-WMDE, awight.

Changes to implement after team discussion:

  • Only show suggested values combo for these types: Content, Line, String, Unknown, Number, unbalanced wikitext
  • For all other parameter types, even if the TemplateData API returns suggestedvalues, ignore these and do not show the combo box in the UI.
  • Re-add the feature flag from earlier patchsets, to control whether the suggested values element is shown at all. Default to false.

Change 670856 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Add a combo box for suggested values in the transclusion dialog

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

Need to use the combo box component, so that typing auto-selected matching options.

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

[mediawiki/extensions/VisualEditor@master] Add filtering for the suggested values combo box

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

Change 679316 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Add filtering for the suggested values combo box

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

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

[mediawiki/extensions/VisualEditor@wmf/1.37.0-wmf.1] Add filtering for the suggested values combo box

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

Change 679462 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@wmf/1.37.0-wmf.1] Add filtering for the suggested values combo box

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

Mentioned in SAL (#wikimedia-operations) [2021-04-20T11:38:25Z] <wmde-fisch@deploy1002> Synchronized php-1.37.0-wmf.1/extensions/VisualEditor/modules/ve-mw/ui/pages/ve.ui.MWParameterPage.js: Backport: [[gerrit:679462|Add filtering for the suggested values combo box (T271898)]] (duration: 00m 58s)