spacedrive/apps
Vítor Vasconcellos 90a3509469
[ENG-471, ENG-472] Add dry_run parameter to some API routes and related UI changes (#750)
* Add dry_run for `location.create` and `location.addLibrary`

* Add dry_run to IndexerRuleCreateArgs
- Add invalidate_query to create and edit api method of the location route
- Adjust some code to use the new dry_run property

* `AddLocationDialog` and `IndexerRuleEditor` now validate with backend without user interaction
 - Create `useCallbackToWatchForm` to make it easier to watch form changes with an async function that also executes during component mount
 - `method` is now part of the `addLocationDialog` form schema, and a hidden input
 - Add an `index.ts` for hooks and components

* Fix mobile

* Remove redundant type definition

* Add `useCallbackToWatchForm` as an additional hook to `react-hooks/exhaustive-deps`
 - Improve `useCallbackToWatchForm` argument handling, to avoid duplicated references to form

* Fix unnecessary form value updates in `addLocationDialog`
 - Move reset `method` on `path` change logic from the superfluous `useEffect` to `useCallbackToWatchForm` in `addLocationDialog`
 - Improve core API debug logs for `dry_run`
 - Fix incorrect file name for `useCallbackToWatchForm` hook
 - Improve the documentation for `useCallbackToWatchForm`
 - Fix `useCallbackToWatchForm` not ignoring callback errors
 - Fix `useCallbackToWatchForm` ignoring returned Promise from `onWatch`
 - Add basic validation for the `form` argument in `useCallbackToWatchForm`

* Remove superflous if checks
 - generate new core.ts

* Remove DryRunError

* Remove unused import

---------

Co-authored-by: Brendan Allan <brendonovich@outlook.com>
2023-04-29 10:49:51 +00:00
..
cli [ENG-355] Keychain integration (and some typesafety) (#558) 2023-02-07 12:03:12 +00:00
desktop File Opening (#762) 2023-04-28 06:55:00 -07:00
landing [ENG-384] Indexer rules editor (#723) 2023-04-22 04:30:11 +00:00
mobile [ENG-471, ENG-472] Add dry_run parameter to some API routes and related UI changes (#750) 2023-04-29 10:49:51 +00:00
releases Fix Windows CI + format (#767) 2023-04-27 07:32:15 +00:00
server Sync over p2p (#606) 2023-03-21 06:03:08 -07:00
storybook Update server (#744) 2023-04-21 10:02:31 -07:00
web Spacedrop (#761) 2023-04-27 04:41:33 +00:00