Skip to content

ref(ui): Drop unused optional args in forms - #123214

Merged
TkDodo merged 6 commits into
getsentry:masterfrom
JonasBa:jonas/unused-args/components-forms
Sep 2, 2026
Merged

ref(ui): Drop unused optional args in forms#123214
TkDodo merged 6 commits into
getsentry:masterfrom
JonasBa:jonas/unused-args/components-forms

Conversation

@JonasBa

@JonasBa JonasBa commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Split out of #122373 and #122624 so this folder can be reviewed on its own (~155 LOC).

Summary

  • Remove unused optional arguments and fields under static/app/components/forms.
  • Same approach as the original PRs: drop args/fields nothing passes, keep public hook/component options, inline previous defaults.

Files

  • static/app/components/forms/controls/rangeSlider/index.spec.tsx
  • static/app/components/forms/controls/rangeSlider/index.tsx
  • static/app/components/forms/formPanel.tsx
  • static/app/components/forms/jsonForm.spec.tsx
  • static/app/components/forms/jsonForm.tsx
  • static/app/components/forms/model.tsx

Test plan

  • CI typecheck / frontend tests for this slice.
  • Spot-check call sites in static/app/components/forms.

Legal Boilerplate

Look, I get it. The entity doing business as "Sentry" was incorporated in the State of Delaware in 2015 as Functional Software, Inc. and is gonna need some rights from me in order to utilize my contributions in this here PR. So here's the deal: I retain all rights, title and interest in and to my contributions, and by keeping this boilerplate intact I confirm that Sentry can use, modify, copy, and redistribute my contributions, under Sentry's choice of terms.

@JonasBa
JonasBa requested a review from a team as a code owner August 31, 2026 20:38
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Aug 31, 2026
Nothing passes a second argument, so missing fields always return the empty-string default.

Co-authored-by: Cursor <cursoragent@cursor.com>
@JonasBa

JonasBa commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Pushed a leftover unused-args finding in this same file: FormModel.getValue no longer takes defaultValue — nothing passed it, so missing fields still return ''.

…g cleanup

Co-authored-by: Cursor <cursoragent@cursor.com>
@JonasBa
JonasBa requested review from a team as code owners September 1, 2026 04:37
Callers still depend on the generic return type (boolean/string assignment,
no-base-to-string) and SentryMemberTeamSelectorField still passes a default.

Co-authored-by: Cursor <cursoragent@cursor.com>
Comment thread static/app/components/forms/jsonForm.spec.tsx Outdated
@TkDodo TkDodo added the Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests label Sep 2, 2026
@TkDodo
TkDodo merged commit 2e3325d into getsentry:master Sep 2, 2026
80 of 83 checks passed
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 Trigger: getsentry tests Once code is reviewed: apply label to PR to trigger getsentry tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants