Commit d6ea032
authored
fix(onboarding): replace internal boot native selects (#1942)
## Summary
This PR replaces the onboarding flow's remaining native dropdowns with
the shared `Select` component from `@unraid/ui`, fixes the resulting
select handler typing, and aligns the onboarding select trigger styling
with the rest of the form in dark mode.
The work is targeted at the black-theme report where dropdowns in
onboarding were either unreadable for some users or visually
inconsistent with adjacent inputs.
## Work Intent
Onboarding color fixes.
## Problem
The onboarding flow still had a few browser-native `<select>` elements
in the internal boot step. That left the open dropdown menu styling up
to the browser and operating system, which can produce theme mismatches
that are hard to reproduce locally.
After moving those controls to the shared `Select` component, another
issue became obvious: the shared trigger defaults looked darker than the
surrounding onboarding inputs in dark mode, so the controls still felt
visually off even though the popup rendering problem was addressed.
## What Changed
- replaced the native selects in `OnboardingInternalBootStep` with
`@unraid/ui` `Select`
- converted slot-count, device, and boot-size options into typed
`SelectItemType[]` item lists
- preserved existing step behavior by wiring explicit update handlers
back into the same refs and validation flow
- normalized emitted select values through a shared helper so the
onboarding step stays type-safe with the shared component event contract
- updated the internal boot step test to stub the shared `Select`
component without depending on portal rendering
- applied onboarding-specific `Select` trigger styling in
`OnboardingInternalBootStep` so internal boot dropdowns match nearby
inputs in dark mode
- applied the same onboarding-specific `Select` trigger styling in
`OnboardingCoreSettingsStep` so timezone, language, and theme selectors
match the rest of the onboarding form
## Why This Approach
Using the same shared `Select` component already used elsewhere in
onboarding gives us control over menu rendering and theme tokens instead
of relying on browser-native popup behavior.
Keeping the dark-mode styling override local to onboarding lets us make
these selects visually match the onboarding form without changing the
shared `Select` component globally.
## Verification
Passed in this worktree:
- `pnpm --dir web type-check`
- `pnpm --dir api type-check`
- `pnpm --dir web lint`
- `pnpm --filter ./api lint`
- `pnpm --dir web test`
- `pnpm --filter ./api test`
- `pnpm --dir web test OnboardingInternalBootStep.test.ts`
- `pnpm --dir web test OnboardingCoreSettingsStep.test.ts`
## Notes
- dependencies were installed in this worktree so hooks and checks could
run normally
- the first commit on this branch was created before install and used
`--no-verify` because `lint-staged` was unavailable in the fresh
worktree at that point
- no production app or dev server was started or restarted
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Refactor**
* Onboarding boot, device, and preset selections now use a consistent
Select component for improved UI consistency and interaction handling.
* Select styling consolidated for time zone, language, and theme
controls for uniform appearance and focus behavior.
* **Tests**
* Test harness updated with a functional mock Select that supports item
rendering and selection change propagation.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->1 parent f0241a8 commit d6ea032
File tree
3 files changed
+108
-33
lines changed- web
- __test__/components/Onboarding
- src/components/Onboarding/steps
3 files changed
+108
-33
lines changedLines changed: 22 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
64 | 86 | | |
65 | 87 | | |
66 | 88 | | |
| |||
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
356 | 356 | | |
357 | 357 | | |
358 | 358 | | |
| 359 | + | |
| 360 | + | |
359 | 361 | | |
360 | 362 | | |
361 | 363 | | |
| |||
506 | 508 | | |
507 | 509 | | |
508 | 510 | | |
509 | | - | |
| 511 | + | |
510 | 512 | | |
511 | 513 | | |
512 | 514 | | |
| |||
523 | 525 | | |
524 | 526 | | |
525 | 527 | | |
526 | | - | |
| 528 | + | |
527 | 529 | | |
528 | 530 | | |
529 | 531 | | |
| |||
582 | 584 | | |
583 | 585 | | |
584 | 586 | | |
585 | | - | |
| 587 | + | |
586 | 588 | | |
587 | 589 | | |
588 | 590 | | |
| |||
Lines changed: 81 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
13 | | - | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
397 | 398 | | |
398 | 399 | | |
399 | 400 | | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
400 | 419 | | |
401 | 420 | | |
402 | 421 | | |
| |||
497 | 516 | | |
498 | 517 | | |
499 | 518 | | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
500 | 561 | | |
501 | 562 | | |
502 | 563 | | |
| |||
793 | 854 | | |
794 | 855 | | |
795 | 856 | | |
796 | | - | |
797 | | - | |
798 | | - | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
799 | 861 | | |
800 | | - | |
801 | | - | |
802 | | - | |
| 862 | + | |
| 863 | + | |
803 | 864 | | |
804 | 865 | | |
805 | 866 | | |
| |||
811 | 872 | | |
812 | 873 | | |
813 | 874 | | |
814 | | - | |
815 | | - | |
816 | | - | |
| 875 | + | |
| 876 | + | |
| 877 | + | |
| 878 | + | |
| 879 | + | |
817 | 880 | | |
818 | | - | |
819 | | - | |
820 | | - | |
821 | | - | |
822 | | - | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
| 881 | + | |
| 882 | + | |
829 | 883 | | |
830 | 884 | | |
831 | 885 | | |
| |||
834 | 888 | | |
835 | 889 | | |
836 | 890 | | |
837 | | - | |
838 | | - | |
839 | | - | |
| 891 | + | |
| 892 | + | |
| 893 | + | |
| 894 | + | |
840 | 895 | | |
841 | | - | |
842 | | - | |
843 | | - | |
844 | | - | |
845 | | - | |
846 | | - | |
| 896 | + | |
| 897 | + | |
847 | 898 | | |
848 | 899 | | |
849 | 900 | | |
| |||
0 commit comments