Just a quick update to let you know that our team at eduNEXT has been working on updating the MFEs using the Teak.1 and design token branches. Here’s the list of MFEs we’ve already created:
I recommend merging a shared base Teak.1 design token package into a centralized library (if not already done) and documenting token usage patterns clearly—this way, any issues or updates can be managed in one place and reused across MFEs. Let me know if you’d like support aligning this!
I also noticed the branch is named ednx-release/teak.master, which implies to me these are “all the things we want for our teak releases” branches instead of “teak.1 with design tokens” branches.
My goal for creating teak-design-tokens branches on the upstream repos was to bring over only the changes required for design tokens support. If I’m misunderstanding the diff and that is the intention of these branches please let me know and I’ll happily create upstream teak-design-tokens branches based off them!
Thanks again for doing this, it really helps a ton!
@brian.smith Thanks for reaching out! We created the ednx-release/teak.master branches by merging the upstream teak.1 branches with the respective master-design-token branches. Our intention was specifically to bring in only the changes required for design tokens support.
The naming convention ednx-release/teak.master was chosen to reflect our internal naming style and to indicate that these branches were meant to support design tokens in our Teak-based releases. Since design tokens are already supported in teak, we didn’t need to introduce any custom changes beyond what’s already upstream.
I’d like to clarify this a bit. The release/teak branches and the teak.1 tags of MFEs do not support design tokens. The current master branches of MFEs do support design tokens, and that support will make it into the Ulmo release.
There’s a slight issue with that strategy. The master-design-tokens branches were tracking master until they landed on master, meaning anything that landed on master between the creation of the teak branches and design tokens landing made it into the master-design-tokens branches.
What’s confusing to me now is how the ednx-release/teak.master branch got to a place where it is 14 commits ahead of release/teak.
If I were to make teak-design-tokens branches from scratch I would:
Create a new branch off release/teak or teak.1
Cherry-pick the feat!: add design tokens support commit
Fix any conflicts and get it building/working
That isn’t the only option, and I’m not opposed to using a different strategy, but seeing this commit (chore: temporarily disabled notification preferences course dropdown (#1246)), in the diff between ednx-release/teak.master and release/teak makes me worry the current strategy resulted in unintended changes from master making it in.
from tutormfe.hooks import MFE_APPS
@MFE_APPS.add()
def _use_design_tokens(mfes):
for mfe_name, mfe in mfes.items():
mfe["version"] = "teak-design-tokens"
return mfes
Rebuild the mfe image
tutor images build mfe
Note: if you run into issues rebuilding the mfe image you can try using --no-cache.
Using design tokens based brand packages
Using npm aliasing
Install and enable the following plugin
from tutor import hooks
hooks.Filters.ENV_PATCHES.add_item(
(
"mfe-dockerfile-post-npm-install",
"""
RUN npm install '@edx/brand@YOUR_ALIAS_HERE'
"""
)
)
To test this with a simple example brand package you can replace YOUR_ALIAS_HERE with github:brian-smith-tcril/brand-example-purple#174be977c9f8c7aa11591f4c6887506da72d8191.
Rebuild the mfe image
tutor images build mfe
Note: if you run into issues rebuilding the mfe image you can try using --no-cache.
To test this with a simple example brand package you can replace YOUR_BRAND_OVERRIDE_URL with https://cdn.jsdelivr.net/gh/brian-smith-tcril/brand-example-purple@bb6b7797e629c96192d0676a2cbd879b11488fa0/dist/light.min.css
@Ibrahima in your post you mentioned using .scss files. With design tokens, styles should be defined using tokens (.json or .toml files), and then the Paragon CLI can be used to transform the tokens into CSS variables.
The example brand package I mentioned in my previous comment is indeed quite minimal (it just changes the brand color). A good real world example of a Paragon 23/design tokens based brand package is 2U’s Elm theme.
This question is out of scope for this thread. Please create a new post for this and add as much detailed information as possible to your question there.