Skip to content

Commit 68c6646

Browse files
committed
front: fix filter panel style
Signed-off-by: SharglutDev <[email protected]>
1 parent f22910f commit 68c6646

File tree

2 files changed

+34
-14
lines changed

2 files changed

+34
-14
lines changed

front/src/modules/trainschedule/components/Timetable/FilterPanel.tsx

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ const FilterPanel = ({ toggleFilterPanel, timetableFilters }: FilterPanelProps)
8282
id="timetable-label-filter"
8383
name="timetable-label-filter"
8484
label={t('timetable.filterLabel')}
85+
narrow
86+
small
8587
value={nameLabelFilter}
8688
onChange={(e) => setNameLabelFilter(e.target.value)}
8789
placeholder={t('filterPlaceholder')}
@@ -94,6 +96,8 @@ const FilterPanel = ({ toggleFilterPanel, timetableFilters }: FilterPanelProps)
9496
getOptionValue={(option) => option.value}
9597
id="train-validity"
9698
label={t('timetable.validityFilter')}
99+
narrow
100+
small
97101
onChange={(selectedOption) => {
98102
if (selectedOption) {
99103
setValidityFilter(selectedOption.value);
@@ -110,6 +114,8 @@ const FilterPanel = ({ toggleFilterPanel, timetableFilters }: FilterPanelProps)
110114
getOptionValue={(option) => option.value}
111115
id="train-type"
112116
label={t('timetable.trainType')}
117+
narrow
118+
small
113119
onChange={(selectedOption) => {
114120
if (selectedOption) {
115121
setTrainTypeFilter(selectedOption.value);
@@ -128,6 +134,8 @@ const FilterPanel = ({ toggleFilterPanel, timetableFilters }: FilterPanelProps)
128134
id="timetable-rollingstock-filter"
129135
name="timetable-rollingstock-filter"
130136
label={t('timetable.advancedFilterLabel')}
137+
narrow
138+
small
131139
value={rollingStockFilter}
132140
onChange={(e) => setRollingStockFilter(e.target.value)}
133141
placeholder={t('timetable.rollingStockFilterPlaceholder')}
@@ -140,6 +148,8 @@ const FilterPanel = ({ toggleFilterPanel, timetableFilters }: FilterPanelProps)
140148
getOptionValue={(option) => option.value}
141149
id="train-keep-timetable"
142150
label={t('timetable.punctuality')}
151+
narrow
152+
small
143153
onChange={(selectedOption) => {
144154
if (selectedOption) {
145155
setScheduledPointsHonoredFilter(selectedOption.value);

front/src/styles/scss/applications/operationalStudies/_scenario.scss

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@
710710
}
711711

712712
.filter-panel {
713-
padding: 7px 20px 23px 7px;
713+
padding: 17px 39px 23px 24px;
714714
background-color: var(--ambiantB5);
715715
border-top: solid 1px var(--white100);
716716
border-bottom: solid 1px rgba(0, 0, 0, 0.25);
@@ -723,18 +723,31 @@
723723
margin-bottom: 0;
724724
}
725725

726+
// TODO : remove this when height for small element is fixed in osrd-ui
727+
.input-field-wrapper.small {
728+
height: auto !important;
729+
}
730+
726731
.grid-template {
727732
display: grid;
728733
grid-template-columns: 1fr 1fr;
734+
gap: 63px;
729735
}
730736

731737
.close-filter {
732738
position: absolute;
733739
right: 12px;
734-
top: 8px;
740+
top: 6px;
735741
z-index: 1;
736742
}
737743

744+
#train-validity-and-label,
745+
#schedule-point-honored-and-rollingstock {
746+
display: flex;
747+
flex-direction: column;
748+
gap: 17px;
749+
}
750+
738751
.validity-filter {
739752
display: flex;
740753
margin-bottom: 16px;
@@ -746,15 +759,13 @@
746759
}
747760

748761
.compositions-code {
749-
align-self: start;
750-
padding: 10px 0 0px 16px;
762+
padding-top: 13px;
763+
751764
label {
752-
height: 24px;
753-
line-height: 24px;
754-
letter-spacing: 0;
755-
text-align: left;
756-
vertical-align: top;
765+
font-size: 0.875rem;
766+
height: 20px;
757767
font-weight: 600;
768+
margin-bottom: 4px;
758769
}
759770
.composition-tag-filter {
760771
display: flex;
@@ -763,19 +774,18 @@
763774

764775
button {
765776
border-radius: 4px;
766-
border: 1px solid rgba(182, 178, 175, 1);
767-
background-color: rgba(250, 249, 245, 1);
777+
border: 1px solid var(--grey30);
778+
background-color: var(--ambiantB5);
779+
color: var(--grey80);
768780
font-size: 0.875rem;
769781
font-weight: 400;
770-
text-align: left;
771-
line-height: 20px;
772782
padding: 2px 8px;
773783
}
774784

775785
button:hover {
776786
background-color: var(--white100);
777787
color: var(--black100);
778-
border: 1px solid var(--black100);
788+
border: 1px solid var(--grey90);
779789
}
780790

781791
.selectedTag {

0 commit comments

Comments
 (0)