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

Confirmation dialog for deleting items #109

Open
elliotwutingfeng opened this issue Oct 24, 2022 · 5 comments
Open

Confirmation dialog for deleting items #109

elliotwutingfeng opened this issue Oct 24, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@elliotwutingfeng
Copy link
Contributor

Problem description

When deleting non-favorited items, sometimes misclicks can cause favorited items to be accidentally deleted. Or misclicks can cause the wrong item to be deleted.

Potential solutions/workarounds

Workaround

User should be more careful when deleting items (but that's not really a solution 😞)

Solution

Implement a confirmation dialog like Are you sure you want to delete this item? (or any better phrasing) when user clicks on trash icon to delete item.

Best is to allow users to enable/disable delete confirmation dialogs for either favorited items, non-favorited items, or both at the same time, via the extension preferences menu.

Additional context

nil

@SUPERCILEX
Copy link
Owner

In general, I kind of hate confirmation dialogs: they're the poor man's undo button. I'm wondering if we can instead use notifications as snackbars and provide an undo button in there. My main concern is that it'll be notification spam.

@elliotwutingfeng
Copy link
Contributor Author

elliotwutingfeng commented Oct 24, 2022

Sometimes I want to delete some recently copied entries when private mode happens to be toggled off.

For me the main issue is accidentally deleting the bottom-most favorite entry, when trying to delete the top-most non-favorite entry, which can happen due to cumulative layout shift. I am not too concerned about accidentally deleting non-favorite entries.

Instead of having an "undo" mechanism, an alternate approach is to allow the user to show/hide the favorite entries with a toggle button. Or maybe a "recycle-bin" for deleted favorite entries?

@SUPERCILEX
Copy link
Owner

That makes sense. Presumably you don't always make this mistake, so having a dialog would be annoying most of the time, hence undo.

A recycle bin is just undo with extra steps. :) (For the case where you may want to undo at a significantly later point in time.)

Given your use case, I think a good strat would be to only provide undo notifications for favorites and clearing the entire history. I don't think that'll be spammy.

If you'd like to give this a go in the PR, I can offer guidance.

@elliotwutingfeng
Copy link
Contributor Author

Sure I'd give it a go. I can only work on this from the middle of next month onwards.

@SUPERCILEX
Copy link
Owner

Sounds good.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants