Skip to content

fix: do not allow pressing branch delete btn multiple times#4798

Merged
mtsgrd merged 4 commits intomasterfrom
fix-do-not-allow-pressing-branch-delete-btn-multiple-times
Sep 1, 2024
Merged

fix: do not allow pressing branch delete btn multiple times#4798
mtsgrd merged 4 commits intomasterfrom
fix-do-not-allow-pressing-branch-delete-btn-multiple-times

Conversation

@ndom91
Copy link
Contributor

@ndom91 ndom91 commented Aug 30, 2024

☕️ Reasoning

  • Delete branch actoin can be triggered multiple times on the Rust side

🧢 Changes

  • Add a loading attribute to the delete fn, which when true will disable the btn, among other things.
  • Fix loading={isDeleting} attribute in the BranchPreviewHeader.svelte as well.

Fixes: #4794

@vercel
Copy link

vercel bot commented Aug 30, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
gitbutler-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 30, 2024 10:49am

Copy link
Collaborator

@Byron Byron left a comment

Choose a reason for hiding this comment

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

Thank you, that looks like it should do the trick!

I am just commenting here as I don't think I am qualified to arm-chair (browser-only) review frontend code 😅.

Copy link
Collaborator

@Byron Byron left a comment

Choose a reason for hiding this comment

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

Actually, let me approve it so it's not blocked :).

@mtsgrd mtsgrd merged commit de310a2 into master Sep 1, 2024
@mtsgrd mtsgrd deleted the fix-do-not-allow-pressing-branch-delete-btn-multiple-times branch September 1, 2024 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Delete Branch can be triggered multiple times

3 participants