Allow the sorting of the toolbar widget to be configured by region first, or language first
Opened this issue · 2 comments
chrisdmacrae commented
Right now we default to:
- Showing a list of regions (if present) + a list of languages w/o region
- Selecting a region results in a push to a sub-menu to select the language for that region
- Selecting a language w/o region selects that locale
We want:
- Context to take an "sortBy" prop, which can be
language
,region
- If sortBy is
language
, then the initial list is all languages, and:- If that language has regions, we push to a menu that lets you select the raw language (if it is a locale on its own) or the regionalized language
- If sortBy is
region
, we keep the current behaviour, but move languages w/o regions to the top of the list instead of the bottom.
jbevis commented
chrisdmacrae commented
@jbevis the latter! All toolbar plugins are registered and rendered via inversion of control, so you don’t have direct control over their props, generally.
Context is the keeper of the keys for any of our react-specific logic, and the API class is where the fundamental business logic should live.