Page MenuHomePhabricator

Generalise VE's category input to a "Capsule input" widget in OOjs-UI core
Closed, DuplicatePublic

Description

The VE category input has the following classes:

oo-ui-widget oo-ui-widget-enabled oo-ui-draggableGroupElement oo-ui-draggableGroupElement-horizontal ve-ui-mwCategoryWidget

Which makes me believe it's a VE-specific widget.

This should be generalised so we can use similar inputs in other places in the UI.

From the LSG draft:

Capsule inputs are a special input fields which recognize valid input, and transform the input into a control within the input field. The capsules may be able to be dragged and dropped within the input field or themselves be comboboxes with additional fields. Use capsule inputs when a field should contain distinct structured data. Capsule input fields may be combined with search input to help users input correct data into a capsule input. Examples of capsule input might be categories, tags, to the recipient field of a message.