Add confirmation step before deleting topic - #293
Merged
dcollie2 merged 2 commits intoJul 23, 2025
Merged
Conversation
I followed the same pattern as we have when destroying a tag.
While looking into adding a confirmation step before destroying a topic, I noticed that we display successful flash messages for Tags, Regions and Users but not for Topics and Languages, so I added those for consistency and clearer user feedback.
|
|
||
| Topics::Mutator.new(topic: @topic).destroy | ||
| redirect_to topics_path | ||
| if params[:confirmed] |
Collaborator
There was a problem hiding this comment.
Can we use native confirmation dialog boxes in browser?
Collaborator
Author
There was a problem hiding this comment.
I did it this way because that's how we do it for Tags (you can see a video here in the PR that introduced it). Should I leave it like this using Turbo stream or change to a browser dialog box for both Tags and Topics?
Collaborator
There was a problem hiding this comment.
Can we check here if it possible to do just simply with dialog box?
Collaborator
There was a problem hiding this comment.
Let's circle back to this once we're past the launch. We can refactor if necessary.
dcollie2
approved these changes
Jul 23, 2025
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.
What Issue Does This PR Cover, If Any?
Resolves #271
What Changed? And Why Did It Change?
It:
How Has This Been Tested?
With RSpec and by hand
Please Provide Screenshots
Confirm.before.deleting.topic.mp4
Additional Comments
N/A