Skip to content

Commit f4e9295

Browse files
committed
front: match the width and spacing of the results table to the mockup
Signed-off-by: theocrsb <theo_crosbie@yahoo.fr>
1 parent 50a599e commit f4e9295

File tree

3 files changed

+30
-21
lines changed

3 files changed

+30
-21
lines changed

front/src/applications/stdcm/components/StdcmResults/StdcmResultsTable.tsx

+5-5
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ const StcdmResultsTable = ({
3939
<th aria-label="line-count" />
4040
<th>{t('operationalPoint')}</th>
4141
<th>{t('code')}</th>
42-
<th>{t('endStop')}</th>
43-
<th>{t('passageStop')}</th>
44-
<th>{t('startStop')}</th>
42+
<th className="head-stop">{t('endStop')}</th>
43+
<th className="head-stop">{t('passageStop')}</th>
44+
<th className="head-stop">{t('startStop')}</th>
4545
<th className="weight">{t('weight')}</th>
4646
<th>{t('refEngine')}</th>
4747
</tr>
@@ -76,7 +76,7 @@ const StcdmResultsTable = ({
7676
>
7777
{index + 1}
7878
</td>
79-
<td style={{ color: 'rgb(49, 46, 43)' }}>
79+
<td className="name" style={{ color: 'rgb(49, 46, 43)' }}>
8080
{isNotExtremity &&
8181
!isRequestedPathStep &&
8282
step.name === prevStep.name &&
@@ -112,7 +112,7 @@ const StcdmResultsTable = ({
112112
<td className="weight" style={{ color: !isFirstStep ? '#797671' : '#312E2B' }}>
113113
{isNotExtremity ? '=' : `${Math.floor(mass)}t`}
114114
</td>
115-
<td style={{ color: !isFirstStep ? '#797671' : '#312E2B' }}>
115+
<td className="ref" style={{ color: !isFirstStep ? '#797671' : '#312E2B' }}>
116116
{isNotExtremity ? '=' : stdcmData.rollingStock.metadata?.reference}
117117
</td>
118118
</tr>

front/src/styles/scss/applications/stdcm/_home.scss

+1-1
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@
222222
box-shadow:
223223
0 0 0 2px rgba(255, 255, 255, 0.75) inset,
224224
0 0 0 1px rgba(0, 0, 0, 0.25) inset;
225-
margin-left: 48px;
225+
margin-left: 32px;
226226
width: 100%;
227227
min-width: 450px;
228228
height: calc(100vh - 64px);

front/src/styles/scss/applications/stdcm/_results.scss

+24-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
.stdcm-results {
22
background-color: rgb(233, 239, 242);
3-
padding: 29px 30px 32px 32px;
3+
padding: 29px 32px 32px;
44
position: relative;
55

66
.simulation-navigator {
@@ -138,18 +138,17 @@
138138

139139
.simulation-results {
140140
display: flex;
141-
justify-content: space-between;
142141

143142
.results-and-sheet {
144143
display: flex;
145144
flex-direction: column;
146-
width: 70%;
147145

148146
.table-container::-webkit-scrollbar {
149147
display: none; /* Safari and Chrome */
150148
}
151149

152150
.table-container {
151+
width: 804px;
153152
margin-right: 32px;
154153

155154
.table-results {
@@ -172,6 +171,9 @@
172171
padding-bottom: 5px;
173172
vertical-align: middle;
174173
}
174+
.head-stop {
175+
text-align: center;
176+
}
175177
th:last-child {
176178
text-transform: none;
177179
}
@@ -190,20 +192,23 @@
190192
vertical-align: middle;
191193
}
192194
.index {
193-
padding-left: 32px;
195+
width: 64px;
196+
text-align: end;
197+
padding-right: 24px;
194198
}
195-
.pr {
196-
padding-right: 199px;
199+
.name {
200+
width: 232px;
197201
}
198202
.ch {
199-
padding-right: 36px;
203+
width: 56px;
200204
}
201205
.stop {
202206
font-size: 0.875rem;
203207
font-weight: 600;
204208
color: rgb(0, 0, 0);
205209
line-height: 20px;
206-
width: 75px;
210+
width: 72px;
211+
text-align: center;
207212
}
208213
.stop-with-duration {
209214
font-size: 0.875rem;
@@ -216,13 +221,17 @@
216221
text-align: center;
217222
}
218223
.weight {
219-
padding-left: 33px;
220-
color: '#797671';
224+
width: 128px;
225+
padding-left: 40px;
221226

222227
&.lastStep {
223228
color: '#797671';
224229
}
225230
}
231+
.ref {
232+
width: 108px;
233+
}
234+
226235
.semi-bold-output {
227236
font-weight: 600;
228237
}
@@ -323,19 +332,19 @@
323332
}
324333

325334
.simulation-failure {
326-
text-align: left;
327-
letter-spacing: 0;
328335
display: flex;
329336
flex-direction: column;
337+
flex-shrink: 0;
338+
width: 836px;
330339
min-height: 168px;
331-
width: 70%;
340+
text-align: left;
341+
letter-spacing: 0;
332342
color: var(--grey80);
333343

334344
.title {
335345
color: rgba(33, 100, 130, 1);
336346
font-size: 1.5rem;
337347
font-weight: 600;
338-
font-style: SemiBold;
339348
line-height: 32px;
340349
margin-bottom: 7px;
341350
}
@@ -351,11 +360,11 @@
351360
}
352361

353362
.map-results {
363+
flex-grow: 1;
354364
position: sticky;
355365
top: 0;
356366
width: 40%;
357367
height: 540px;
358-
margin-right: 32px;
359368
border-radius: 8px;
360369
border: 1px solid rgba(255, 255, 255, 1);
361370
box-shadow:

0 commit comments

Comments
 (0)