Conversation
…itted form but no longer required
There was a problem hiding this comment.
Pull request overview
Updates the Mint tax & cash dashboard to display appropriate copy when a user previously submitted a tax form but is no longer required to submit one.
Changes:
- Added a new configurable text prop for the “previously submitted but not required” tax-document state.
- Rendered a new tax-documents UI block for the
noFormNeeded && status === "ACTIVE"scenario. - Updated docs/types and added a Storybook story for the new state; bumped mint-components version.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/mint-components/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.tsx | Adds new Stencil @Prop for the new tax-documents description text. |
| packages/mint-components/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.tsx | Adds a new conditional tax section rendering for noFormNeeded + ACTIVE status and wires in the new text. |
| packages/mint-components/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/readme.md | Documents the new component property/attribute. |
| packages/mint-components/src/components/tax-and-cash/TaxForm.stories.tsx | Adds a Storybook scenario for the new UI state. |
| packages/mint-components/src/components.d.ts | Updates generated typings to include the new component prop. |
| packages/mint-components/package.json | Version bump to 2.1.5-0. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...s/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.tsx
Outdated
Show resolved
Hide resolved
...s/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.tsx
Outdated
Show resolved
Hide resolved
packages/mint-components/src/components/tax-and-cash/TaxForm.stories.tsx
Outdated
Show resolved
Hide resolved
...s/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.tsx
Outdated
Show resolved
Hide resolved
…atus for the users submitted tax document. Added spec
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.
Comments suppressed due to low confidence (1)
packages/mint-components/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.tsx:1160
!!states.statuswill also be true for tax document status "NEW" (seeTaxDocumentStatus), butstatusMapdoesn't define a rendering for "NEW". With this change, users in "NEW" state can end up seeing an empty status area (and the “Submit new tax form” button, since only "NOT_VERIFIED" is excluded). Add explicit handling for "NEW" (e.g., treat it like "NOT_VERIFIED") and ensure the new-form button logic matches that state.
<span class={sheet.classes.StatusAlert}>
{statusMap[states.status]}
</span>
</div>
</span>
{(!states.noFormNeeded || !!states.status) &&
states.status !== "NOT_VERIFIED" && (
<sl-button
disabled={states.disabled || states.loading}
onClick={callbacks.onClick}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...s/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.tsx
Outdated
Show resolved
Hide resolved
...s/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.tsx
Show resolved
Hide resolved
...ts/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.feature
Outdated
Show resolved
Hide resolved
...s/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.tsx
Show resolved
Hide resolved
...s/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.tsx
Show resolved
Hide resolved
| "name": "@saasquatch/mint-components", | ||
| "title": "Mint Components", | ||
| "version": "2.1.4", | ||
| "version": "2.1.5-1", |
There was a problem hiding this comment.
This needs to be set to a stable version number before we approve and merge this PR.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...onents/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.tsx
Show resolved
Hide resolved
...s/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.tsx
Show resolved
Hide resolved
...ts/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard.feature
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 10 out of 11 changed files in this pull request and generated 3 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
...s/src/components/tax-and-cash/sqm-tax-and-cash-dashboard/sqm-tax-and-cash-dashboard-view.tsx
Show resolved
Hide resolved
| {intl.formatMessage( | ||
| { | ||
| id: `badgeTextSubmittedOn`, | ||
| defaultMessage: | ||
| states.documentType === "W9" | ||
| states.documentType === "W9" || !states.documentType | ||
| ? text.badgeTextSubmittedOn | ||
| : text.badgeTextSubmittedOnW8, |
There was a problem hiding this comment.
statusMap.ACTIVE now treats a missing states.documentType as W-9 (states.documentType === "W9" || !states.documentType), which can produce incorrect copy for users who previously submitted a W-8 but no longer have a required document type (the hook sets documentType from requiredTaxDocumentType, which becomes null). If the intent is to reflect the submitted form type, consider basing this choice on the submitted document type (e.g., currentTaxDocument.type exposed in state) rather than defaulting to W-9 when documentType is absent.
There was a problem hiding this comment.
This is an edgecase because if the user submitted a W8 before and they get ported over to CASH_ONLY_DEFER_W9 tax setting, the requiredTaxDocumentType will equal null and the document type will not be available due to comply-exchange.
TLDR we want to display the W9 submittedOn text when requiredTaxDocumentType === null
packages/mint-components/src/components/tax-and-cash/TaxForm.stories.tsx
Show resolved
Hide resolved
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 11 out of 12 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
packages/mint-components/src/components/tax-and-cash/TaxForm.stories.tsx:1091
- In this story,
noFormNeededis set totruewhiledocumentTypeis set to "W9". In the real hook (useTaxAndCashDashboard),noFormNeededis derived from!documentType, so this combination is not representable and can make the story misleading. Consider either settingnoFormNeeded: falseor settingdocumentType/documentTypeStringtoundefined/"" to reflect the intended scenario.
states: {
veriffLoading: false,
noFormNeeded: true,
canEditPayoutInfo: true,
status: "INACTIVE",
documentType: "W9",
documentTypeString: taxTypeToName("W9"),
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| }, | ||
| }, | ||
| props.demoData || props.stateController || {}, | ||
| { arrayMerge: (_, a) => a } | ||
| { arrayMerge: (_, a) => a }, | ||
| ); |
There was a problem hiding this comment.
In useDemoTaxAndCashDashboard, the second deepmerge argument uses props.stateController directly, but stateController is a JSON string (defaulting to "{}"). Passing a string into deepmerge can override the merged object (or break merging), which makes demo/state-controller-driven rendering unreliable. Parse stateController into an object (e.g., via the existing parseStates pattern used in other demo hooks) before merging, and then merge props.demoData/parsed state consistently.
Type of change
Links
Checklists
Development
Paperwork
Code review