feat(StateTaxesList): display setup_status, default_rates_applied, and ready_to_run_payroll#1620
Merged
serikjensen merged 7 commits intomainfrom Apr 30, 2026
Merged
Conversation
jeffredodd
approved these changes
Apr 28, 2026
| <> | ||
| <Components.Badge status={requirement.setupComplete ? 'success' : 'warning'}> | ||
| {requirement.setupComplete ? t('completeBadge') : t('incompleteBadge')} | ||
| <div style={{ display: 'flex', gap: '8px', alignItems: 'center', flexWrap: 'wrap' }}> |
Contributor
There was a problem hiding this comment.
Just calling this out since i've seen it across a few PRs.... looks like Flex isn't doing it for us anymore? Maybe?
Member
Author
There was a problem hiding this comment.
i think it's hallucinating it, i'll have it revise
dmortal
reviewed
Apr 28, 2026
| }, | ||
| render: requirement => ( | ||
| <Flex flexDirection="column" gap={4}> | ||
| <span>{statesHash(requirement.state as (typeof STATES_ABBR)[number])}</span> |
Contributor
There was a problem hiding this comment.
should this be Text as span?
dmortal
approved these changes
Apr 28, 2026
8afa1ee to
1280f42
Compare
…mit-callback guidance Completes the useSignEmployeeForm migration per the migrate-sdk-component-to-hooks skill and integrates the "Submit Callbacks vs. Return Value" guidance into the hooks docs: - SignatureForm and I9SignatureForm now render through BaseLayout for loading and error states, wrap fields in SDKFormProvider, and consume the hook's typed Fields API (no direct UI-primitive imports). Head/Preview/Form/Actions subcomponents are inlined. - useSignEmployeeForm now types Fields explicitly via SignEmployeeFormFieldComponents, so Fields.Signature, Fields.ConfirmSignature, Fields.UsedPreparer, and Preparer1-4 have proper component types in consumers. - SelectHookField gains a placeholder prop so preparer state selects can be translated. - docs/hooks/hooks.md adds a Submit Callbacks vs. Return Value subsection: single- mutation hooks should rely on HookSubmitResult rather than exposing callback args, which matches how SignatureForm/I9SignatureForm now consume actions.onSubmit. - Revert incidental docs/reference reordering and remove obsolete SignatureForm subcomponents. SDK-774 Made-with: Cursor
… REQUIRED code Align the Employee DocumentSigner hook's validation surface with useSignCompanyForm: the confirmation checkbox no longer has a separate CONFIRMATION_REQUIRED error code — it emits REQUIRED directly when unchecked via z.boolean().refine(val => val, ...). - signEmployeeFormSchema: drop CONFIRMATION_REQUIRED, use a shared agreeValidator (.refine truthiness) for confirmSignature and every preparer agree field, and remove the superRefine that only existed to emit the now-redundant code. - fields: remove ConfirmationValidation; ConfirmSignatureFieldProps and PreparerCheckboxFieldProps now use RequiredValidation like the text/select fields. - Stop re-exporting SignEmployeeFormConfirmationValidation from the hook index and the SDK entry point (safe to break — 0.40.0 has not shipped yet). - SignatureForm / I9SignatureForm: pass only REQUIRED in validationMessages. - useSignEmployeeForm docs: updated error-code table, fields reference, and every usage example to the single-code shape. SDK-774 Made-with: Cursor
- Revert docs/hooks/hooks.md to main; the "Submit Callbacks vs. Return Value" guidance is internal-only and already lives in the migration skill. - Move migrate-sdk-component-to-hooks skill from .cursor/skills to .claude/skills so it lives alongside the other Claude skills. Made-with: Cursor
The /UNSTABLE_Hooks entry point was removed in 0.40.0; hooks now ship from the top-level @gusto/embedded-react-sdk. Update all import examples in the useSignEmployeeForm guide to match. Made-with: Cursor
…d ready_to_run_payroll - Add 3-state badge (not_started/in_progress/complete) driven by setup_status with fallback to setup_complete for backward compat - Show "Default tax rates applied" subtext when default_rates_applied is true - Show secondary "Ready to run payroll" badge when ready_to_run_payroll is true - Drive CTA label (Start setup / Continue setup / Edit) from setup_status - Add i18n keys: notStartedBadge, inProgressBadge, startStateTaxSetupCta, defaultRatesAppliedText, readyToRunPayrollBadge - Refactor tests to isolated single-state renders per describe block Made-with: Cursor
- Add flexWrap prop to Flex component (threaded through responsive custom properties) so consumers don't need raw div styles for wrapping layouts - Replace raw <span> with <Components.Text as="span"> for state name - Use <Flex flexWrap="wrap"> in status column instead of inline div style Made-with: Cursor
1280f42 to
dbc415d
Compare
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
Implements the Phase 2 UI updates for the Company State Taxes list, surfacing three new API fields from
TaxRequirementStatesList:not_started→ "Not started" (info),in_progress→ "In progress" (warning),complete→ "Complete" (success). Falls back tosetup_completeboolean for backward compatibility.default_rates_applied: true.ready_to_run_payroll: true.setup_status.Changes
src/i18n/en/Company.StateTaxes.json— 5 new keys:notStartedBadge,inProgressBadge,startStateTaxSetupCta,defaultRatesAppliedText,readyToRunPayrollBadgesrc/types/i18next.d.ts— regenerated typessrc/components/Company/StateTaxes/StateTaxesList/List.tsx— updated badge/CTA logic withas const satisfiesmaps for type-safet()callssrc/test/mocks/apis/company_state_taxes.ts— addedgetAllStateTaxRequirementsWithStatusfixture covering all four design statessrc/components/Company/StateTaxes/StateTaxesList/StateTaxesList.test.tsx— refactored to isolated single-state renders perdescribeblock with negative assertions for exclusivityTest plan
npm run test -- --run src/components/Company/StateTaxes/StateTaxesList/StateTaxesList.test.tsxMade with Cursor