One of the current differences in WVUI and Wikit is the variables (design tokens) abstraction.
Comparison of design token abstraction approaches
Wikimedia Vue UI has been relying on WikimediaUI Base, which has seen an initial implementation based on OOUI widgets.
It has been following the idea of
- base variables that are applied in as many components as possible to clearly indicate going away from those -base variables needs to have a strong cause to add an extra variable
Many of above goals have been captured in WikimediaUI Base.
Wikit applies three type of variable levels:
- global (taking WikimediaUI base variables as values)
- alias
- component-level tokens
Additionally Wikit relies on JSON format for support of native platforms.
Please check WiKit's documentation to find out more about the use of design tokens in the context of the Wikidata/Wikibase design system.
Also have a look at the tokens listing https://wmde.github.io/wikit/?path=/story/design-tokens-colors--page
Open questions
- Abstraction issues to hunt down source of an issue (which in turn might lead to a lot of unnecessary overrides and less consistency)
- Reduce abstraction to only necessary level by reducing to component override tokens
- …together with additional level of abstraction in component-level tokensLayers of abstraction: 1. Direct CSS value, 2. Foundational style (example color value), 3. Base variable/token, 4. Abstracted group token (@border-color-input-binary--active), 5. Sinlge component token (@border-color-radio--active)
- Reflected in the elected proposal
- WiKit: Why is redefinition of base into global necessary?
- It's not.
- How do design tokens “ensure component reusability”?
- Limiting tokens to a shared, overseeable vocabulary, that ensures consistency, reducing the danger of too many one-off component overrides.
Conclusion from the Vue.js taskforce convening:
Follow WMF approach w. rare exceptions of single-use components tokens in separate file
Settle on base tokens file for general and grouped (f.e. input-binary specifics) tokens and on component tokens file, which will contain single-component-tokens only when needed.