-
Notifications
You must be signed in to change notification settings - Fork 2.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Display confirmation dialog on connected account deletion #10323
Display confirmation dialog on connected account deletion #10323
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Added confirmation modal to prevent accidental deletion of connected accounts in the settings interface.
- Added
isDeleteAccountModalOpen
state anddeleteAccount
handler inpackages/twenty-front/src/modules/settings/accounts/components/SettingsAccountsRowDropdownMenu.tsx
- Integrated
ConfirmationModal
component with appropriate title and subtitle for account deletion confirmation - Follows existing patterns seen in workspace and user account deletion implementations
💡 (1/5) You can manually trigger the bot by mentioning @greptileai in a comment!
1 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
const deleteAccount = async () => { | ||
await destroyOneRecord(account.id); | ||
setIsDeleteAccountModalOpen(false); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: closeDropdown() should be called after successful deletion to ensure proper UI cleanup
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The component gets destroyed on deletion so I don't think the closeDropwdown
is required in this particular case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's not a big deal but I think it's best to close the dropdown in every case (not just on success as Greptile suggests). Here it seems the click on "cancel" also closes the dropdown but that might not always be the case if we refactor to separate the modal layer from the underlying layer, I'm not sure it's a desired side effect
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!!! Thanks a lot
Fairly straightforward change, it's my first contribution in this project so tried to follow the existing patterns.
I couldn't find any component tests or e2e Playwright tests touching this area to update - happy to write some from scratch if necessary!
Closes #10285