[WIP] refactor: integrate useSignEmployeeForm hook into Employee DocumentSigner#1555
Draft
serikjensen wants to merge 8 commits intomainfrom
Draft
[WIP] refactor: integrate useSignEmployeeForm hook into Employee DocumentSigner#1555serikjensen wants to merge 8 commits intomainfrom
serikjensen wants to merge 8 commits intomainfrom
Conversation
Move all hook infrastructure and domain hooks out of UNSTABLE_Hooks into permanent locations, export from the main package entry, and remove the UNSTABLE_Hooks entry point entirely. - Create src/partner-hook-utils/ consolidating all partner-facing hook infrastructure (types, error handling, form schema, fields, providers) - Move 7 domain hooks to feature module shared/ directories following the component naming RFC layout - Export all hooks and infrastructure from @gusto/embedded-react-sdk - Remove UNSTABLE_Hooks entry point, Vite input, and package.json export - Remove prebuilt *Form.tsx test components and UNSTABLE.* i18n files - Update all internal imports, documentation, and Claude commands - Add create-hook command and rename hooks implementation guide BREAKING CHANGE: The @gusto/embedded-react-sdk/UNSTABLE_Hooks entry point has been removed. Import hooks from @gusto/embedded-react-sdk instead. Prebuilt hook form components (CompensationForm, etc.) have been removed — use the hooks directly. Made-with: Cursor
Made-with: Cursor
Made-with: Cursor
The prebuilt hook form components were deleted, so remove the empty Hooks.ts file and its category from the sdk-app registry. Made-with: Cursor
These hooks are part of the employee profile domain alongside useEmployeeDetailsForm, so colocate them under Employee/Profile/shared/. Made-with: Cursor
…atureForm Add 8 tests for Employee SignatureForm covering field rendering, submission validation, successful signing events, and back navigation. Existing 6 I9 tests already cover preparer toggle, preparer validation, add/remove, and cancel event. Made-with: Cursor
…orm and I9SignatureForm Replace direct API calls and local form orchestration with the shared useSignEmployeeForm hook in both components. The hook handles I9 vs non-I9 detection, form schema creation, and preparer management. I9SignatureForm now uses flat preparer field names from the hook instead of useFieldArray. Made-with: Cursor
3 tasks
Made-with: Cursor
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
useSignEmployeeFormhook into both Employee SignatureForm (non-I9) and I9SignatureFormuseFieldArraywith nested objects to the hook's flat preparer field structure (preparerFirstName,preparer2FirstName, etc.)Test plan
Made with Cursor