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

Confirm more 'destructive' actions #1492

Merged
merged 7 commits into from
Dec 19, 2024
Merged

Conversation

huntertur
Copy link
Contributor

  • Add confirmations for the following actions:
    • unfollowing a user
    • unfavoriting a submission
    • ignoring a user
  • Replace one-off confirmation logic for unfriending a user with data-confirm
  • Replace XMLHttpRequest with fetch in client-side submission favoriting logic

I was not able to cleanly use data-confirm for unfavoriting a submission, since the next submit event handler, which does the web request to favorite or unfavorite the submission, will then immediately fire regardless of the user's choice for the confirmation dialog. Perhaps the e.preventDefault(); in the data-confirm handler could be changed to ignore all following event handlers instead of just the default event handler, but I didn't pursue this since I don't know if this would break another part of Weasyl.

Closes #1462.

@charmander charmander merged commit d0be363 into Weasyl:main Dec 19, 2024
4 checks passed
@huntertur huntertur deleted the 1462-confirm branch January 1, 2025 22:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Confirm more actions that can’t be completely undone in some significant sense
2 participants