ref(forms): Migrate RequestIntegrationModal to TanStack form system#115990
Draft
priscilawebdev wants to merge 1 commit into
Draft
ref(forms): Migrate RequestIntegrationModal to TanStack form system#115990priscilawebdev wants to merge 1 commit into
priscilawebdev wants to merge 1 commit into
Conversation
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>
Contributor
📊 Type Coverage Diff✅ No new type safety issues introduced. Coverage: 93.60% |
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.
Migrate the integration-request modal from the legacy
Form/TextareaFieldsetup touseScrapsFormwithfield.TextAreaandform.SubmitButton.The previous implementation kept the textarea value in local
useStateand triggered the mutation from a standaloneButtononClick. That bypassed form-level validation, submitting state, and the busy/disabled wiring the new system gives us. After the migration the mutation runs insideform.onSubmit, the message comes through the form value, and the submit button shows the busy state automatically — so theisSendinglocal 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 legacyTextareaFieldrendered with no label).Refs DE-1246