Skip to content

ref(scraps): adopt useModal in remaining call sites#115132

Merged
evanpurkhiser merged 1 commit into
masterfrom
evanpurkhiser/ref-scraps-adopt-usemodal-in-remaining-call-sites
May 18, 2026
Merged

ref(scraps): adopt useModal in remaining call sites#115132
evanpurkhiser merged 1 commit into
masterfrom
evanpurkhiser/ref-scraps-adopt-usemodal-in-remaining-call-sites

Conversation

@evanpurkhiser
Copy link
Copy Markdown
Member

Adopts the useModal hook from @sentry/scraps/modal in place of importing openModal from sentry/actionCreators/modal, following up on the GlobalModal adoption in #114447.

The migration was applied by an ast-grep codemod that:

  • Inserts const {openModal} = useModal(); at the top of each enclosing function component or custom hook.
  • Updates the import (or merges into an existing @sentry/scraps/modal import).
  • Appends openModal to any wrapping useCallback / useEffect / useMemo dependency array, since the destructured value is no longer module-stable.

Action-creator helpers (e.g. openInviteModal) and other call sites where a hook can't be used are left alone. This PR is one of several split per CODEOWNERS group.

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

github-actions Bot commented May 7, 2026

📊 Type Coverage Diff

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

Copy link
Copy Markdown
Contributor

@cursor cursor Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 05a65ec. Configure here.

Comment thread static/app/components/pickProjectToContinue.tsx
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

omg it really is just called in the body 🫠

@evanpurkhiser evanpurkhiser enabled auto-merge (squash) May 7, 2026 20:38
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-scraps-adopt-usemodal-in-remaining-call-sites branch from 05a65ec to 636c762 Compare May 18, 2026 18:34
@evanpurkhiser evanpurkhiser merged commit ca83e18 into master May 18, 2026
75 checks passed
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/ref-scraps-adopt-usemodal-in-remaining-call-sites branch May 18, 2026 18:41
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.

2 participants