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

Resolved Potential Issue when Deleting Personal Access Tokens #15022

Merged
merged 1 commit into from
Jul 3, 2024

Conversation

spencerrlongg
Copy link
Collaborator

@spencerrlongg spencerrlongg commented Jul 3, 2024

Description

Fixes an issue in which a user could either double click the delete button and throw an error, or throw an error by editing their HTML and providing an un-deletable token ID

Chaining ? also means an error won't throw if the user were to manually edit the ID to something invalid.

Should probably start using wire:loading.attr="disabled" by default on Livewire buttons, will go through them next week.

Fixes SC-26090

Had to enable "Slow 3G" in Chrome to test this locally.

Type of change

Please delete options that are not relevant.

  • Bug fix (non-breaking change which fixes an issue)

Copy link

what-the-diff bot commented Jul 3, 2024

PR Summary

  • Improvement in Deletion Process
    Earlier deletion process in PersonalAccessTokens.php was prone to errors when attempting to delete an already non-existing token. This PR significantly improves reliability by introducing a null-safe operator before deletion function call. This change essentially makes the deletion process error-free even when faced with null values.

  • Loading State UI Enhancement
    Modifications have been made to the delete button in personal-access-tokens.blade.php. This change shows visual feedback to user on button when the deletion process is ongoing. The delete button now gets disabled during this process, preventing the triggering of redundant and possibly error-prone delete operations. This greatly improves user experience during interactions.

@snipe
Copy link
Owner

snipe commented Jul 3, 2024

Nice, thank you!

@snipe snipe merged commit f1f68b8 into snipe:develop Jul 3, 2024
8 of 9 checks passed
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.

2 participants