Repository navigation
ref(scraps): Isolate form presentation components - #128650
Merged
Merged
Conversation
Contributor
Story previewsPreview the stories changed in this PR on the Vercel deployment:
Preview deployment: https://sentry-jayb4p5ny.sentry.dev |
Contributor
Sentry Snapshot Testing
|
JoshuaKGoldberg
approved these changes
Oct 23, 2026
natemoo-re
force-pushed
the
scraps/de-799-form-presentation
branch
from
October 23, 2026 21:21
8ca1028 to
2cd1782
Compare
Use TanStack Form as a peer and retain app-only integration tests. Refs DE-1762
natemoo-re
force-pushed
the
scraps/de-799-form-presentation
branch
from
October 23, 2026 21:23
2cd1782 to
1fab43e
Compare
natemoo-re
marked this pull request as ready for review
October 23, 2026 21:24
natemoo-re
enabled auto-merge (squash)
October 23, 2026 21:25
2 tasks done
natemoo-re
added a commit
that referenced
this pull request
Nov 9, 2026
Moves the rest of `static/app/components/core/form` (the form engine, `AutoSaveForm`, field controls, `FieldGroup`, and the error-mapper context) into `@sentry/scraps/form`, and merges `@sentry/scraps/formPresentation` back into it. #128650 split out the presentation layer because the field controls still depended on Select, CompactSelect, and the modal, which lived in the app at the time. Those moved out in #129523, #129596, and #129847. The three app couplings left in `core/form` are replaced: - **Hash focus:** `BaseField` reads the hash from `useOverlayContext().location`. `SentryOverlayProvider` already fills that from the router, so it no longer calls `useLocation`. - **`FieldGroup`:** renders its own panel and header styles, copied from the app's `Panel`/`PanelHeader`, and wraps children in `PanelProvider`. - **Confirm:** `Confirm` and `openConfirmModal` move to `@sentry/scraps/confirm`. Default copy now comes from `useTranslation` instead of `sentry/locale`. About 100 app callers change one import line each. `require-render-prop-spread` exempts `@sentry/scraps/confirm` because `Confirm`'s render prop passes `{open}`, not element props. Package changes: - Exports `./form`, `./form/formErrorContext`, and `./confirm`. Drops `./formPresentation`. - `@tanstack/react-query` and `zod` are peer dependencies and dev dependencies. `@tanstack/react-pacer` is a dependency. Stories, MDX docs, and the existing app-level specs stay in the app. The specs use `sentry-test` helpers and now import from the package. No visual or behavior changes are intended. <!-- junior-request-attribution:start --> via **nate**. <!-- junior-request-attribution:end --> <!-- junior-session-footer:start --> <!-- junior-conversation-id:slack%3AD0BA0V4G47K%3A1793981613.461909 --> -- [View Session](https://junior-prod.sentry.dev/conversations/slack%3AD0BA0V4G47K%3A1793981613.461909) [[Sentry]](https://sentry.sentry.io/explore/conversations/slack%3AD0BA0V4G47K%3A1793981613.461909/?project=4510944073809921) <!-- junior-session-footer:end --> Co-authored-by: sentry-junior[bot] <264270552+sentry-junior[bot]@users.noreply.github.com> Co-authored-by: Nate Moore <[email protected]> Co-authored-by: Nate Moore <[email protected]>
This branch was successfully deployed
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.
Moves
DisplayField,FieldLayout,FieldMeta, form status indicators, and shared contexts and field ID hooks into@sentry/scraps.The form engine, concrete field controls,
FieldGroup, confirmation behavior, and hash-focus adapters remain in the app. TanStack Form is a peer dependency. Generic presentation specs live in the package; responsive form and submit/focus integration checks stay in the app.New package export:
@sentry/scraps/formPresentationcloses DE-1762