Skip to content

Commit 3b2adc2

Browse files
authored
feat: reorder components in unit page [FC-00083] (#1816)
Reorders components in unit page via drag and drop. This PR also refactors and moves draggable list and sortable item components to appropriate location. Course authors will be affected by this change.
1 parent 4bd2c3b commit 3b2adc2

26 files changed

Lines changed: 262 additions & 52 deletions

src/course-outline/CourseOutline.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,12 @@ import HighlightsModal from './highlights-modal/HighlightsModal';
4545
import EmptyPlaceholder from './empty-placeholder/EmptyPlaceholder';
4646
import PublishModal from './publish-modal/PublishModal';
4747
import PageAlerts from './page-alerts/PageAlerts';
48-
import DraggableList from '../generic/drag-helper/DraggableList';
48+
import DraggableList from './drag-helper/DraggableList';
4949
import {
5050
canMoveSection,
5151
possibleUnitMoves,
5252
possibleSubsectionMoves,
53-
} from '../generic/drag-helper/utils';
53+
} from './drag-helper/utils';
5454
import { useCourseOutline } from './hooks';
5555
import messages from './messages';
5656
import { getTagsExportFile } from './data/api';

src/course-outline/CourseOutline.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,3 +7,4 @@
77
@import "./highlights-modal/HighlightsModal";
88
@import "./publish-modal/PublishModal";
99
@import "./xblock-status/XBlockStatus";
10+
@import "./drag-helper/SortableItem";

src/course-outline/CourseOutline.test.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ import {
5959
moveUnitOver,
6060
moveSubsection,
6161
moveUnit,
62-
} from '../generic/drag-helper/utils';
62+
} from './drag-helper/utils';
6363

6464
let axiosMock;
6565
let store;
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

src/course-outline/section-card/SectionCard.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ import classNames from 'classnames';
1313
import { setCurrentItem, setCurrentSection } from '../data/slice';
1414
import { RequestStatus } from '../../data/constants';
1515
import CardHeader from '../card-header/CardHeader';
16-
import SortableItem from '../../generic/drag-helper/SortableItem';
17-
import { DragContext } from '../../generic/drag-helper/DragContextProvider';
16+
import SortableItem from '../drag-helper/SortableItem';
17+
import { DragContext } from '../drag-helper/DragContextProvider';
1818
import TitleButton from '../card-header/TitleButton';
1919
import XBlockStatus from '../xblock-status/XBlockStatus';
2020
import { getItemStatus, getItemStatusBorder, scrollToElement } from '../utils';

0 commit comments

Comments
 (0)