I am using a fork of the authn mfe.
I am trying to make changes to the mfe styles. When I add the link of @edx/brand repo in the indigo theme plugin it works, but when I do the same in a custom plugin hook, it doesn’t work.
This is what the plugin looks like:
from tutor import hooks
hooks.Filters.ENV_PATCHES.add_items(
[
(
"mfe-dockerfile-post-npm-install-authn",
"""
RUN npm install '@edx/brand@git+https://github.com/.../brand-openedx.git#branch_name'
"""
),
]
)
Additionally, I want to be able to create a setting where I can make changes to the brand package locally and see the changes immediately in the tutor dev mode. Is there a way achieve this?
I also tried to use a local checkout of the brand package as mentioned here. This works but only for the tutor local and not for tutor dev. The commands also show up when I build authn-dev images, but no change to styles of mfe when i do tutor dev start.
Then start tutor dev start authn and make changes to brand-openedx. Those will reflect automatically.
Sometimes, changes won’t reflect as your page will show the cached version. In this case, you can run tutor dev restart authn and simply reload the page. My recommendation to you is to use incognito mode of browser.
Hi @hinakhadim , I was able to see my styles changes following your setup. But the logos are still using indigos. Is there a way for it to use my custom logos in the brand-openedx?
edx-brand package updates the styles only. To update the logo, you have to use a custom theme plugin like tutor-indigo. When you will create your theme plugin, do the following:
In **custom-theme**/templates/**customtheme**/lms/static/images/ folder, add your logo with filename logo.png and footer_logo.png.
Run command to set this theme as new theme. Refer to docs
I’ve tried mounting the brand package with tutor mounts add /path/to/brand-customized, however when I pull up the MFE (tutor dev start learning), I get the following:
learning-1 | Resolving modules from local directories via module.config.js.
learning-1 | Using local version of @edx/brand from ../brand-customized/.
learning-1 | Error: Cannot find module '/openedx/brand-customized/package.json'
I do have a package.json in my local brand directory, so I suspect the mount point was set incorrectly.