Closed blarghmatey closed 2 years ago
@asadiqbal08 I think you did similar work on https://github.com/openedx/frontend-component-header
@blarghmatey just for an example, can you tell us what route you would want to use for this MFE?
The route will be managed by the env variables during the build, but for sake of argument we'll likely put it at /authoring
@blarghmatey for a quick refresh, Can you please reference the frontend-app-learning
that working in the desired manner ? and in the authoring MFE
what actually are you expecting to change ?
So, this is the learning MFE that we use which has the relative path functionality available to it. For the authoring MFE we would like to be able to deploy it so that it will expect to load at a particular route on the domain where it's deployed. As it currently exists it expects that all interactions with it will happen at the root path (/
) of an arbitrary domain. This boils down to a setting in the React router which should be handled in the frontend-platform
repository, but I believe there's some wiring in the authoring MFE that needs to be included to take advantage of that.
@pdpinch @blarghmatey After installing the library-authoring-mfe
, Checking out its routing paths and after reading out some previous discussion over this thread. I think we might not need any specific change in this MFE and we just be able to use the public_path
as we are doing for learning MFE.
I am able to run the MFE after getting pull of this repo and did this locally.
PUBLIC_PATH
variable to /authoring
in .env.development — This will be set in .env in the productionfrontend-app-library-authoring
container to reload the above change e.g. — make dev.restart-container.frontend-app-library-authoring
Now, I am able to load the pages on the following routes.
http://localhost:3001/authoring/library/lib:uetX:CSPROB
Let me know, If we are good with this approach ?
In order to support the Blockstore plugin functionality for edx-platform we will need to be able to deploy the library authoring MFE (https://github.com/openedx/frontend-app-library-authoring). That MFE does not currently support path-based routing, which forces us to use a dedicated subdomain to run it. We would like to update the code to include support for path-based routing in the same manner as frontend-app-learning, frontend-app-gradebook, etc.