Commit a22d4b9
committed
Improve UI and layout for pipeline overview loading states
- Center loading indicators in Average Duration, Status, and Number of Runs charts.
- Isolate Victory Chart wrappers from flex utilities to maintain correct SVG scaling.
- Conditionally render search and toggle controls in the list page so they only appear after data is loaded.
Signed-off-by: Aditya Shinde <adishind@redhat.com>
fix(ui): [SRVKP-11379] align loader and add dynamic chart heights
* Added dynamic height and width calculations using useRef and ResizeObserver to make SVG charts fully responsive.
* Solved the mobile layout bug where the loader was collapsing and not aligning properly within the container.
* Ensured the loading spinner is now perfectly centered and aligned in every view (mobile, tablet, and desktop) by applying a dynamic minHeight matching the chart.
* Dynamically scaled X-axis tick labels (font size, rotation angle, and padding) to prevent text overlap on smaller screens without dropping data points.
Signed-off-by: Aditya Shinde <adishind@redhat.com>
test: mock ResizeObserver to fix failing CI tests
fix: centering loaders using useRef
* Removed ResizeObserver completely.
* Locked container heights dynamically to prevent the UI from collapsing or expanding when transitioning from the loading spinner to the chart.
ref: remove inline css1 parent 9da4653 commit a22d4b9
4 files changed
Lines changed: 60 additions & 24 deletions
File tree
- src/components
- pipelines-metrics
- pipelines-overview
- list-pages
Lines changed: 24 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | 41 | | |
43 | 42 | | |
44 | 43 | | |
| |||
75 | 74 | | |
76 | 75 | | |
77 | 76 | | |
78 | | - | |
79 | | - | |
| 77 | + | |
80 | 78 | | |
81 | 79 | | |
82 | 80 | | |
| |||
93 | 91 | | |
94 | 92 | | |
95 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
96 | 100 | | |
97 | 101 | | |
98 | 102 | | |
| |||
224 | 228 | | |
225 | 229 | | |
226 | 230 | | |
| 231 | + | |
227 | 232 | | |
228 | 233 | | |
229 | 234 | | |
| |||
234 | 239 | | |
235 | 240 | | |
236 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
237 | 245 | | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
238 | 249 | | |
239 | 250 | | |
240 | 251 | | |
| |||
261 | 272 | | |
262 | 273 | | |
263 | 274 | | |
264 | | - | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
265 | 279 | | |
266 | 280 | | |
267 | 281 | | |
| |||
273 | 287 | | |
274 | 288 | | |
275 | 289 | | |
276 | | - | |
277 | | - | |
| 290 | + | |
| 291 | + | |
278 | 292 | | |
279 | 293 | | |
280 | | - | |
| 294 | + | |
281 | 295 | | |
282 | 296 | | |
283 | 297 | | |
| |||
299 | 313 | | |
300 | 314 | | |
301 | 315 | | |
302 | | - | |
| 316 | + | |
303 | 317 | | |
304 | 318 | | |
305 | 319 | | |
| |||
311 | 325 | | |
312 | 326 | | |
313 | 327 | | |
314 | | - | |
| 328 | + | |
Lines changed: 21 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
29 | 29 | | |
30 | 30 | | |
31 | 31 | | |
32 | | - | |
33 | | - | |
34 | 32 | | |
35 | 33 | | |
36 | 34 | | |
| |||
39 | 37 | | |
40 | 38 | | |
41 | 39 | | |
42 | | - | |
43 | 40 | | |
44 | 41 | | |
45 | 42 | | |
| |||
77 | 74 | | |
78 | 75 | | |
79 | 76 | | |
80 | | - | |
81 | 77 | | |
82 | 78 | | |
83 | 79 | | |
| |||
96 | 92 | | |
97 | 93 | | |
98 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
99 | 101 | | |
100 | 102 | | |
101 | 103 | | |
| |||
222 | 224 | | |
223 | 225 | | |
224 | 226 | | |
| 227 | + | |
225 | 228 | | |
226 | 229 | | |
227 | 230 | | |
| |||
232 | 235 | | |
233 | 236 | | |
234 | 237 | | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
235 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
236 | 245 | | |
237 | 246 | | |
238 | 247 | | |
| |||
260 | 269 | | |
261 | 270 | | |
262 | 271 | | |
263 | | - | |
| 272 | + | |
| 273 | + | |
264 | 274 | | |
265 | 275 | | |
266 | 276 | | |
| |||
273 | 283 | | |
274 | 284 | | |
275 | 285 | | |
276 | | - | |
277 | | - | |
| 286 | + | |
| 287 | + | |
278 | 288 | | |
279 | 289 | | |
280 | | - | |
| 290 | + | |
281 | 291 | | |
282 | 292 | | |
283 | 293 | | |
| |||
295 | 305 | | |
296 | 306 | | |
297 | 307 | | |
298 | | - | |
| 308 | + | |
299 | 309 | | |
300 | 310 | | |
301 | 311 | | |
| |||
307 | 317 | | |
308 | 318 | | |
309 | 319 | | |
310 | | - | |
| 320 | + | |
Lines changed: 13 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
482 | 482 | | |
483 | 483 | | |
484 | 484 | | |
485 | | - | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
486 | 488 | | |
487 | 489 | | |
488 | 490 | | |
489 | 491 | | |
490 | | - | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
491 | 501 | | |
492 | 502 | | |
493 | 503 | | |
| |||
540 | 550 | | |
541 | 551 | | |
542 | 552 | | |
543 | | - | |
| 553 | + | |
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
170 | 170 | | |
171 | 171 | | |
172 | 172 | | |
| 173 | + | |
173 | 174 | | |
174 | 175 | | |
175 | 176 | | |
| |||
200 | 201 | | |
201 | 202 | | |
202 | 203 | | |
| 204 | + | |
203 | 205 | | |
204 | 206 | | |
205 | 207 | | |
| |||
0 commit comments