Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Modeling exercises: Fix layout overlapping in modeling assessment #10145

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
@@ -1,29 +1,36 @@
<div #resizeContainer class="modeling-assessment" [class.resizable]="resizeOptions">
@if (title || displayPoints) {
<div class="card-header bg-primary text-white">
@if (title) {
<span>{{ title }}</span>
}
<span class="flex-fill"></span>
@if (displayPoints) {
<jhi-score-display [score]="totalScore" [maxPoints]="maxScore" [maxBonusPoints]="maxBonusPoints" [course]="course" />
<div class="parent-container">
<div #resizeContainer class="modeling-assessment" [class.resizable]="resizeOptions">
@if (title || displayPoints) {
<div class="card-header bg-primary text-white">
@if (title) {
<span>{{ title }}</span>
}
<span class="flex-fill"></span>
@if (displayPoints) {
<jhi-score-display [score]="totalScore" [maxPoints]="maxScore" [maxBonusPoints]="maxBonusPoints" [course]="course" />
}
</div>
}
<div class="apollon-row" id="apollon-assessment-row">
<div #editorContainer class="apollon-container"></div>
@if (resizeOptions && resizeOptions.horizontalResize) {
<div class="draggable-right">
<fa-icon [icon]="faGripLinesVertical" />
</div>
}
</div>
}
<div class="apollon-row" id="apollon-assessment-row">
<div #editorContainer class="apollon-container"></div>
@if (resizeOptions && resizeOptions.horizontalResize) {
<div class="draggable-right">
<fa-icon [icon]="faGripLinesVertical" />
@if (resizeOptions && resizeOptions.verticalResize) {
<div class="draggable-bottom">
<fa-icon [icon]="faGripLines" />
</div>
}
@if (explanation) {
<jhi-modeling-explanation-editor [explanation]="explanation" [readOnly]="true" />
}
</div>

<!-- Additional feedback section starts here -->
<div id="additional-feedback">
<!-- Feedback block -->
</div>
@if (resizeOptions && resizeOptions.verticalResize) {
<div class="draggable-bottom">
<fa-icon [icon]="faGripLines" />
</div>
}
@if (explanation) {
<jhi-modeling-explanation-editor [explanation]="explanation" [readOnly]="true" />
}
</div>
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
$draggable-width: 15px;

.modeling-assessment {
position: relative;
.parent-container {
display: flex;
flex-flow: column nowrap;
height: 100%;
flex-direction: column; /* Stack sections vertically */
gap: 1rem; /* Add spacing between sections */
position: relative; /* Prevent floating issues */
overflow: hidden; /* Ensure content stays contained */
}

.card-header {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
font-size: 1rem;
font-weight: 500;
}
.modeling-assessment {
position: relative; /* Keep in layout flow */
height: auto; /* Adjust height dynamically */
max-height: 80vh; /* Restrict height to prevent overlaps */
overflow-y: auto; /* Enable scrolling */
margin-bottom: 2rem; /* Add space below */
scroll-behavior: smooth; /* Smooth scrolling experience */
}

.resizable {
Expand All @@ -29,19 +30,24 @@ $draggable-width: 15px;
}

.apollon-container {
height: 100%;
height: auto; /* Adjust dynamically */
width: 100%;
}

.apollon-row {
display: flex;
height: 100%;
height: auto; /* Adjust dynamically */
}

@media screen and (orientation: landscape) {
.modeling-assessment {
max-height: 70vh; /* Restrict height in landscape */
overflow-y: scroll; /* Ensure scrolling works */
}
}

/* Target the modeling-assessment class for print media */
@media print {
.modeling-assessment {
/* Adjust the size of the container to fit the print area */
height: auto !important;
max-height: 100vh !important;
}
Expand Down
Loading