Background
While working on the new A/B test forms, we took the opportunity to restyle the Location component we have to fill the sample_rate per wiki when registering/updating an instrument/experiment. But, in favour of prioritizing other work, we decided to work on this a bit later.
Suggested solution
The current "Sample unit" and "Locations and sampling rate" present a set of visual and copy issues that we could address to make it more user-friendly. In the new design proposal:
- The section under which the fields are grouped could be called "Sampling"
Sample unit field:
- The "Sample unit" field is now placed before the Location module (now called "Project and sample size") to attempt to make the relationship between parameters clearer
- The "Sample unit" presents a new description and includes a "Learn more" link to https://wikitech.wikimedia.org/wiki/Metrics_Platform/Analytics_sampling
- The select component's placeholder is updated to "Select the sample unit"
- The "Sample unit" field options include descriptions (see designs below)
Project and sample size:
- The current "Location and sample rate" field is replaced by a new "Project and sample size" module
- The label "Location" is replaced by "Wiki project"
- The current custom multi-value lookup used to select locations/projects is replaced by the new LookupMultiselect component
- The label "Sample rate" is replaced by "Sample size"
- The "Sample rate" field allows users to enter values as percentages. Ideally, the field could be prefilled with a percentage symbol to simplify the input of the value
- Icon-only buttons of the type quiet are used instead of normal buttons to allow the deletion of project entries
Considerations
- Please consider breaking down this task and tackling the replacement of the custom chip input component separately, in case it adds too much effort.
- It'd be ideal if we could validate the input of percentages higher than 100%. This effort could be captured in a separate ticket
- This is an initial iteration on a part of the configuration that proved to be challenging for users during our recent exploration. It is assumed that the changes will suppose an improvement, but that removing the complexity attached to this specialized field would require further explorations and validation.
- Please feel free to improve any copy in case inaccuracies are detected
Acceptance Criteria
- The new "Sample size per project" module is used in the A/B test and baseline instrument forms
- In both artifact forms, the adjusted "Sample unit "field is placed before the "Sample size per project"
- The fields are grouped in their own section called "Sampling" right under the "Schema" section in the instrument form and the "Details" section in the A/B test form


