Add Multiple choice input
Story
"As a team leader, I want my users to pick multiple items from a list so that I can understand which apply to them."
Full description
Create a new 'Multiple choice' input (as laid out in this design). This input should allow for a user to select multiple items from a list of choices.
For example (and for the use case driving this), a user might select several items from:
- Core Committers
- Marketing Workgroup
- Product Workgroup
- Frontend Workgroup
- Translation Workgroup
...And more, to indicate which of these groups the user has participated in over the last couple of weeks.
Completion criteria
- A new 'multiple choice' field should be created, with relevant interface and admin customization. A multiple choice field should have a list of options that can be selected, as well as a number of 'minimum selected', which should default to 1. A 'maximum selected' should be null/blank by default.
Consideration for development: The options might change in the definition for the future. Storing a useful value will be important here, in the case an option is removed later.
- Implement the input based on this design
Behavioral specifications
- When a user does not interact with a multiple checklist and the checklist is not required, it should have no effect on submission.
- When a user needs to select an item, the input should say 'Please select at least 1 choice.'
- When a user needs to select multiple items, the input should say, 'Please select at least x choices.'
- When a user needs to select a precise number of items (that is, minimum and maximum are the same), the input should say, 'Please select 1 choice.', or 'Please select x choices'.
- When a user needs to select a specific range of items (That is, minimum and maximum are different), it should say, "Please select between x and y choices.'
- If the minimum number selected is 0, and the task is required, automatically add an option 'None of the above' at the end, and don't consider the task completed if this is not selected.
Documentation updates & improvements criteria
- Left to the assignee’s appreciation
Review timeline
- PR to be sent for review by
- First PR review to be completed by
- [Optional] Draft/WIP PR sent for review by
Edited by Alison Hugo