Skip to content
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

Merged

Conversation

alexmotoc
Copy link
Contributor

@alexmotoc alexmotoc commented Feb 19, 2025

deleteConfirmation

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

Copy link
Contributor

@greptile-apps greptile-apps bot left a 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 and deleteAccount handler in packages/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

Comment on lines +44 to +47
const deleteAccount = async () => {
await destroyOneRecord(account.id);
setIsDeleteAccountModalOpen(false);
};
Copy link
Contributor

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

Copy link
Contributor Author

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

Copy link
Member

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

@alexmotoc alexmotoc changed the title Display confirmation dialog on connected account deletion (#10285) Display confirmation dialog on connected account deletion Feb 19, 2025
Copy link
Member

@FelixMalfait FelixMalfait left a 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

@FelixMalfait FelixMalfait merged commit ad47ab5 into twentyhq:main Feb 19, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Display a confirmation popup when the user is deleting a connected account
2 participants