Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This sets up Codex components and design tokens so we can start using them. No actual components are migrated to Codex yet. Components from Wikit can be used directly in our own components. The build is set up so that, when Special:NewLexeme is used within MediaWiki, Codex will be imported from there; this means that our build should get substantially smaller once we don’t need Wikit anymore. In the dev entry point, Codex comes from node_modules/ as expected. (Notice that the styles are only imported in index.html, so they won’t be included in our build output either. As far as I could tell, Vite doesn’t have a CSS equivalent of `external` JS packages in vite.config.ts yet.) When MediaWiki upgrades to a new Codex version, Special:NewLexeme will use the new versions of the Codex components (and their styles) immediately. For the design tokens from Codex, we will start by directly importing them into each component that uses them, where they will end up being included (inlined) in the build. This means that design tokens used in our own components will be outdated after a MediaWiki upgrade to a new Codex version until we update this repository and push a new build to WikibaseLexeme. We will continue to investigate whether we can use them in some way that will automatically update them instead. (The solution will almost certainly involve using the tokens via CSS variables, but currently only a subset of the design tokens is available as CSS variables, and even then this depends on the skin. We might be able to get more variables added by MediaWiki, or we might add the variables in WikibaseLexeme ourselves.) Bug: T369505
- Loading branch information