Skip to content

Commit 95ec41d

Browse files
authored
feat: dock buttons to the bottom in import course stepper (#2694)
1 parent e620d70 commit 95ec41d

File tree

2 files changed

+46
-25
lines changed

2 files changed

+46
-25
lines changed

src/library-authoring/import-course/index.scss

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,22 @@
1717
.text-decoration-underline {
1818
text-decoration: underline;
1919
}
20+
21+
.import-course-stepper {
22+
.import-container {
23+
// Calculate all the screen size subtracting the height of the header and title and top/bottom margins
24+
min-height: calc(calc(100vh - 60px - 61px) - calc(var(--pgn-spacing-spacer-base) * 6));
25+
}
26+
27+
.content-buttons {
28+
width: 100%;
29+
position: sticky;
30+
bottom: 0;
31+
}
32+
33+
[class*="col-"] {
34+
// To avoid create an empty gray space between the main content and the sidebar
35+
padding-right: 0;
36+
padding-left: 0;
37+
}
38+
}

src/library-authoring/import-course/stepper/ImportStepperPage.tsx

Lines changed: 27 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export const ImportStepperPage = () => {
112112
}
113113

114114
return (
115-
<div className="d-flex">
115+
<div className="import-course-stepper d-flex">
116116
<div className="flex-grow-1">
117117
<Helmet>
118118
<title>{libraryData.title} | {process.env.SITE_NAME}</title>
@@ -128,7 +128,7 @@ export const ImportStepperPage = () => {
128128
size: undefined,
129129
}}
130130
/>
131-
<Container className="mt-4 mb-5">
131+
<Container className="mt-4">
132132
<div className="px-4 bg-light-200 border-bottom">
133133
<SubHeader
134134
title={intl.formatMessage(messages.importCourseStepperTitle)}
@@ -137,29 +137,31 @@ export const ImportStepperPage = () => {
137137
</div>
138138
<Layout xs={[{ span: 9 }, { span: 3 }]}>
139139
<Layout.Element>
140-
<Stepper activeKey={currentStep}>
141-
<Stepper.Header />
142-
<Stepper.Step
143-
eventKey="select-course"
144-
title={intl.formatMessage(messages.importCourseSelectCourseStep)}
145-
>
146-
<CoursesList
147-
selectedCourseId={selectedCourseId}
148-
handleSelect={setSelectedCourseId}
149-
cardMigrationStatusWidget={MigrationStatus}
150-
/>
151-
</Stepper.Step>
152-
<Stepper.Step
153-
eventKey="review-details"
154-
title={intl.formatMessage(messages.importCourseReviewDetailsStep)}
155-
>
156-
<ReviewImportDetails
157-
markAnalysisComplete={setAnalysisCompleted}
158-
courseId={selectedCourseId}
159-
/>
160-
</Stepper.Step>
161-
</Stepper>
162-
<div className="mt-4">
140+
<div className="import-container px-4">
141+
<Stepper activeKey={currentStep}>
142+
<Stepper.Header />
143+
<Stepper.Step
144+
eventKey="select-course"
145+
title={intl.formatMessage(messages.importCourseSelectCourseStep)}
146+
>
147+
<CoursesList
148+
selectedCourseId={selectedCourseId}
149+
handleSelect={setSelectedCourseId}
150+
cardMigrationStatusWidget={MigrationStatus}
151+
/>
152+
</Stepper.Step>
153+
<Stepper.Step
154+
eventKey="review-details"
155+
title={intl.formatMessage(messages.importCourseReviewDetailsStep)}
156+
>
157+
<ReviewImportDetails
158+
markAnalysisComplete={setAnalysisCompleted}
159+
courseId={selectedCourseId}
160+
/>
161+
</Stepper.Step>
162+
</Stepper>
163+
</div>
164+
<div className="content-buttons mt-5 px-5 py-2 bg-white box-shadow-up-1">
163165
{currentStep === 'select-course' ? (
164166
<ActionRow className="d-flex justify-content-between">
165167
<Button variant="outline-primary" onClick={() => navigate('../import')}>

0 commit comments

Comments
 (0)