Skip to content

Commit

Permalink
feat!: Remove unused feature flag
Browse files Browse the repository at this point in the history
[APER-2922]

This PR removes the `USE_LR_MFE` feature flag. This feature flag was initially added to redirect learners back to the legacy frontend in Credentials when viewing a Program Record. This was so we could release the Learner Record MFE in phases while we were implementing the design.

Now that the legacy frontend has been removed from Credentials, this functionality and feature flag is no longer needed.
  • Loading branch information
justinhynes committed Oct 23, 2023
1 parent edf5132 commit 8fc16a7
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 31 deletions.
13 changes: 6 additions & 7 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,16 +77,15 @@ Environment Variables/Setup Notes

Currently, this MFE is not intergrated into the devstack, and must be run locally. This MFE requires credentials to be running, and will use a REST API from the Credentials IDA located at `credentials/apps/records/rest_api`.

Credentials uses 2 enviroment variables to link to this MFE:
Credentials requires configuring a Django setting to support directing traffic to the Learner Record MFE:

* ``USE_LEARNER_RECORD_MFE`` -- Toggles the navigation in credentials to redirect to this MFE
* ``LEARNER_RECORD_MFE_RECORDS_PAGE_URL`` -- The URL for the base URL of this MFE
* ``LEARNER_RECORD_MFE_RECORDS_PAGE_URL`` -- The base URL of the Learne Record MFE

More details for these flags can be found in the base configuration of credentials: ``credentials/settings/base``
This MFE has 2 flags of its own:
For more info, see the Learner Records documentation on ReadTheDocs: https://edx-credentials.readthedocs.io/en/latest/learner_records.html.

This MFE has a setting of its own:

* ``SUPPORT_URL_LEARNER_RECORDS`` -- A link to a help/support center for learners who run into problems whilst trying to share their records
* ``USE_LR_MFE`` -- A toggle that when on, uses the MFE to host shared records instead of the the old UI inside of credentials

Verifiable Credentials
......................
Expand Down Expand Up @@ -188,4 +187,4 @@ Please do not report security issues in public. Please email [email protected]
.. |Codecov| image:: https://codecov.io/gh/edx/frontend-app-learner-record/branch/master/graph/badge.svg
:target: https://codecov.io/gh/edx/frontend-app-learner-record
.. |license| image:: https://img.shields.io/npm/l/@edx/frontend-app-learner-record.svg
:target: https://github.com/openedx/frontend-app-learner-record/blob/master/LICENSE
:target: https://github.com/openedx/frontend-app-learner-record/blob/master/LICENSE
2 changes: 1 addition & 1 deletion src/components/ProgramRecordsList/ProgramRecordsList.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ function ProgramRecordsList() {
<div className="d-flex align-items-center pt-3 pt-lg-0">
<Hyperlink
variant="muted"
destination={getConfig().USE_LR_MFE ? `/${record.uuid}` : `${getConfig().CREDENTIALS_BASE_URL}/records/programs/${record.uuid}/`}
destination={`/${record.uuid}`}
>
<Button variant="outline-primary">
<FormattedMessage
Expand Down
41 changes: 18 additions & 23 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,30 +25,26 @@ subscribe(APP_READY, () => {
<HelmetProvider>
<Head />
<Header />
{getConfig().USE_LR_MFE ? (
<Routes>
<Routes>
<Route
path={ROUTES.PROGRAM_RECORDS}
element={<AuthenticatedPageRoute><ProgramRecordsList /></AuthenticatedPageRoute>}
/>
<Route
path={ROUTES.PROGRAM_RECORD_SHARED}
element={<ProgramRecord isPublic />}
/>
<Route
path={ROUTES.PROGRAM_RECORD_ITEM}
element={<AuthenticatedPageRoute><ProgramRecord isPublic={false} /></AuthenticatedPageRoute>}
/>
{getConfig().ENABLE_VERIFIABLE_CREDENTIALS && (
<Route
path={ROUTES.PROGRAM_RECORDS}
element={<AuthenticatedPageRoute><ProgramRecordsList /></AuthenticatedPageRoute>}
path={ROUTES.VERIFIABLE_CREDENTIALS}
element={<AuthenticatedPageRoute><ProgramCertificatesList /></AuthenticatedPageRoute>}
/>
{getConfig().ENABLE_VERIFIABLE_CREDENTIALS && (
<Route
path={ROUTES.VERIFIABLE_CREDENTIALS}
element={<AuthenticatedPageRoute><ProgramCertificatesList /></AuthenticatedPageRoute>}
/>
)}
<Route
path={ROUTES.PROGRAM_RECORD_SHARED}
element={<ProgramRecord isPublic />}
/>
<Route
path={ROUTES.PROGRAM_RECORD_ITEM}
element={<AuthenticatedPageRoute><ProgramRecord isPublic={false} /></AuthenticatedPageRoute>}
/>
</Routes>
) : (
<ProgramRecordsList />
)}
)}
</Routes>
<Footer />
</HelmetProvider>
</AppProvider>,
Expand All @@ -65,7 +61,6 @@ initialize({
config: () => {
mergeConfig({
SUPPORT_URL_LEARNER_RECORDS: process.env.SUPPORT_URL_LEARNER_RECORDS || '',
USE_LR_MFE: process.env.USE_LR_MFE || false,
ENABLE_VERIFIABLE_CREDENTIALS: process.env.ENABLE_VERIFIABLE_CREDENTIALS || false,
SUPPORT_URL_VERIFIABLE_CREDENTIALS: process.env.SUPPORT_URL_VERIFIABLE_CREDENTIALS || '',
}, 'LearnerRecordConfig');
Expand Down

0 comments on commit 8fc16a7

Please sign in to comment.