Skip to content

ref(onboarding): adopt useModal in onboarding flows#115127

Merged
evanpurkhiser merged 1 commit into
masterfrom
evanpurkhiser/ref-onboarding-adopt-usemodal-in-onboarding-flows
May 19, 2026
Merged

ref(onboarding): adopt useModal in onboarding flows#115127
evanpurkhiser merged 1 commit into
masterfrom
evanpurkhiser/ref-onboarding-adopt-usemodal-in-onboarding-flows

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.

@evanpurkhiser evanpurkhiser requested a review from a team May 7, 2026 20:17
@github-actions github-actions Bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 7, 2026
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 5c33b8a. Configure here.

Comment thread static/app/views/projectInstall/createProject.tsx Outdated
@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.55%

@evanpurkhiser evanpurkhiser enabled auto-merge (squash) May 7, 2026 20:38
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-onboarding-adopt-usemodal-in-onboarding-flows branch from 5c33b8a to e295523 Compare May 7, 2026 20:53
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-onboarding-adopt-usemodal-in-onboarding-flows branch from e295523 to 093af22 Compare May 7, 2026 21:13
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-onboarding-adopt-usemodal-in-onboarding-flows branch from 093af22 to ee3f2f0 Compare May 18, 2026 18:34

createProjectInstance = mockCreateProjectHook();
mockUseCreateProject.mockReturnValue(createProjectInstance);
(useModal as jest.Mock).mockReturnValue({openModal: mockOpenModal});
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.

This can be jest.mocked(useModal) I think?

@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-onboarding-adopt-usemodal-in-onboarding-flows branch from ee3f2f0 to 3afdb49 Compare May 18, 2026 19:54
@evanpurkhiser evanpurkhiser force-pushed the evanpurkhiser/ref-onboarding-adopt-usemodal-in-onboarding-flows branch from 3afdb49 to b4fdb96 Compare May 18, 2026 19:57
@evanpurkhiser evanpurkhiser merged commit 8641f8f into master May 19, 2026
75 checks passed
@evanpurkhiser evanpurkhiser deleted the evanpurkhiser/ref-onboarding-adopt-usemodal-in-onboarding-flows branch May 19, 2026 18:16
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.

3 participants