-
Notifications
You must be signed in to change notification settings - Fork 15
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
Support for the Learning MFE #81
Comments
Path-based routing doesn't appear to be implemented in the learning MFE. Is that a requirement for Maple? |
Our findings so far:
|
@cmltaWt0, since you did such a great job on the ecommerce MFEs, would you be interested in investigating what needs to be done to get the learning MFE up and running on current master? At this point we're mostly interested in how easy/difficult it would be just to get it working. We're not after a PR to edx/configuration, for instance. (The end goal would actually be a PR to Tutor, when/if we get there.) |
Can we have some more specifics for "reasonably themeable"? Are the current Lilac MFE's reasonably themeable? |
@nedbat, good question. IIRC, this line comes from when we were discussing what to do about the MFEs we would support for Lilac - before we found out how hard theming would be. As far as I'm concerned, we can ditch that line. (Possibly in favor of a dedicated issue to keep track of theming developments. #36 would be a good start, for instance.) |
Yeap. I think it's reasonable (not such reasonable as I'll participate in this investigation. |
There are four .env settings in frontend-app-learning for logos. What are they for? Is it possible to annotate these similar to other settings? LOGO_URL='' For example, is the |
@pdpinch does this now-merged OSPR address your question on path-based routing? https://openedx.atlassian.net/browse/OSPR-5847 |
Thanks for the link @jmyatt. I think that commit was necessary for other MFEs to work, but frontend-app-learning is still missing the basic support. |
Those four variables are mentioned in the general MFE developer docs: |
FYI, we're starting work on making frontend-app-learning support path-based routing like the other MFEs. |
The way I know to theme frontends is to extend the default theme and use your new custom theme. This repo's readme has instructions: https://github.com/edx/brand-openedx Is that what you meant? |
Looks like the learning MFE is working in Tutor :) I am currently working on getting Tutor to run with the Open edX master branches; the result will be available in the "edge" branches of the tutor main repo and the mfe plugin. That's it! I just wanted to share this small achievement :-) |
@regisb how are you handling the routing in Tutor? (I should look and see for myself, but I thought I'd ask if it's a quick question) |
Traffic first goes through Caddy (for SSL termination), then Nginx (for proxying), then another Caddy server (in the MFE container). The MFE container holds all the static assets for all microfrontends. The Caddy server in this MFE container serves static assets from multiple directory locations. Here is the Caddy configuration file: https://github.com/overhangio/tutor-mfe/blob/master/tutormfe/templates/mfe/build/mfe/Caddyfile The following values are added to the LMS settings: https://github.com/overhangio/tutor-mfe/blob/master/tutormfe/patches/openedx-lms-production-settings Does that answer your question? |
FYI, the learning MFE has a hard-coded header and doesn't use the npm aliases mechanism described here: https://edx.readthedocs.io/projects/edx-developer-docs/en/latest/developers_guide/micro_frontends_in_open_edx.html#overriding-brand-specific-elements This means that the header will be brandable (change styling), but not override-able (change functionality) today. |
@davidjoy do you know what would be involved in making the header (and footer) override-able? Is that something that could be fixed in an OSPR? |
Yes... I think we could. It might be a smidge complicated. I think the right thing to do is to move a basic, generic version of the header in the learning MFE into the frontend-component-header repository and export it from there as something like In the future, we could also add other headers (like |
@davidjoy I did not dig deep enough into the MFE source code to fully understand your explanations above; nonetheless, the process seems rather complex for a task that is a frequent requirement of most Open edX operators. Is there any way to improve and document the theming of MFEs to tell our users a better story? |
This task would be a one-time refactor of the code in the learning MFE that would enable operators to make their own customized versions of the header. The existing mechanism for doing that is to use an npm alias to point The process of using the npm alias is described here: https://edx.readthedocs.io/projects/edx-developer-docs/en/latest/developers_guide/micro_frontends_in_open_edx.html#overriding-brand-specific-elements |
As far as I understand the same architecture as for frontend-app-ecommerce should be applied. |
Yup - it should be very similar. I think line 1 of index.jsx ends up looking like:
... for instance, since we'll need to move the existing header into that repo and then use it. |
@regisb And I've encountered missing waffle flag in hooks for lms. Next we could discuss the following flags to add:
Also I can't get the fully working learning app - it still stuck in Loading state (deployed from nightly branches from scratch). Next steps:
UPD:
As a result the learning app is perfectly working: @regisb we definitely must compare our installations to get what I've missed (because it simply doesn't work by default). UPD2: I've managed to make tutor works with latest MFEs. Couple PRs were and will be opened to fix some issues blocked us from running it smoothly on the tutor nightly + edx-platform master. |
@cmltaWt0 about the flags you mentioned, only Removal of Removal of |
Thanks @jmyatt ! @regisb It's my fault with flag in tutor-mfe's PR. I have to revert the PR (it makes no effect on the logic). |
@davidjoy related to the suggestion above, Can you please take a look over the approach here ? |
@davidjoy Could you support me in the comment above by pointing a person to ask for the list of features or it's simpler to create an issue in the learning repo? |
|
Thanks for this - I left a few comments over there which I think can help reduce the scope. |
I believe the "Discover New" link was removed intentionally when we created the header in the learning MFE. Are you looking for a list of features that are in the Learning MFE's header today? Otherwise I don't think it's changed too much from the legacy one. |
Frontend WG is also tracking this issue: openedx/wg-frontend#24 |
If it's just one intentional change - it's fine. I'm just wondering about any other changes could be missed unintentionally. |
My gut/memory says that's the one intentional change. |
@davidjoy following your comment/suggestion here, I have been discussing that with @pdpinch and @asadiqbal08, You are suggesting to export different versions of the header inside the header-componenet, so for an app that is using the header, it would feel that it's a collection of headers types..etc. Regarding how to implement that, I would assume that we should not create different/separate components for each use case, e.g. learning, studio, standard..etc. And should rather make sure that all these versions are inheriting the standard one. Why? So that if we want to change something in the future, we shouldn't look for every version of the component and change it.. Do you agree with my assumption or is it too early to decide how the architecture of the component should be |
My expectation is that the frontend-component-header repository would export a collection of headers specific to different domains (marketing, LMS, courseware, studio, ecommerce, etc.) and different MFEs would use the one appropriate to their domain. The components we export, like Future: I expect that over time we can add configuration props to these headers to make them a bit more flexible, reducing the need for many operators to fork the frontend-component-header repository. The micro-frontend configuration 2.0 epic in the FWG (https://github.com/openedx/frontend-wg/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22MFE+Config+2.0%22) is probably a pre-requisite for this, as it will allow us more flexibility and expressiveness when configuring MFEs. Specifically, it would allow us to pass an Object of properties to be passed to the header from environment-specific configuration. |
hi |
Hi I need to know how can I add copy protection in mfe learning app |
Hi @rahulkg666 . This is not the right place to ask for help. Please use the forums instead. |
Description
Coordinate, and if necessary execute, the tasks necessary to get the Learning MFE up to speed for Maple.
Acceptance Criteria
The Learning MFE should:
Wishlist
The following is a collection of what the community has expressed interest in. Any single item may be "upgraded" to the Acceptance Criteria above, pending discussion.
The text was updated successfully, but these errors were encountered: