Skip to content

add confirmation dialog for destructive actions #4743 #4754

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

Merged
merged 1 commit into from
Mar 19, 2025

Conversation

sknep
Copy link
Contributor

@sknep sknep commented Mar 17, 2025

Changes proposed in this pull request:

  • Add generic dialog component based on USWDS modal
    • note: does not use HTML5 Dialog, because it's not compatible w/ USWDS JS or styles
  • Also memoizes callbacks because everything is callbacks now

security considerations

  • None I know of

@sknep sknep linked an issue Mar 17, 2025 that may be closed by this pull request
7 tasks
@sknep sknep force-pushed the confirm-file-storage-dialog-4743 branch from 3960f92 to 6157c9c Compare March 17, 2025 20:53
@sknep sknep self-assigned this Mar 17, 2025
@sknep sknep requested a review from a team March 17, 2025 20:53
@sknep sknep force-pushed the confirm-file-storage-dialog-4743 branch from 6157c9c to dc5f425 Compare March 17, 2025 21:00
@sknep sknep force-pushed the confirm-file-storage-dialog-4743 branch 2 times, most recently from 67357c3 to e68add7 Compare March 18, 2025 17:31
@cloud-gov-pages-operations
Copy link
Contributor

cloud-gov-pages-operations commented Mar 18, 2025

🤖 This is an automated code coverage report

Total coverage (lines): 28.29%
Coverage diff: 1.19% 📈

Copy link
Contributor

@apburnes apburnes left a comment

Choose a reason for hiding this comment

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

It looks like a good start. The addition of the useCallbacks unrelated to the dialog in the site storage page hurt readability in the review and led to some confusion on what's being added. I've got questions to clarify the some of the props and keydown actions in the dialog component.

@apburnes apburnes self-requested a review March 19, 2025 15:27
apburnes
apburnes previously approved these changes Mar 19, 2025
@sknep sknep force-pushed the confirm-file-storage-dialog-4743 branch from e68add7 to 2f6737d Compare March 19, 2025 16:11
@sknep sknep requested review from apburnes and drewbo March 19, 2025 16:12
@sknep sknep force-pushed the confirm-file-storage-dialog-4743 branch 2 times, most recently from 7c0eb5f to db096c5 Compare March 19, 2025 16:32
@sknep sknep force-pushed the confirm-file-storage-dialog-4743 branch from db096c5 to 8c52cf1 Compare March 19, 2025 18:10
@apburnes apburnes merged commit 126f686 into main Mar 19, 2025
8 checks passed
@apburnes apburnes deleted the confirm-file-storage-dialog-4743 branch March 19, 2025 20:32
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.

Create a dialog to confirm File Storage actions
3 participants