|
Ran
|
Jobs
1
|
Files
673
|
Run time
2min
|
Badge
README BADGES
|
push
github
refactor(web): migrate logical volume form to TanStack Form (#3609) ## Motivation The storage [partition form was previously migrated to TanStack Form](https://github.com/agama-project/agama/pull/3603). This PR applies the same approach to the logical volume form while extracting the shared components and validation logic used by both forms. This reduces duplication, improves consistency, and also lays the groundwork for migrating `FormattableDevicePage` next. ## Summary - Migrates `LogicalVolumePage` to a TanStack Form-based form under `storage/logical-volume-form/`. The old page held its state in eight separate `useState` hooks and kept the filesystem and size fields in sync with the mount point through manual effects that the form switched on and off. The new form drives that syncing through TanStack Form listeners and subscriptions instead (field/form listeners for the name auto-fill, subscriptions for the filesystem and size fields). - Extracts the storage form building blocks (mount point, filesystem selector, filesystem label, additional filesystem settings, and size fields) plus the validation/presentation helpers into `storage/shared/`, now reused by both the partition and logical volume forms. - Deletes the old `LogicalVolumePage.tsx` and points the add/edit routes at the new form. ## Implementation notes - **Shared components are presentation-only.** Validation stays in each form's `fields.ts`, which reuses the pure helpers in `storage/shared/validation-helpers.ts`. - **Committed mount point pattern** is preserved and now lives inside the shared `MountPointField` (updates on mount, suggestion select, and blur). - **lvName auto-fill:** the logical volume name is derived from the mount point following the same heuristic the backend implements in [`Y2Storage::Planned::LvmLv`](https://github.com/yast/yast-storage-ng/blob/a4f6631bc/src/lib/y2storage/planned/lvm_lv.rb#L96-L105) (`/` → `root`, `/home` → `home`... (continued)
4736 of 6616 branches covered (71.58%)
Branch coverage included in aggregate %.
460 of 514 new or added lines in 26 files covered. (89.49%)
39 existing lines in 8 files now uncovered.16304 of 19658 relevant lines covered (82.94%)
105.24 hits per line
| Lines | Coverage | ∆ | File |
|---|---|---|---|
| 8 |
0.0 |
-12.31% | web/src/components/storage/SizeModeSelect.tsx |
| 8 |
0.0 |
-19.51% | web/web/src/components/storage/SizeModeSelect.tsx |
| 7 |
0.0 |
-6.19% | web/src/components/storage/AutoSizeText.tsx |
| 7 |
0.0 |
-8.14% | web/web/src/components/storage/AutoSizeText.tsx |
| 3 |
98.31 |
0.0% | web/web/src/components/storage/FormattableDevicePage.tsx |
| 2 |
76.6 |
-12.77% | web/src/components/form/validation-helpers.ts |
| 2 |
84.38 |
-12.5% | web/web/src/components/form/validation-helpers.ts |
| 2 |
97.44 |
4.33% | web/web/src/components/storage/partition-form/Form.tsx |
| ID | Flag name | Job ID | Ran | Files | Coverage | |
|---|---|---|---|---|---|---|
| 1 | web | 27406801126.1 | 673 |
80.08 |
GitHub Action Run |
| Coverage | ∆ | File | Lines | Relevant | Covered | Missed | Hits/Line | Branch Hits | Branch Misses |
|---|