-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Edit component focus and error handling improvements (#126)
* Remove unused store actions * Clean up form saving to save a max of every 5 seconds. * Prep for handling form manager errors by returning a result from updatePatternById * Replace focussedPattern state with "focus", which is an object that can store multiple bit of edit/focus context. * With updated focus handling, clean up props on pattern edit components. * Destructuring * Create a form errors map type, and wire Zod and react-hook-form usage to it. * Refactor edit form pattern bindings to an interface provided via a hook wrapping react-hook-form * Error presentation for checkbox edit * Maintain edit focus when there are errors. * Improve how patterns and the edit UI share errors; shore up the interface exposed by usePatternEditFormContext. * Remove unused import
- Loading branch information
1 parent
6821eee
commit 5eb467e
Showing
28 changed files
with
588 additions
and
387 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
74 changes: 34 additions & 40 deletions
74
packages/design/src/FormManager/FormEdit/components/CheckboxPatternEdit.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.