Skip to content
Merged
Show file tree
Hide file tree
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 Sep 2, 2025
16cfe3f
Merge branch 'master' into chris/FAL-4239-library-migration-ui
ChrisChV Sep 2, 2025
308f876
feat: Add link in the Migrate Legacy Libraries alert
ChrisChV Sep 2, 2025
6453f84
feat: Build SelectDestinationView
ChrisChV Sep 3, 2025
5d5e6a3
style: Fix broken lints
ChrisChV Sep 3, 2025
f80bd59
feat: Add create library modal in migrate legacy libraries page
ChrisChV Sep 3, 2025
c5ab851
test: Adding test for select destination view
ChrisChV Sep 3, 2025
f2ef680
feat: ConfirmationView step created
ChrisChV Sep 5, 2025
930554f
style: Fix types
ChrisChV Sep 5, 2025
3cc4735
Merge branch 'master' into chris/FAL-4239-library-migration-ui
ChrisChV Sep 17, 2025
165ef2d
Merge branch 'master' into chris/FAL-4239-library-migration-ui
ChrisChV Sep 25, 2025
225925a
refactor: Update CardItem to support slectMode
ChrisChV Sep 5, 2025
224f09d
feat: Select legacy libraries in Migrate legacy libraries
ChrisChV Sep 9, 2025
3e300ee
test: Fix broken tests
ChrisChV Sep 25, 2025
2343d92
test: Fix coverage
ChrisChV Sep 25, 2025
2b01d5a
Merge branch 'master' into chris/FAL-4239-library-migration-ui
ChrisChV Sep 25, 2025
290946f
test: Fix coverage
ChrisChV Sep 25, 2025
74f5a89
refactor: Delete MigrationStepsViewer an use Stepper.Header
ChrisChV Sep 26, 2025
414d74a
style: Update the code with review feedback
ChrisChV Sep 26, 2025
6bdb95e
style: Fix broken lint
ChrisChV Sep 26, 2025
3b3fece
style: fix broken tests
ChrisChV Sep 26, 2025
4a4b18c
style: Use FormattedMessage
ChrisChV Sep 29, 2025
0f98ca3
style: Add comments in CreateLibrary
ChrisChV Sep 29, 2025
7260b87
test: Add more test to fix coverage
ChrisChV Sep 29, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/generic/unlink-modal/UnlinkModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ import {
} from '@openedx/paragon';
import { Warning } from '@openedx/paragon/icons';
import { useIntl } from '@edx/frontend-platform/i18n';
import { BoldText } from '@src/utils';

import messages from './messages';
import LoadingButton from '../loading-button';

const BoldText = (chunk: string[]) => <b>{chunk}</b>;

type UnlinkModalPropsContainer = {
displayName?: string;
category?: string;
Expand Down
2 changes: 2 additions & 0 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ import { ContentType } from './library-authoring/routes';

import 'react-datepicker/dist/react-datepicker.css';
import './index.scss';
import { LegacyLibMigrationPage } from './legacy-libraries-migration/LegacyLibMigrationPage';

const queryClient = new QueryClient({
defaultOptions: {
Expand Down Expand Up @@ -65,6 +66,7 @@ const App = () => {
<Route path="/home" element={<StudioHome />} />
<Route path="/libraries" element={<StudioHome />} />
<Route path="/libraries-v1" element={<StudioHome />} />
<Route path="/libraries-v1/migrate" element={<LegacyLibMigrationPage />} />
<Route path="/library/create" element={<CreateLibrary />} />
<Route path="/library/:libraryId/*" element={<LibraryLayout />} />
<Route
Expand Down
1 change: 1 addition & 0 deletions src/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
@import "certificates/scss/Certificates";
@import "group-configurations/GroupConfigurations";
@import "optimizer-page/scan-results/ScanResults";
@import "legacy-libraries-migration/";

// To apply the glow effect to the selected Section/Subsection, in the Course Outline
div.row:has(> div > div.highlight) {
Expand Down
89 changes: 89 additions & 0 deletions src/legacy-libraries-migration/ConfirmationView.tsx
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,
Comment thread
ChrisChV marked this conversation as resolved.
}}
/>
</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>
);
Loading