In OOUI, we have three "base" classes that define the behavior of choosing between multiple items:
All of the above inherit directly from OO.ui.Widget and are standalone, so even OO.ui.MultiselectWidget is not a SelectWidget. That's another confusing factor.
It is extremely unclear what the differences are between them, and they have weirdly different behaviors. Some of those behaviors may be the valid differences, but some may "just" be a matter of inconsistencies that we should fix, and it's really hard to tell which is which.
- What is the difference between OO.ui.CheckboxMultioptionWidget vs OO.ui.CheckboxMultiselectWidget ?
- Event mismatch;
- ButtonSelectWidget and OO.ui.RadioSelectWidget inherit from SelectWidget and emit either choose or select events
- OO.ui.CheckboxMultioptionWidget inherits from OO.ui.MultioptionWidget and emits a change event that has the same purpose as choose/select but no distinction between the originator.
- OO.ui.CheckboxMultiselectWidget inherits from OO.ui.MultiselectWidget and emits either a change or a select event, but change is emitted not just for change of state, but also for change of elements
The inconsistencies with event and with the purpose is making it really hard to decide when to use which widget and which base widget to use to extend and create another selection-based widget.
We need to review those and decide:
- Is it valid to have three types of base selection widgets at all?
- If it is valid, how can we make sure that we properly document the differences between the base widgets and the top widgets that use either?
- Is it reasonable to merge terminology and make sure that a "change" and "select" (and, potentially, "choose") event are relatively consistent with what the user of those widget expects? can we consolidate terminology and behavior to be more consistent?