Skip to content
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: Only display Preview Language Setting (dark_lang) in LMS #36271

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kdmccormick
Copy link
Member

@kdmccormick kdmccormick commented Feb 18, 2025

Description

We disable the Studio Preview Language Setting Page, and redirect it to the identical LMS Preview Language Setting page. This is one of the final bits of the legacy Studio frontend. By making it render only in LMS, we unblock the full retirement of the legacy Studio frontend.

Supporting info

Before

There were two views allowing to staff to choose to preview a "dark" language, both of which are completely identical in functionality. The only difference is the header, footer, and styling surrounding them.

1. Studio Context (<CMS_ROOT_URL>/update_lang)

image

2. LMS Context (<LMS_ROOT_URL>/update_lang)

image

After

The Studio URL (1) will simply redirect to the LMS URL (2). In other words, the Preview Language Setting page will only render in an LMS context.

This has no impact on end-user functionality. It has only a very minor UX end-user impact (LMS header+footer rather than Studio header+footer). The LMS styling seems to be better, anyway.

Test instructions

  • Navigate to <CMS_BASE>/update_lang
  • Log in as global staff
  • You should be redirected to <LMS_BASE>/update_lang.
  • Enter a language code (e.g., es)
  • Confirm that both Studio and LMS appear in that language.

Other information

The actual affect of this simple page is to set a UserPreference item with the key dark-lang, allowing staff to see what their Open edX looks like in a language which is not (yet) available to users in general. Assuming that this is a useful feature, we will need to reimplement the page in an MFE eventually. My thought is that the Account Settings page in frontend-app-account is the correct destination for this if and when it is written. If it is not rewritten, we will need to DEPR it.

Previously, there were two (identical) ways to preview dark language:

1. <CMS_ROOT_URL>/update_lang
2. <LMS_ROOT_URL>/update_lang

Now, (1) will simply redirect to (2). So, the Preview Language Setting
page will only render in an LMS context. This has no impact on end-user
functionality. It has only a very minor UX end-user impact.

The purpose of this is to allow us to completely retire the legacy
Studio frontend without losing any end-user functionality. This page is
not yet available in an MFE, which will need to be the eventual
solution.
@kdmccormick kdmccormick added the create-sandbox open-craft-grove should create a sandbox environment from this PR label Feb 18, 2025
@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

@open-craft-grove
Copy link

Sandbox deployment successful 🚀
🎓 LMS
📝 Studio
ℹ️ Grove Config, Tutor Config, Tutor Requirements

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
create-sandbox open-craft-grove should create a sandbox environment from this PR
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants