-
Notifications
You must be signed in to change notification settings - Fork 4.2k
feat [FC-86]: add redirects to mfe for catalog-related legacy pages #37341
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
feat [FC-86]: add redirects to mfe for catalog-related legacy pages #37341
Conversation
Thanks for the pull request, @Serj-N! This repository is currently maintained by Once you've gone through the following steps feel free to tag them in a comment and let them know that your changes are ready for engineering review. 🔘 Get product approvalIf you haven't already, check this list to see if your contribution needs to go through the product review process.
🔘 Provide contextTo help your reviewers and other members of the community understand the purpose and larger context of your changes, feel free to add as much of the following information to the PR description as you can:
🔘 Get a green buildIf one or more checks are failing, continue working on your changes until this is no longer the case and your build turns green. Where can I find more information?If you'd like to get more details on all aspects of the review process for open source pull requests (OSPRs), check out the following resources: When can I expect my changes to be merged?Our goal is to get community contributions seen and reviewed as efficiently as possible. However, the amount of time that it takes to review and merge a PR can vary significantly based on factors such as:
💡 As a result it may take up to several weeks or months to complete a review and merge your PR. |
@Serj-N currently, I have noticed the following problems that we should fix: If At http://local.openedx.io:8000/ there is a correct transition to http://local.openedx.io:8000/courses/<course_id>/about If
If the user is logged in and |
@PKulkoRaccoonGang On |
@@ -175,6 +217,28 @@ def get_learning_mfe_home_url( | |||
return mfe_link | |||
|
|||
|
|||
def get_catalog_mfe_course_about_url( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why do we need this new function? Why can't we use the get_link_for_about_page
function that already exists and that you have already updated to work with the catalog MFE in #37342
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good observation, it does look like we can get rid of this function. However, to use the one from #37342, we will have to wait until that other PR is merged, so that we can pull the changes here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That PR has now merged, so let me know when the new version of this PR is ready to go.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, I refactored this PR now:
get_link_for_about_page
- now using this functionget_catalog_mfe_course_about_url
- removed
25bace7
to
b4e1d42
Compare
b4e1d42
to
6c31268
Compare
2U Release Notice: This PR has been deployed to the edX staging environment in preparation for a release to production. |
2U Release Notice: This PR has been deployed to the edX production environment. |
1 similar comment
2U Release Notice: This PR has been deployed to the edX production environment. |
Note
Depends on: #37342
Description
This PR adds support for redirecting users from legacy catalog-related pages to their new Catalog MFE equivalents, based on a site configuration key (
ENABLE_CATALOG_MICROFRONTEND
) and the appropriate settings feature as a fallback.Key changes:
index
,courses
, andcourse_about
views:ENABLE_CATALOG_MICROFRONTEND
is enabled.ENABLE_CATALOG_MICROFRONTEND
is enabled.ENABLE_CATALOG_MICROFRONTEND
is enabled.get_catalog_mfe_course_about_url
helper for accurate about-page URL construction.Testing Instructions
Before testing, make sure you have the changes from #37342.
Test Case 1:
ENABLE_CATALOG_MICROFRONTEND=False
local.openedx.io:8000
site configuration:Test Case 2:
ENABLE_CATALOG_MICROFRONTEND=True
local.openedx.io:8000
site configuration: