Location (repository) of design tokens
Separate repos
Currently Wikimedia Foundation is building on top of WikimediaUI Base variables that are “living” in a separate repository on Gerrit.
Advantages:
- Separation of concerns
- Small and lean Git repo
- Separation of Git history
Disadvantages:
- Tokens are not easily updated in duo repo setup when directly working on components, possibly leading to an easily growing list of variables that need to be upstreamed and not the other way round (tokens available ahead)
Monorepo
Wikit in contrast has tokens part of their library in a monorepo, but with two different npm package definitions for the library and the tokens
Advantages:
- Updates are immediately visible in the component library
- Still exist as lone-standing npm package
- It could be an advantage to roll-out the library to MW core as one, to make the tokens more easily accessible beyond the component library
Disadvantages:
- Mixed Git history, that might long-term be hard to digest when for example unrelated design system changes are happening in the library, see Wikit log
- The tokens should be technically agnostic is requested in a different task, but then they live alongside one tech-choice implementation.
A separate solution could be a Git submodule approach. Although Foundation has seen trouble with those setups in the past and possibly in the future T268283.
WiKit ADR on monorepo vs separate repos.
Acceptance criteria
- Decide on repository location, single or joint monorepo. Monorepo it is, see last comment.
- Ensure that tokens are available not only for component library, but for MediaWiki core (& skins & extensions), and code projects outside MW as well