Skip to content

ref(forms): Migrate RequestIntegrationModal to TanStack form system#115990

Draft
priscilawebdev wants to merge 1 commit into
masterfrom
priscilawebdev/ref/de-1246-migrate-request-integration-modal-form-2
Draft

ref(forms): Migrate RequestIntegrationModal to TanStack form system#115990
priscilawebdev wants to merge 1 commit into
masterfrom
priscilawebdev/ref/de-1246-migrate-request-integration-modal-form-2

Conversation

@priscilawebdev
Copy link
Copy Markdown
Member

Migrate the integration-request modal from the legacy Form / TextareaField setup to useScrapsForm with field.TextArea and form.SubmitButton.

The previous implementation kept the textarea value in local useState and triggered the mutation from a standalone Button onClick. That bypassed form-level validation, submitting state, and the busy/disabled wiring the new system gives us. After the migration the mutation runs inside form.onSubmit, the message comes through the form value, and the submit button shows the busy state automatically — so the isSending local state can go away.

Behavior is unchanged: same endpoint, same payload shape, same analytics call on mutate, same success/error toasts and close behavior. The textarea picks up a "Message" label via field.Layout.Stack — required by the new layout primitives and a small accessibility win (the legacy TextareaField rendered with no label).

Refs DE-1246

Replace the legacy Form/TextareaField + local useState with useScrapsForm
and field.TextArea, so the modal participates in the new form pipeline
(validation, submitting state, SubmitButton busy/disabled handling).

The mutation now receives the message via the form value instead of via
closure on local state, and the submit button is driven by the form
rather than a standalone Button click.

Refs DE-1246
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@linear-code
Copy link
Copy Markdown

linear-code Bot commented May 21, 2026

DE-1246

@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 21, 2026
@github-actions
Copy link
Copy Markdown
Contributor

📊 Type Coverage Diff

✅ No new type safety issues introduced. Coverage: 93.60%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant