Feat: Implement action confirmation on ApplicationCard#217
Merged
Jagadeeshftw merged 2 commits intoJun 23, 2026
Conversation
Contributor
|
adding an action confirmation step on the ApplicationCard is a sensible guard against accidental approve/reject clicks. rebased on latest main and merged. thanks! |
4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
ApplicationCardpreviously fired Assign/Reject/Unassign immediately with no confirmation for destructive actions, no loading/disabled state during the request, and could crash ifapplicantwas missing. This PR adds a confirmation step for destructive actions, pending/disabled UI with spinners, a null guard, and full keyboard/ARIA accessibility — backed by a comprehensive test suite at 100% coverage.Closes #188
What changed
Reject this application?→ Confirm reject / Cancel). The handler only fires after explicit confirmation, so a single misclick can no longer trigger an irreversible request. Assign (non-destructive) still fires directly.disabledand the active button shows aLoader2spinner witharia-busy. A second click on an in-flight button is ignored, preventing duplicate submissions.null/undefinedapplicantrenders nothing instead of dereferencingapplicant.name; the optionalbadgeremains conditionally rendered.<button type="button">(keyboard-operable by default) with explicitaria-labels (e.g. "Reject octocat"); the confirm prompt is a labelledrole="group", and decorative icons arearia-hidden.mountedRefprevents post-unmount state updates (the card often unmounts as a result of its own reject).onAssign/onReject/onUnassignprops (each receiving theapplicant, sync or async). The component is standalone (only referenced by the feature README), so no live callers needed updating.Files
src/features/maintainers/components/issues/ApplicationCard.tsxsrc/features/maintainers/components/issues/ApplicationCard.test.tsx(new)Acceptance criteria
Tests
13/13 passing · 100% coverage (statements / branches / functions / lines) for the file.