Skip to content

Commit

Permalink
Fix Scrolling Containers
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablosanqt committed Oct 23, 2024
1 parent ffba759 commit a693dbc
Show file tree
Hide file tree
Showing 9 changed files with 52 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
}

@media (max-width: 768px) {
max-height: calc(100vh - var(--header-height) - var(--message-input-height-prod)) !important;
max-height: calc(100dvh - var(--header-height) - var(--message-input-height-prod)) !important;
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
position: absolute;
top: 10%;
left: 0;
height: 90%;
height: 80%;
width: 100%;
display: flex;
align-items: center;
Expand All @@ -64,6 +64,7 @@
}

.coursewide-search .posting-infinite-scroll-container {
max-height: calc(73vh - var(--header-height) - var(--search-channel-header-height));
max-height: calc(60vh - var(--header-height) - var(--search-channel-header-height));
max-height: calc(60dvh - var(--header-height) - var(--search-channel-header-height));
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,27 @@
/>
</div>
}

@if (_activeConversation && newPost && canCreateNewMessageInConversation(_activeConversation)) {
<div class="d-block d-sm-none">
@if (getAsChannel(_activeConversation)?.isAnnouncementChannel) {
<div class="pt-2">
<button class="btn btn-md btn-primary" (click)="createEditModal.open()" jhiTranslate="artemisApp.metis.newAnnouncement"></button>
<jhi-post-create-edit-modal
#createEditModal
[posting]="newPost!"
[isCommunicationPage]="true"
(onCreate)="createEmptyPost(); scrollToBottomOfMessages()"
/>
</div>
} @else {
<jhi-message-inline-input class="message-input" [posting]="newPost!" (onCreate)="createEmptyPost(); scrollToBottomOfMessages()" />
}
</div>
}
</div>
@if (_activeConversation && newPost && canCreateNewMessageInConversation(_activeConversation)) {
<div>
<div class="d-none d-sm-block">
@if (getAsChannel(_activeConversation)?.isAnnouncementChannel) {
<div class="pt-2">
<button class="btn btn-md btn-primary" (click)="createEditModal.open()" jhiTranslate="artemisApp.metis.newAnnouncement"></button>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@import 'bootstrap/scss/functions';
@import 'bootstrap/scss/variables';
@import 'bootstrap/scss/mixins';

.conversation-messages {
--message-input-height-prod: 171px;
--message-input-height-dev: 187px;
Expand Down Expand Up @@ -40,11 +44,15 @@
}

.posting-infinite-scroll-container {
max-height: calc(74vh - var(--message-input-height-prod) - var(--search-height) - var(--channel-header-height));
max-height: calc(75vh - var(--message-input-height-prod) - var(--search-height) - var(--channel-header-height));
overflow-y: auto;

&.content-height-dev {
max-height: calc(74vh - var(--message-input-height-dev) - var(--search-height) - var(--channel-header-height));
max-height: calc(75vh - var(--message-input-height-dev) - var(--search-height) - var(--channel-header-height));

@include media-breakpoint-down(sm) {

Check warning on line 53 in src/main/webapp/app/overview/course-conversations/layout/conversation-messages/conversation-messages.component.scss

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/main/webapp/app/overview/course-conversations/layout/conversation-messages/conversation-messages.component.scss#L53

Unexpected unknown at-rule "@include" (at-rule-no-unknown)
max-height: calc(90dvh - var(--message-input-height-dev) - var(--search-height) - var(--channel-header-height));
}
}
}

Expand Down
2 changes: 2 additions & 0 deletions src/main/webapp/app/overview/course-overview.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ $transition-color-length: 0.2s;

@media (max-width: 768px) {
height: calc(100vh - var(--sidebar-footer-height-prod)) !important;
height: calc(100dvh - var(--sidebar-footer-height-prod)) !important;
}

&.exam-wrapper {
Expand Down Expand Up @@ -88,6 +89,7 @@ $transition-color-length: 0.2s;

@media (max-width: 768px) {
height: calc(100vh - var(--sidebar-footer-height-prod)) !important;
height: calc(100dvh - var(--sidebar-footer-height-prod)) !important;
}
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
@import 'bootstrap/scss/functions';
@import 'bootstrap/scss/variables';
@import 'bootstrap/scss/mixins';

.answer-post {
background-color: var(--metis-answer-post-background-color);
border-radius: 7px;
Expand All @@ -6,3 +10,9 @@
.answer-post-content-margin {
padding-left: 3.2rem;
}

@include media-breakpoint-down(sm) {

Check warning on line 14 in src/main/webapp/app/shared/metis/answer-post/answer-post.component.scss

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/main/webapp/app/shared/metis/answer-post/answer-post.component.scss#L14

Unexpected unknown at-rule "@include" (at-rule-no-unknown)
.answer-post-content-margin {
padding-left: 0.5rem;
}
}
4 changes: 3 additions & 1 deletion src/main/webapp/app/shared/metis/metis.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ $profile-picture-height: 2.15rem;
@include media-breakpoint-down(sm) {

Check warning on line 128 in src/main/webapp/app/shared/metis/metis.component.scss

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

src/main/webapp/app/shared/metis/metis.component.scss#L128

Unexpected unknown at-rule "@include" (at-rule-no-unknown)
.post-header-author-date {
flex-direction: column;
gap: 0 !important;
}

.post-content-margin {
Expand All @@ -138,7 +139,8 @@ $profile-picture-height: 2.15rem;
display: none;
}

.post-header-date {
.post-header-date span {
color: $secondary;
font-size: 0.75rem !important;
}
}
3 changes: 2 additions & 1 deletion src/main/webapp/app/shared/sidebar/sidebar.component.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
height: calc(100vh - var(--sidebar-footer-height-dev) - var(--header-height) - var(--search-height));
}
@media (max-width: 768px) {
height: calc(100vh - var(--sidebar-footer-height-prod) - var(--header-height) - var(--search-height)) !important;
height: calc(100dvh - var(--sidebar-footer-height-prod) - var(--header-height) - var(--search-height)) !important;
}
}

Expand All @@ -25,6 +25,7 @@
}
@media (max-width: 768px) {
height: calc(100vh - var(--sidebar-footer-height-prod) - var(--header-height)) !important;
height: calc(100dvh - var(--sidebar-footer-height-prod) - var(--header-height)) !important;
}
}

Expand Down
3 changes: 2 additions & 1 deletion src/main/webapp/content/scss/global.scss
Original file line number Diff line number Diff line change
Expand Up @@ -306,6 +306,7 @@ Generic styles
background-color: var(--bs-body-bg);
padding-bottom: var(--footer-height-prod);
@media (max-width: 768px) {
height: 100dvh;
padding-bottom: var(--footer-height-prod) !important;
}
&.footer-height-dev {
Expand Down Expand Up @@ -1085,7 +1086,7 @@ body.transparent-background {
height: calc(100vh - var(--sidebar-footer-height-dev) - var(--header-height));
}
@media (max-width: 768px) {
height: calc(100vh - var(--sidebar-footer-height-prod) - var(--header-height)) !important;
height: calc(100dvh - var(--sidebar-footer-height-prod) - var(--header-height)) !important;
}
}

Expand Down

0 comments on commit a693dbc

Please sign in to comment.