-
Notifications
You must be signed in to change notification settings - Fork 210
feat: Migrate Legacy Libraries Flow [FC-0097] #2425
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
Merged
ChrisChV
merged 24 commits into
openedx:master
from
open-craft:chris/FAL-4239-library-migration-ui
Sep 29, 2025
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
49c28de
feat: Base page for Migrate Legacy Libraries
ChrisChV 16cfe3f
Merge branch 'master' into chris/FAL-4239-library-migration-ui
ChrisChV 308f876
feat: Add link in the Migrate Legacy Libraries alert
ChrisChV 6453f84
feat: Build SelectDestinationView
ChrisChV 5d5e6a3
style: Fix broken lints
ChrisChV f80bd59
feat: Add create library modal in migrate legacy libraries page
ChrisChV c5ab851
test: Adding test for select destination view
ChrisChV f2ef680
feat: ConfirmationView step created
ChrisChV 930554f
style: Fix types
ChrisChV 3cc4735
Merge branch 'master' into chris/FAL-4239-library-migration-ui
ChrisChV 165ef2d
Merge branch 'master' into chris/FAL-4239-library-migration-ui
ChrisChV 225925a
refactor: Update CardItem to support slectMode
ChrisChV 224f09d
feat: Select legacy libraries in Migrate legacy libraries
ChrisChV 3e300ee
test: Fix broken tests
ChrisChV 2343d92
test: Fix coverage
ChrisChV 2b01d5a
Merge branch 'master' into chris/FAL-4239-library-migration-ui
ChrisChV 290946f
test: Fix coverage
ChrisChV 74f5a89
refactor: Delete MigrationStepsViewer an use Stepper.Header
ChrisChV 414d74a
style: Update the code with review feedback
ChrisChV 6bdb95e
style: Fix broken lint
ChrisChV 3b3fece
style: fix broken tests
ChrisChV 4a4b18c
style: Use FormattedMessage
ChrisChV 0f98ca3
style: Add comments in CreateLibrary
ChrisChV 7260b87
test: Add more test to fix coverage
ChrisChV File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| import { FormattedMessage } from '@edx/frontend-platform/i18n'; | ||
| import { | ||
| Alert, | ||
| Card, | ||
| Container, | ||
| Icon, | ||
| Stack, | ||
| } from '@openedx/paragon'; | ||
| import { | ||
| AccessTime, | ||
| Folder, | ||
| SubdirectoryArrowRight, | ||
| } from '@openedx/paragon/icons'; | ||
|
|
||
| import type { ContentLibrary } from '@src/library-authoring/data/api'; | ||
| import { LibraryV1Data } from '@src/studio-home/data/api'; | ||
| import { BoldText } from '@src/utils'; | ||
|
|
||
| import messages from './messages'; | ||
|
|
||
| interface ConfirmationCardProps { | ||
| legacyLib: LibraryV1Data; | ||
| destinationName: string; | ||
| } | ||
|
|
||
| const ConfirmationCard = ({ | ||
| legacyLib, | ||
| destinationName, | ||
| }: ConfirmationCardProps) => ( | ||
| <Card className="mb-3.5"> | ||
| <Card.Header | ||
| title={( | ||
| <Stack className="h4" direction="horizontal"> | ||
| <Icon className="mr-1" src={Folder} /> | ||
| <span>{legacyLib.displayName}</span> | ||
| </Stack> | ||
| )} | ||
| subtitle={( | ||
| <Stack className="mb-1.5" direction="horizontal"> | ||
| <Icon className="mr-1.5" src={SubdirectoryArrowRight} /> | ||
| <span>{destinationName}</span> | ||
| </Stack> | ||
| )} | ||
| /> | ||
| {legacyLib.isMigrated && ( | ||
| <Stack className="ml-3.5 mt-1 mb-2 text-gray-500" direction="horizontal"> | ||
| <Icon className="mr-1.5" src={AccessTime} /> | ||
| <span className="x-small"> | ||
| <FormattedMessage | ||
| {...messages.previouslyMigratedAlert} | ||
| values={{ | ||
| libraryName: legacyLib.migratedToTitle, | ||
| b: BoldText, | ||
| }} | ||
| /> | ||
| </span> | ||
| </Stack> | ||
| )} | ||
| </Card> | ||
| ); | ||
|
|
||
| interface ConfirmationViewProps { | ||
| destination: ContentLibrary; | ||
| legacyLibraries: LibraryV1Data[]; | ||
| } | ||
|
|
||
| export const ConfirmationView = ({ | ||
| destination, | ||
| legacyLibraries, | ||
| }: ConfirmationViewProps) => ( | ||
| <Container className="confirmation-view"> | ||
| <Alert variant="info"> | ||
| <FormattedMessage | ||
| {...messages.confirmationViewAlert} | ||
| values={{ | ||
| count: legacyLibraries.length, | ||
| libraryName: destination.title, | ||
| b: BoldText, | ||
| }} | ||
| /> | ||
| </Alert> | ||
| {legacyLibraries.map((legacyLib) => ( | ||
| <ConfirmationCard | ||
| legacyLib={legacyLib} | ||
| destinationName={destination.title} | ||
| /> | ||
| ))} | ||
| </Container> | ||
| ); | ||
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.