Skip to content

Commit ed1afc0

Browse files
committed
refactor(modals): adjust modal heights and improve layout for better responsiveness
Signed-off-by: Manuel Abascal <mjabascal10@gmail.com>
1 parent e7f6892 commit ed1afc0

File tree

6 files changed

+60
-7
lines changed

6 files changed

+60
-7
lines changed

frontend/src/app/rule-management/app-rule/components/add-rule/add-rule.component.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,18 @@ fieldset {
135135
background-color: $success-color !important;
136136
}
137137

138+
.form-body {
139+
min-height: 725px;
140+
max-height: 725px;
141+
overflow-y: auto!important;
142+
overflow-x: hidden!important;
143+
flex-grow: 1;
144+
}
145+
146+
@media screen and (max-height: 867px) {
147+
.form-body {
148+
min-height: 500px;
149+
max-height: 500px;
150+
}
151+
}
152+

frontend/src/app/rule-management/app-rule/components/import-rules/import-rule.component.scss

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ fieldset {
6565

6666
.form-body {
6767
min-height: 590px;
68-
max-height: 700px;
68+
max-height: 615px;
6969
overflow-y: auto!important;
7070
overflow-x: hidden!important;
7171
flex-grow: 1;
@@ -142,7 +142,14 @@ fieldset {
142142
.step-success {
143143
background-color: $success-color !important;
144144
}
145-
.loader{
146-
top:0%;
147-
left:0%;
145+
.loader {
146+
top: 0;
147+
left: 0;
148+
}
149+
150+
@media screen and (max-height: 867px) {
151+
.form-body {
152+
min-height: 500px;
153+
max-height: 500px;
154+
}
148155
}

frontend/src/app/rule-management/app-rule/components/rule-list/rule-list.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export class RuleListComponent implements OnInit, OnDestroy {
105105
const modalRef = this.modalService.open(mode === 'ADD' ? AddRuleComponent : ImportRuleComponent, {
106106
size: 'lg',
107107
centered: true,
108-
windowClass: 'add-rule-modal',
108+
windowClass: mode === 'ADD' ? 'add-rule-modal' : 'import-rule-modal',
109109
});
110110

111111
modalRef.componentInstance.mode = mode;

frontend/src/app/shared/components/utm/util/utm-file-upload/utm-file-upload.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ <h6 class="font-weight-light text-blue-800">Drag file or click here to select {{
1010
</small>
1111
</div>
1212

13-
<div style="height: 250px" class="dropzone-items wm-200px overflow-auto">
13+
<div class="dropzone-items wm-200px overflow-auto">
1414
<div style="background: #f8f8f8" *ngFor="let file of files; let i = index"
1515
class="p-2 border rounded mb-2 d-flex flex-column">
1616

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.dropzone-items {
2+
height: 250px;
3+
}
4+
5+
@media screen and (max-height: 967px) {
6+
.dropzone-items {
7+
height: 120px;
8+
}
9+
}

frontend/src/styles.scss

Lines changed: 23 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,9 +635,16 @@ app-header {
635635
border-radius: 0;
636636
}
637637

638+
.import-rule-modal {
639+
.modal-content {
640+
max-height: 750px !important;
641+
overflow-y: hidden;
642+
}
643+
}
644+
638645
.add-rule-modal {
639646
.modal-content {
640-
max-height: 900px !important;
647+
max-height: 850px !important;
641648
overflow-y: hidden;
642649
}
643650
}
@@ -1434,6 +1441,21 @@ app-utm-items-per-page {
14341441
}
14351442
}
14361443

1444+
@media screen and (max-height: 867px) {
1445+
.import-rule-modal {
1446+
.modal-content {
1447+
max-height: 650px !important;
1448+
}
1449+
}
1450+
1451+
.add-rule-modal {
1452+
.modal-content {
1453+
max-height: 650px !important;
1454+
}
1455+
}
1456+
}
1457+
1458+
14371459

14381460

14391461

0 commit comments

Comments
 (0)