Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It's difficult to have the same logo in the MFEs and in the LMS #25

Closed
regisb opened this issue Nov 12, 2021 · 2 comments
Closed

It's difficult to have the same logo in the MFEs and in the LMS #25

regisb opened this issue Nov 12, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@regisb
Copy link
Contributor

regisb commented Nov 12, 2021

This issue was sparked from an earlier conversation about MFE branding: #16 (comment)

Currently, the MFE logo points to https(s)://LMS/static/images/logo.png. This is all well and good until we make use of a custom theme. Then, the logo path switches to /static//images/logo.png. For instance: https://demo.openedx.overhang.io/static/indigo/images/logo.png But the logo path remains the same in the MFE, thus triggering inconsistent visual output.

A clean solution would be to have a redirect in the LMS from /theme/images/logo.png to the actual logo url. This redirect should be a 301, because themes are subject to changes.

@regisb
Copy link
Contributor Author

regisb commented Nov 12, 2021

@BbrSofiane FYI

@regisb regisb self-assigned this Nov 12, 2021
@regisb regisb added the enhancement New feature or request label Nov 12, 2021
regisb added a commit to regisb/edx-platform that referenced this issue Nov 29, 2021
It is possible to set custom logos in microfrontends, for instance with the
LOGO_URL setting. Ideally, we would like that MFEs share the same logos as the
LMS. But this is made difficult when comprehensive theming is enabled, and the
logo is overridden by a custom theme. In that scenario, the logo url becomes
/static/mytheme/images/logo.png. But the MFEs do no know that the "mytheme"
theme is enabled. To resolve this issue, we introduce here a view, at the
"/theming/asset/<path>" url, that redirects to the corresponding asset in the
theme that is currently enabled. Thus, MFEs only have to set
`LOGO_URL=http://lmshost/theming/asset/images/logo.png` to point to the themed
logo.

Related issue: overhangio/tutor-mfe#25
pdpinch pushed a commit to openedx/edx-platform that referenced this issue Dec 2, 2021
It is possible to set custom logos in microfrontends, for instance with the
LOGO_URL setting. Ideally, we would like that MFEs share the same logos as the
LMS. But this is made difficult when comprehensive theming is enabled, and the
logo is overridden by a custom theme. In that scenario, the logo url becomes
/static/mytheme/images/logo.png. But the MFEs do no know that the "mytheme"
theme is enabled. To resolve this issue, we introduce here a view, at the
"/theming/asset/<path>" url, that redirects to the corresponding asset in the
theme that is currently enabled. Thus, MFEs only have to set
`LOGO_URL=http://lmshost/theming/asset/images/logo.png` to point to the themed
logo.

Related issue: overhangio/tutor-mfe#25
regisb added a commit to regisb/edx-platform that referenced this issue Dec 3, 2021
It is possible to set custom logos in microfrontends, for instance with the
LOGO_URL setting. Ideally, we would like that MFEs share the same logos as the
LMS. But this is made difficult when comprehensive theming is enabled, and the
logo is overridden by a custom theme. In that scenario, the logo url becomes
/static/mytheme/images/logo.png. But the MFEs do no know that the "mytheme"
theme is enabled. To resolve this issue, we introduce here a view, at the
"/theming/asset/<path>" url, that redirects to the corresponding asset in the
theme that is currently enabled. Thus, MFEs only have to set
`LOGO_URL=http://lmshost/theming/asset/images/logo.png` to point to the themed
logo.

Related issue: overhangio/tutor-mfe#25
pdpinch pushed a commit to openedx/edx-platform that referenced this issue Dec 3, 2021
It is possible to set custom logos in microfrontends, for instance with the
LOGO_URL setting. Ideally, we would like that MFEs share the same logos as the
LMS. But this is made difficult when comprehensive theming is enabled, and the
logo is overridden by a custom theme. In that scenario, the logo url becomes
/static/mytheme/images/logo.png. But the MFEs do no know that the "mytheme"
theme is enabled. To resolve this issue, we introduce here a view, at the
"/theming/asset/<path>" url, that redirects to the corresponding asset in the
theme that is currently enabled. Thus, MFEs only have to set
`LOGO_URL=http://lmshost/theming/asset/images/logo.png` to point to the themed
logo.

Related issue: overhangio/tutor-mfe#25
regisb added a commit that referenced this issue Dec 8, 2021
Previously, it was not possible to make the MFEs use the themed logo
from the LMS. This changed when this PR was merged:
https://github.com/edx/edx-platform/pull/29503
In Maple, the /theming/asset/images/logo.png url now redirects to the
themed logo.

Close #25.
regisb added a commit that referenced this issue Dec 14, 2021
- Previously, it was not possible to make the MFEs use the themed logo from the
  LMS. This changed when this PR was merged:
  https://github.com/edx/edx-platform/pull/29503 In Maple, the
  /theming/asset/images/logo.png url now redirects to the themed logo. Close #25.

- We disable New Relic globally by upgrading frontend-build for some packages.
  Close openedx/wg-frontend/issues/14
regisb added a commit that referenced this issue Dec 14, 2021
- Previously, it was not possible to make the MFEs use the themed logo from the
  LMS. This changed when this PR was merged:
  https://github.com/edx/edx-platform/pull/29503 In Maple, the
  /theming/asset/images/logo.png url now redirects to the themed logo. Close #25.

- We disable New Relic globally by upgrading frontend-build for some packages.
  Close openedx/wg-frontend/issues/14
@regisb
Copy link
Contributor Author

regisb commented Dec 14, 2021

This will be resolved in Maple.

@regisb regisb closed this as completed Dec 14, 2021
regisb added a commit that referenced this issue Dec 21, 2021
- Previously, it was not possible to make the MFEs use the themed logo from the
  LMS. This changed when this PR was merged:
  https://github.com/edx/edx-platform/pull/29503 In Maple, the
  /theming/asset/images/logo.png url now redirects to the themed logo. Close #25.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Development

No branches or pull requests

1 participant