Skip to content

Commit d4ec7d2

Browse files
authored
Improved the submission filters UI. (#1579)
Closes SoftUni-Internal/exam-systems-issues#1488
1 parent 71b3b8a commit d4ec7d2

File tree

3 files changed

+430
-103
lines changed

3 files changed

+430
-103
lines changed

Servers/UI/OJS.Servers.Ui/ClientApp/src/components/filters/Filter.module.scss

Lines changed: 133 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -2,41 +2,74 @@
22
@use 'src/styles/spacings';
33

44
.popupContainer {
5-
border-radius: 8px;
6-
padding: spacings.$sp-16;
5+
border-radius: 12px;
6+
padding: spacings.$sp-24;
77
width: auto;
8+
min-width: 320px;
89
z-index: 1300;
910
box-shadow: colors.$box-shadow-color;
1011
border: 2px solid colors.$background-color-btn-primary;
12+
transform-origin: top left;
13+
opacity: 0;
14+
transform: scale(0.95);
15+
pointer-events: none;
16+
17+
&.open {
18+
opacity: 1;
19+
transform: scale(1);
20+
pointer-events: auto;
21+
}
1122

1223
& .closeIcon {
1324
cursor: pointer;
25+
position: absolute;
26+
top: 12px;
27+
right: 12px;
28+
transition: transform 0.2s ease;
29+
30+
&:hover {
31+
transform: scale(1.1);
32+
}
1433
}
1534

1635
& .fieldsContainer {
1736
display: flex;
1837
flex-direction: column;
19-
gap: 1rem;
38+
gap: 1.5rem;
2039
justify-content: center;
2140
align-items: center;
22-
margin-top: 1rem !important;
41+
margin-top: 1.5rem !important;
42+
padding: 0.5rem;
2343

2444
& .title {
25-
font-size: 1.3rem;
26-
font-weight: bold;
45+
font-size: 1.2rem;
46+
font-weight: 600;
2747
display: flex;
2848
justify-content: space-between;
29-
align-items: start;
49+
align-items: center;
3050
width: 100%;
51+
padding-bottom: 0.5rem;
52+
border-bottom: 1px solid rgba(colors.$background-color-btn-primary, 0.1);
3153
}
3254

3355
& .hidden {
3456
visibility: hidden;
3557
}
3658

59+
& .removeFilterButton {
60+
cursor: pointer;
61+
transition: transform 0.2s ease;
62+
63+
&:hover {
64+
transform: scale(1.1);
65+
}
66+
}
67+
3768
:global {
3869
.MuiInputLabel-root {
3970
color: colors.$background-color-btn-primary;
71+
font-size: 0.9rem;
72+
transform: translate(0, -1.5px) scale(0.85);
4073
}
4174

4275
.MuiInput-underline::before {
@@ -55,47 +88,128 @@
5588
& .MuiInput-underline::before {
5689
border-bottom-style: solid;
5790
border-bottom-color: colors.$background-color-btn-primary;
91+
opacity: 0.6;
5892
}
5993
}
94+
95+
.MuiSelect-select {
96+
padding: 8px 0;
97+
}
98+
99+
.MuiFormControl-root {
100+
margin: 8px 0;
101+
}
102+
}
103+
}
104+
105+
& .buttonsSection {
106+
display: flex;
107+
justify-content: space-between;
108+
margin-top: spacings.$sp-24;
109+
padding-top: spacings.$sp-16;
110+
border-top: 1px solid rgba(colors.$background-color-btn-primary, 0.1);
111+
112+
button {
113+
min-width: 120px;
114+
padding: 8px 16px;
115+
border-radius: 6px;
116+
transition: all 0.2s ease;
117+
118+
&:hover:not(:disabled) {
119+
transform: translateY(-1px);
120+
}
121+
122+
&:disabled {
123+
opacity: 0.6;
124+
cursor: not-allowed;
125+
}
60126
}
61127
}
62128

63129
& .removeAllFilters {
64130
color: colors.$primary-red;
131+
132+
&:hover {
133+
background-color: rgba(colors.$primary-red, 0.1);
134+
}
135+
}
136+
137+
& .addFilter {
138+
background-color: rgba(colors.$background-color-btn-primary, 0.1);
139+
140+
&:hover:not(:disabled) {
141+
background-color: rgba(colors.$background-color-btn-primary, 0.2);
142+
}
65143
}
66144

67145
&.lightTheme {
68-
background-color: colors.$light-base-color-100;
69-
color: colors.$light-text-color;
146+
background-color: colors.$white-color;
147+
color: colors.$primary-dark-grey-color;
70148

71149
:global {
150+
.MuiInputBase-input {
151+
color: colors.$primary-dark-grey-color !important;
152+
}
153+
72154
.MuiInputBase-input.Mui-disabled {
73-
-webkit-text-fill-color: colors.$light-text-color !important;
74-
color: colors.$light-text-color !important;
155+
-webkit-text-fill-color: colors.$primary-dark-grey-color !important;
156+
color: colors.$primary-dark-grey-color !important;
157+
opacity: 0.7;
158+
}
159+
160+
.MuiInputLabel-root {
161+
color: colors.$primary-dark-grey-color;
162+
}
163+
164+
.MuiInput-underline::before {
165+
border-bottom-color: colors.$light-base-color-500;
166+
}
167+
168+
.MuiInput-underline:hover::before {
169+
border-bottom-color: colors.$primary-blue;
170+
}
171+
172+
.MuiInput-underline::after {
173+
border-bottom-color: colors.$primary-blue;
75174
}
76175
}
77176

78177
& .addFilter {
79-
color: colors.$light-text-color;
178+
color: colors.$primary-dark-grey-color;
179+
background-color: colors.$light-base-color-200;
180+
181+
&:hover:not(:disabled) {
182+
background-color: colors.$light-base-color-300;
183+
}
80184

81185
&:disabled {
82-
opacity: 0.6;
186+
opacity: 0.5;
187+
background-color: colors.$light-base-color-200;
83188
}
84189
}
85190

86191
.MuiSvgIcon-root {
87-
color: colors.$light-text-color;
192+
color: colors.$primary-dark-grey-color;
88193
}
89194

90195
.option {
91-
color: colors.$light-text-color;
92-
background-color: colors.$light-base-color-400;
196+
color: colors.$primary-dark-grey-color;
197+
background-color: colors.$white-color;
93198

94199
&:hover,
95200
&[aria-selected='true'] {
96201
background-color: colors.$light-base-color-200 !important;
97202
}
98203
}
204+
205+
& .title {
206+
color: colors.$primary-dark-grey-color;
207+
border-bottom-color: colors.$light-base-color-300;
208+
}
209+
210+
& .buttonsSection {
211+
border-top-color: colors.$light-base-color-300;
212+
}
99213
}
100214

101215
&.darkTheme {
@@ -133,46 +247,13 @@
133247
}
134248
}
135249

136-
.buttonsSection {
137-
display: flex;
138-
justify-content: space-between;
139-
margin-top: spacings.$sp-16;
140-
}
141-
142-
.lightTextField {
143-
:global {
144-
.MuiOutlinedInput-root {
145-
& .MuiOutlinedInput-notchedOutline {
146-
border-color: colors.$light-base-color-100 !important;
147-
}
148-
149-
& input {
150-
color: colors.$light-text-color !important;
151-
}
152-
}
153-
}
154-
}
155-
156-
.darkTextField {
157-
:global {
158-
.MuiOutlinedInput-root {
159-
& .MuiOutlinedInput-notchedOutline {
160-
border-color: colors.$dark-text-color !important;
161-
}
162-
163-
& input {
164-
color: colors.$dark-text-color !important;
165-
}
166-
}
167-
}
168-
}
169-
170250
.divider {
171251
border: 0;
172252
height: 1px;
173253
width: 100%;
174-
background-color: colors.$background-color-btn-primary !important;
254+
background-color: rgba(colors.$background-color-btn-primary, 0.1) !important;
175255
border-radius: 1rem;
256+
margin: 16px 0;
176257
}
177258

178259
.input {
@@ -181,4 +262,5 @@
181262

182263
.textField {
183264
width: 100%;
265+
margin: 8px 0;
184266
}

0 commit comments

Comments
 (0)