Skip to content

Commit cd59ec8

Browse files
committed
Fix assessments tab height
1 parent 3a226c0 commit cd59ec8

4 files changed

Lines changed: 61 additions & 9 deletions

File tree

contentcuration/contentcuration/frontend/channelEdit/components/edit/EditModal.vue

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
>
1414
<VCard class="edit-modal-wrapper">
1515
<Uploader
16+
class="uploader-container"
1617
allowMultiple
1718
displayOnly
1819
:uploadingHandler="createNodesFromUploads"
@@ -96,7 +97,10 @@
9697
</ResizableNavigationDrawer>
9798

9899
<!-- Main editing area -->
99-
<VContent>
100+
<VContent
101+
class="edit-modal-content"
102+
:class="{ 'has-bottom-bar': showBottomBar }"
103+
>
100104
<VLayout
101105
v-if="loadError"
102106
align-center
@@ -126,7 +130,7 @@
126130
</template>
127131
</Uploader>
128132
</VCard>
129-
<BottomBar v-if="!loading && !loadError && !showFileUploadDefault">
133+
<BottomBar v-if="showBottomBar">
130134
<FileStorage
131135
v-if="showStorage"
132136
class="mx-2"
@@ -311,6 +315,9 @@
311315
showFileUploadDefault() {
312316
return this.uploadMode && !this.nodeIds.length;
313317
},
318+
showBottomBar() {
319+
return !this.loading && !this.loadError && !this.showFileUploadDefault;
320+
},
314321
nodeIds() {
315322
return (this.detailNodeIds && this.detailNodeIds.split(',')) || [];
316323
},
@@ -656,6 +663,8 @@
656663
657664
<style lang="scss" scoped>
658665
666+
@import '../../../shared/styles/variables';
667+
659668
::v-deep .v-toolbar__extension {
660669
padding: 0;
661670
@@ -673,7 +682,6 @@
673682
}
674683
675684
::v-deep .v-content__wrap {
676-
max-height: calc(100vh - 128px);
677685
overflow-y: auto;
678686
}
679687
@@ -690,4 +698,17 @@
690698
z-index: 5 !important;
691699
}
692700
701+
.edit-modal-content {
702+
height: 100%;
703+
704+
&.has-bottom-bar {
705+
// Reserve room for the fixed BottomBar
706+
padding-bottom: $bottom-bar-height !important;
707+
}
708+
}
709+
710+
.uploader-container {
711+
height: 100%;
712+
}
713+
693714
</style>

contentcuration/contentcuration/frontend/channelEdit/components/edit/EditView.vue

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,11 @@
2424
</VFlex>
2525
</VLayout>
2626
</VContainer>
27-
<VLayout v-else>
28-
<VFlex grow>
27+
<div
28+
v-else
29+
class="edit-view-layout-wrapper"
30+
>
31+
<div class="edit-view-layout">
2932
<ToolBar
3033
v-if="showTabs"
3134
:flat="!tabsElevated"
@@ -116,6 +119,7 @@
116119
</ToolBar>
117120
<VContainer
118121
fluid
122+
class="tab-content"
119123
:style="questionsTabStyles"
120124
>
121125
<VTabsItems v-model="currentTab">
@@ -174,8 +178,8 @@
174178
</VTabItem>
175179
</VTabsItems>
176180
</VContainer>
177-
</VFlex>
178-
</VLayout>
181+
</div>
182+
</div>
179183
</VContainer>
180184

181185
</template>
@@ -441,10 +445,26 @@
441445
z-index: 5;
442446
}
443447
448+
.edit-view-layout-wrapper {
449+
height: 100%;
450+
}
451+
452+
.edit-view-layout {
453+
display: flex;
454+
flex-direction: column;
455+
min-height: 100%;
456+
}
457+
444458
.container {
445459
width: unset;
446460
}
447461
462+
.tab-content {
463+
// Override Vuetify's default margin for VContainer, which is not needed in this layout.
464+
margin-right: 0;
465+
margin-left: 0;
466+
}
467+
448468
.v-alert {
449469
padding: 10px;
450470
margin: 15px;
@@ -473,7 +493,7 @@
473493
474494
.wrapper {
475495
min-width: 100%;
476-
max-height: inherit;
496+
height: 100%;
477497
overflow: auto;
478498
}
479499
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// Shared SCSS variables. Import this partial wherever a value needs to stay in
2+
// sync across components.
3+
4+
// Height of the fixed BottomBar. Content that sits behind the bar reserves the
5+
// same amount of room for it.
6+
$bottom-bar-height: 64px;

contentcuration/contentcuration/frontend/shared/views/BottomBar.vue

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,8 @@
3636

3737
<style lang="scss" scoped>
3838
39+
@import '../styles/variables';
40+
3941
.bottom-bar {
4042
position: fixed;
4143
bottom: 0;
@@ -44,7 +46,10 @@
4446
display: flex;
4547
align-items: center;
4648
width: 100%;
47-
height: 64px;
49+
// This value has impact on other modules that depend on it, if you need to change it,
50+
// change the variable value instead, so that all modules that depend on it are
51+
// updated accordingly.
52+
height: $bottom-bar-height;
4853
}
4954
5055
</style>

0 commit comments

Comments
 (0)