overhangio / tutor-mfe

This plugin makes it possible to easily add micro frontend (MFE) applications on top of an Open edX platform that runs with Tutor.
GNU Affero General Public License v3.0
22 stars 95 forks source link

feat: add course authoring mfe base url to mfe config #195

Closed rpenido closed 8 months ago

rpenido commented 8 months ago

Description

This PR adds the "COURSE_AUTHORING_MFE_BASE_URL" to the mfe config pointing to the Course Authoring MFE address.

Additional Info

We are rendering a course authoring URL in an iFrame inside the library authoring as part of the Tagging Project, so we need to know the Course Authoring MFE address.

arbrandes commented 8 months ago

Shouldn't this be part of a (or the) Library Authoring plugin? There's an experimental one here.

rpenido commented 8 months ago

Shouldn't this be part of a (or the) Library Authoring plugin? There's an experimental one here.

As this config refers to the course-authoring url, I thing it is better to set it alongside with the others course-authoring configs. Also, if another MFE also needs it, it don't need to be set again in another plugin.

What do you think?

bradenmacdonald commented 8 months ago

@arbrandes I initially thought the same thing, because the Library Authoring MFE is currently the only MFE that uses this setting, but I lean toward putting it here. I think it makes more sense architecturally for the Course Authoring MFE to "announce itself" and tell other MFEs where to find it than for the Library Authoring MFE plugin to include code about how to find the Course Authoring MFE and to apply a variable about the Course Authoring MFE to all other MFEs. I'm fine with either approach though!