Repository navigation
ref(scraps): Move the form system into the package - #130251
Merged
Merged
Conversation
Moves the rest of `static/app/components/core/form` into `@sentry/scraps/form` and folds `@sentry/scraps/formPresentation` back into it. The split existed because Select, CompactSelect, and the modal still lived in the app; those have since been extracted. The three remaining app couplings are replaced: - `BaseField` reads the location hash from `useOverlayContext()`, which the app already fills from the router, instead of `useLocation`. - `FieldGroup` renders its own panel styles instead of the app's `Panel`/`PanelHeader`. - `Confirm`/`openConfirmModal` move to `@sentry/scraps/confirm`, using `useTranslation` for default copy. App callers import the package. Stories and the existing app-level specs stay in the app. Co-Authored-By: Nate Moore <nate.moore@sentry.io>
Contributor
Story previewsPreview the stories changed in this PR on the Vercel deployment:
Preview deployment: https://sentry-bjb5mbgzo.sentry.dev |
TkDodo
approved these changes
Nov 9, 2026
natemoo-re
enabled auto-merge (squash)
November 9, 2026 16:13
sentry-junior Bot
added a commit
that referenced
this pull request
Nov 9, 2026
master moved Confirm into the scraps package (#130251), and CI builds this stack merged with master.
sentry-junior Bot
added a commit
that referenced
this pull request
Nov 9, 2026
master moved Confirm into the scraps package (#130251), and CI builds this stack merged with master.
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 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/formPresentationback 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/formare replaced:BaseFieldreads the hash fromuseOverlayContext().location.SentryOverlayProvideralready fills that from the router, so it no longer callsuseLocation.FieldGroup: renders its own panel and header styles, copied from the app'sPanel/PanelHeader, and wraps children inPanelProvider.ConfirmandopenConfirmModalmove to@sentry/scraps/confirm. Default copy now comes fromuseTranslationinstead ofsentry/locale. About 100 app callers change one import line each.require-render-prop-spreadexempts@sentry/scraps/confirmbecauseConfirm's render prop passes{open}, not element props.Package changes:
./form,./form/formErrorContext, and./confirm. Drops./formPresentation.@tanstack/react-queryandzodare peer dependencies and dev dependencies.@tanstack/react-paceris a dependency.Stories, MDX docs, and the existing app-level specs stay in the app. The specs use
sentry-testhelpers and now import from the package. No visual or behavior changes are intended.via nate.
--
View Session [Sentry]