frontend-app-learning icon indicating copy to clipboard operation
frontend-app-learning copied to clipboard

Preview site not in MFE

Open angonz opened this issue 1 year ago • 2 comments

As a course author, I would like to preview a course unit with the same MFE experience as for the live content.

Currently, the "Preview" button in Studio redirects to the legacy version of a course. There's a thread open in the forum about this topic.

To replicate, go to Studio, edit a course, go to any unit, and hit "Preview". image

angonz avatar Sep 11 '24 15:09 angonz

@kdmccormick please check.

angonz avatar Sep 11 '24 15:09 angonz

I can confirm that this is an existing issue. I was on the team that migrated Open edX from its Legacy course UI to the Learning Micro-Frontend. We ran out of project time before we could migrate the Preview feature over to the Learning MFE, so it still uses the Legacy UI today.

The specific technical limitation is that the Learning MFE fetches course data from a set of read-optimized HTTP APIs. These APIs make the course load faster, but they currently only have access to "published" course content. The Preview feature relies on the ability to read "draft" (unpublished) course content, which only the legacy UI supports.

This needs to be resolved at some point so that we can remove the Legacy course UI, but it has not been planned or scheduled yet.

kdmccormick avatar Sep 11 '24 16:09 kdmccormick

Completed via edx-plaform PR #35747 frontend-app-learning PR #1501 frontend-app-learning PR #1508

KristinAoki avatar Nov 07 '24 15:11 KristinAoki

Amazing, thank you @KristinAoki !

Before we close this out, I'm going to do some verification, particularly around data caches which are populated only when a unit is published. FYI @ormsbee .

kdmccormick avatar Nov 07 '24 15:11 kdmccormick

@KristinAoki: This is fantastic! Thank you!

ormsbee avatar Nov 07 '24 15:11 ormsbee

This is currently causing an issue with jump_to URLs in Tutor Nightly: https://github.com/openedx/edx-platform/pull/35747#discussion_r1832950520

kdmccormick avatar Nov 07 '24 16:11 kdmccormick

Update: This is only still open because we need to some more validation of what has been merged. I expect to be able to do this within the next few weeks.

kdmccormick avatar Feb 18 '25 18:02 kdmccormick

I reviewed and tested the new preview functionality and did not find any new issues. It looks like the new preview functionality faithfully re-produces this bug which we should fix at some point but for now I think we can close this. Master is already running with the MFE preview and it will be available in the Teak release.

@sarina @crathbun428 FYI for release notes purposes.

feanil avatar Mar 26 '25 14:03 feanil

@feanil what do you think the release note should be? Is this just a "potpourri" note?

sarina avatar Mar 31 '25 22:03 sarina

Yea, I think the core of the note is something like - "Improvement: Preview now uses the new MFE so it better reflects the content that learners will see in your course."

feanil avatar Apr 01 '25 19:04 feanil

Sure, I added to this page: https://openedx.atlassian.net/wiki/spaces/OEPM/pages/4913561601/Potpourri+Product+Facing+for+Teak

Feel free to add any smaller Product improvements to this page.

sarina avatar Apr 02 '25 17:04 sarina