openedx / frontend-app-discussions

A React-based micro frontend for the Open edX discussion forums.
GNU Affero General Public License v3.0
6 stars 63 forks source link

Favicon and siteName not rendering in the title on Tutor #667

Closed Danyal-Faheem closed 6 months ago

Danyal-Faheem commented 7 months ago

Issue

When we use this MFE on Tutor, I haven't had the opportunity to test it on devstack, the favicon and siteName in the title do not render. Similarly, the title is not translated into the current language, it always shows in English as is defined in the index.html file: https://github.com/openedx/frontend-app-discussions/blob/ac17fd72943972590b3126b004c51c4bae8480f2/public/index.html#L4

Possible Reason

This is likely due to this MFE trying to access the favicon directly in the assets folder as it is being done here: https://github.com/openedx/frontend-app-discussions/blob/ac17fd72943972590b3126b004c51c4bae8480f2/src/index.jsx#L17

In the other MFEs, they use the react-helmet package to override the head tag, similar to how it is being done in the profile MFE here.

How to reproduce

  1. Install any version of tutor
  2. Create a superuser using the command: tutor local do createuser --staff --superuser yourusername user@email.com
  3. Sign in to tutor with the created user
  4. Import the demo course using the command: tutor local do importdemocourse
  5. Visit the discussions page for the demo course at this url
  6. The favicon and the sitename will not render.

Or you can just visit the sandbox environment, which is running Tutor version 17.0.0. You can visit it at this link