Skip to content

Commit 71376fa

Browse files
authored
feat: ENABLE_LEGACY_LIBRARY_MIGRATOR flag added (#2440)
- Adds the `ENABLE_LEGACY_LIBRARY_MIGRATOR` flag. **Reason:** The migrator frontend is finishing before the backend; this flag is mainly to hide it until it is fully connected and working with the backend. - Puts the migration warning under the new flag.
1 parent 23b4f47 commit 71376fa

5 files changed

Lines changed: 6 additions & 1 deletion

File tree

.env

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ ENABLE_ASSETS_PAGE=false
3636
ENABLE_VIDEO_UPLOAD_PAGE_LINK_IN_CONTENT_DROPDOWN=false
3737
ENABLE_TAGGING_TAXONOMY_PAGES=true
3838
ENABLE_CERTIFICATE_PAGE=true
39+
ENABLE_LEGACY_LIBRARY_MIGRATOR=false
3940
BBB_LEARN_MORE_URL=''
4041
HOTJAR_APP_ID=''
4142
HOTJAR_VERSION=6

.env.development

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ ENABLE_VIDEO_UPLOAD_PAGE_LINK_IN_CONTENT_DROPDOWN=true
3939
ENABLE_CERTIFICATE_PAGE=true
4040
ENABLE_NEW_VIDEO_UPLOAD_PAGE=true
4141
ENABLE_TAGGING_TAXONOMY_PAGES=true
42+
ENABLE_LEGACY_LIBRARY_MIGRATOR=true
4243
BBB_LEARN_MORE_URL=''
4344
HOTJAR_APP_ID=''
4445
HOTJAR_VERSION=6

.env.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ ENABLE_ASSETS_PAGE=false
3434
ENABLE_VIDEO_UPLOAD_PAGE_LINK_IN_CONTENT_DROPDOWN=true
3535
ENABLE_CERTIFICATE_PAGE=true
3636
ENABLE_TAGGING_TAXONOMY_PAGES=true
37+
ENABLE_LEGACY_LIBRARY_MIGRATOR=true
3738
BBB_LEARN_MORE_URL=''
3839
INVITE_STUDENTS_EMAIL_TO="[email protected]"
3940
ENABLE_HOME_PAGE_COURSE_API_V2=true

src/index.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,6 +171,7 @@ initialize({
171171
ENABLE_CERTIFICATE_PAGE: process.env.ENABLE_CERTIFICATE_PAGE || 'false',
172172
ENABLE_TAGGING_TAXONOMY_PAGES: process.env.ENABLE_TAGGING_TAXONOMY_PAGES || 'false',
173173
ENABLE_CHECKLIST_QUALITY: process.env.ENABLE_CHECKLIST_QUALITY || 'true',
174+
ENABLE_LEGACY_LIBRARY_MIGRATOR: process.env.ENABLE_LEGACY_LIBRARY_MIGRATOR || 'false',
174175
ENABLE_GRADING_METHOD_IN_PROBLEMS: process.env.ENABLE_GRADING_METHOD_IN_PROBLEMS === 'true',
175176
LIBRARY_UNSUPPORTED_BLOCKS: (process.env.LIBRARY_UNSUPPORTED_BLOCKS || 'conditional,step-builder,problem-builder').split(','),
176177
COURSE_TEAM_SUPPORT_EMAIL: process.env.COURSE_TEAM_SUPPORT_EMAIL || null,

src/studio-home/tabs-section/libraries-tab/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import React from 'react';
22
import { useIntl } from '@edx/frontend-platform/i18n';
33
import { Icon, Row } from '@openedx/paragon';
44
import { Error } from '@openedx/paragon/icons';
5+
import { getConfig } from '@edx/frontend-platform';
56

67
import AlertMessage from '@src/generic/alert-message';
78
import { LoadingSpinner } from '@src/generic/Loading';
@@ -48,7 +49,7 @@ const LibrariesTab = ({
4849
/>
4950
) : (
5051
<>
51-
<MigrateLegacyLibrariesAlert />
52+
{getConfig().ENABLE_LEGACY_LIBRARY_MIGRATOR === 'true' && (<MigrateLegacyLibrariesAlert />)}
5253
<div className="courses-tab">
5354
{sortAlphabeticallyArray(libraries).map(({
5455
displayName, org, number, url,

0 commit comments

Comments
 (0)