Page MenuHomePhabricator

(MS 3) Create Quantity input component
Closed, ResolvedPublic8 Estimated Story Points

Description

As a DS designer and developer, I want to have a new quantity input component available, because it is needed in the Query Builder.

Screenshot 2021-02-17 at 11.56.22.png (486×844 px, 43 KB)

ACs

  • The quantity input component is implemented according to the Figma specs and follows the behavior and accessibility principles defined in the component documentation.
  • The quantity input's behavior matches that of its individual fields (extended number input component + lookup component)
  • The quantity input is documented in Storybook according to the specifications (see below)
  • clicking the label focuses the extended number input

States

Each one of the component inputs will display the same states as the original core components.
Note: Both fields work separately from one another (i.e. when hovering one field, the other field is not affected).

Storybook:

This component has its own pages in Storybook, included under a new section called "Wikibase Components" (see structure):

  • A Quantity input page including controls: they allow users to enter custom text to replace the default label, and make the component disabled

Notes:

  • The two inputs could be combined to form the group using a mixin. The core input group (base component of the quantity input) doesn't need to be created/documented as a component.
  • If the composition created using a mixin, the assumption is that we'll need mixin tokens. If new tokens are required, let Sarai know.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Sarai-WMDE renamed this task from Create quantity input component to Create Quantity input component.Jan 26 2021, 6:37 PM
Sarai-WMDE updated the task description. (Show Details)
amy_rc renamed this task from Create Quantity input component to (MS 3) Create Quantity input component.Jan 27 2021, 2:39 PM
amy_rc moved this task from Incoming to Backlog on the Wikidata Query Builder board.
Lydia_Pintscher set the point value for this task to 8.
NOTE: Get started with this component in parallel to T273796 by using a TextInput until T273796 is done

https://github.com/wmde/wikit/pull/378

This leaves the validation and parsing to the application, for now at least. But that can be moved to the component with little effort, if we still want it.