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

Add confirmation modals to destructive actions #270

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

SheepTester
Copy link
Member

@SheepTester SheepTester commented Nov 25, 2024

Info

Closes #171

For most destructive buttons, including ones directly cause API actions when clicked, as well as some other permanent actions like competing a pickup event, it now asks for confirmation first.

Background: a pickup event was accidentally marked as completed

Changes

  • Added a useConfirm hook that manages a confirmation modal
  • Used the hook for several destructive buttons

Type of Change

  • Bug Fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as
    expected)
  • Logistics Change (A change to a README, description, or dev workflow setup like
    linting/formatting)
  • Continuous Integration Change (Related to deployment steps or continuous integration
    workflows)
  • Other: (Fill In)

Testing

I have tested that my changes fully resolve the linked issue ...

  • locally on Desktop.
  • on the live deployment preview on Desktop.
  • on the live deployment preview on Mobile.
  • I have added new Cypress tests that are passing.

Checklist

  • I have performed a self-review of my own code.
  • I have followed the style guidelines of this project.
  • I have documented any new functions in /src/lib/* and commented hard to understand areas
    anywhere else.
  • My changes produce no new warnings.

Screenshots

image
image

image

^ note: i'm not sure if the backend does delete all of a collections' items

image

image

this one has a different cancel button label to avoid the double cancel:
image

Copy link

vercel bot commented Nov 25, 2024

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

Name Status Preview Comments Updated (UTC)
membership-portal-ui-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 25, 2024 7:30am
testing-membership-portal-ui-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 25, 2024 7:30am

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.

warn before deleting collection, cancelling pickup event, completing pickup event
1 participant