Commit 776c8cc
authored
feat(onboarding): add shared loading states (#1945)
## Summary
This PR adds a shared onboarding loading state and reuses it anywhere
the onboarding modal can feel stalled while waiting on async work.
## Problem
We had a few spots in onboarding where the UI could appear to hang:
- Closing the modal from the `x` could lag while the close flow
completed.
- Some onboarding steps depend on server data before they can render
useful content.
- Those waits did not have a consistent loading treatment, so the modal
could feel unresponsive.
## What changed
- Added a reusable `OnboardingLoadingState` component for
onboarding-specific loading UI.
- Updated `OnboardingModal` to swap into that loading state while the
exit flow is finishing.
- Reused the same loading state when the modal is waiting on enough
onboarding context to resolve the next step.
- Reused the loading state in the internal boot step while internal boot
context is loading.
- Reused the loading state in the plugins step while installed plugin
data is loading.
- Added English localization strings for the new loading copy.
- Extended onboarding tests to cover the new loading behavior.
## User-facing behavior
Users can now see the loading state in these places:
- After confirming exit from the onboarding modal via the `x` flow.
- While the modal is still waiting on onboarding context needed to
determine which step to render.
- In the plugins step while the installed plugins query is still
pending.
- In the internal boot step while storage boot options are still
loading.
## Not in scope
The core settings step still renders immediately from default or draft
values and then hydrates server-backed values as queries resolve. This
PR does not add a full loading screen for that step.
## Files of interest
- `web/src/components/Onboarding/components/OnboardingLoadingState.vue`
- `web/src/components/Onboarding/OnboardingModal.vue`
- `web/src/components/Onboarding/steps/OnboardingInternalBootStep.vue`
- `web/src/components/Onboarding/steps/OnboardingPluginsStep.vue`
- `web/src/locales/en.json`
- `web/__test__/components/Onboarding/OnboardingModal.test.ts`
- `web/__test__/components/Onboarding/OnboardingPluginsStep.test.ts`
## Verification
Passed locally:
- `cd web && pnpm type-check`
- `cd web && pnpm lint`
- `cd web && pnpm exec vitest run
__test__/components/Onboarding/OnboardingModal.test.ts
__test__/components/Onboarding/internalBoot.test.ts
__test__/components/Onboarding/OnboardingPluginsStep.test.ts`
- `cd api && pnpm type-check`
- `cd api && pnpm lint`
- `cd api && pnpm test`
Known local note:
- `cd web && pnpm test` still fails in this worktree because of a local
`@unraid/ui` build/module-resolution issue in the worktree setup. The
failure reproduced across unrelated suites and did not point back to the
onboarding change itself.
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **New Features**
* Added a reusable onboarding loading-state UI and used it in the modal,
plugin list, and internal boot step.
* Modal now shows a closing/loading state and disables interaction while
the close flow is in progress.
* **Tests**
* Tests added/updated to assert the modal shows the loading state while
close is pending; test mocks include a spinner.
* **Localization**
* Added i18n strings for loading and closing states.
* **Chores**
* Registered the new global component type.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent e064de7 commit 776c8cc
File tree
8 files changed
+175
-46
lines changed- web
- __test__/components/Onboarding
- src
- components/Onboarding
- components
- steps
- locales
8 files changed
+175
-46
lines changedLines changed: 39 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
95 | 99 | | |
96 | 100 | | |
97 | 101 | | |
| |||
309 | 313 | | |
310 | 314 | | |
311 | 315 | | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
312 | 351 | | |
313 | 352 | | |
314 | 353 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
33 | 37 | | |
34 | 38 | | |
35 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
100 | 100 | | |
101 | 101 | | |
102 | 102 | | |
| 103 | + | |
103 | 104 | | |
104 | 105 | | |
105 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
131 | 132 | | |
132 | 133 | | |
133 | 134 | | |
| 135 | + | |
134 | 136 | | |
135 | 137 | | |
136 | 138 | | |
| |||
293 | 295 | | |
294 | 296 | | |
295 | 297 | | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
296 | 306 | | |
297 | 307 | | |
298 | 308 | | |
| |||
319 | 329 | | |
320 | 330 | | |
321 | 331 | | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
322 | 335 | | |
323 | 336 | | |
324 | 337 | | |
325 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
326 | 342 | | |
327 | 343 | | |
328 | 344 | | |
329 | 345 | | |
330 | 346 | | |
331 | | - | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
332 | 353 | | |
333 | 354 | | |
334 | 355 | | |
| |||
438 | 459 | | |
439 | 460 | | |
440 | 461 | | |
| 462 | + | |
441 | 463 | | |
442 | 464 | | |
443 | 465 | | |
444 | 466 | | |
445 | 467 | | |
446 | 468 | | |
447 | | - | |
448 | | - | |
449 | | - | |
450 | | - | |
451 | | - | |
452 | | - | |
453 | | - | |
454 | | - | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
455 | 484 | | |
456 | 485 | | |
457 | 486 | | |
| |||
483 | 512 | | |
484 | 513 | | |
485 | 514 | | |
| 515 | + | |
486 | 516 | | |
487 | 517 | | |
488 | 518 | | |
489 | 519 | | |
490 | 520 | | |
491 | 521 | | |
492 | 522 | | |
| 523 | + | |
493 | 524 | | |
494 | 525 | | |
495 | 526 | | |
| |||
Lines changed: 38 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
Lines changed: 7 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
| |||
807 | 808 | | |
808 | 809 | | |
809 | 810 | | |
810 | | - | |
811 | | - | |
812 | | - | |
813 | | - | |
814 | | - | |
| 811 | + | |
| 812 | + | |
| 813 | + | |
| 814 | + | |
| 815 | + | |
| 816 | + | |
815 | 817 | | |
816 | 818 | | |
817 | 819 | | |
| |||
Lines changed: 41 additions & 32 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
| |||
199 | 200 | | |
200 | 201 | | |
201 | 202 | | |
202 | | - | |
203 | | - | |
204 | | - | |
205 | | - | |
206 | | - | |
207 | | - | |
208 | | - | |
209 | | - | |
210 | | - | |
211 | | - | |
212 | | - | |
213 | | - | |
214 | | - | |
215 | | - | |
216 | | - | |
217 | | - | |
218 | | - | |
219 | | - | |
220 | | - | |
221 | | - | |
222 | | - | |
223 | | - | |
224 | | - | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
225 | 215 | | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
231 | 229 | | |
232 | | - | |
233 | | - | |
| 230 | + | |
| 231 | + | |
234 | 232 | | |
235 | | - | |
236 | | - | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
237 | 246 | | |
238 | 247 | | |
239 | 248 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| 124 | + | |
| 125 | + | |
124 | 126 | | |
| 127 | + | |
| 128 | + | |
125 | 129 | | |
126 | 130 | | |
127 | 131 | | |
| |||
146 | 150 | | |
147 | 151 | | |
148 | 152 | | |
| 153 | + | |
149 | 154 | | |
150 | 155 | | |
151 | 156 | | |
| |||
0 commit comments