feat: Only display Preview Language Setting (dark_lang) in LMS #36271
+2
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
)2. LMS Context (
<LMS_ROOT_URL>/update_lang
)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
<CMS_BASE>/update_lang
<LMS_BASE>/update_lang
.es
)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.