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

Opt-in warn-before-closing #292

Open
LemuelCushing opened this issue Jan 15, 2024 · 2 comments
Open

Opt-in warn-before-closing #292

LemuelCushing opened this issue Jan 15, 2024 · 2 comments

Comments

@LemuelCushing
Copy link

This ext is a godsend, but - since it abruptly closes tabs, it also takes with it the history, which can sometimes be a bit of a pain.

Describe the solution you'd like
The simplest solution would be to add a setting that'll enable a confirmation prompt before closing the current tab and switching to the older one. True, that might get a bit annoying for some, but personally I'd prefer it.

Describe alternatives you've considered

  • Force duplicate tabs when the user "insists" (by immediately pressing ^ / ⌘ + ⇧ + T upon prune, for instance)
  • Keep the tab open, but move focus to older tab, while backing up in the background on the younger tab

(would be happy to try and implement and PR it, but might take a while till I'll get the time, so I figured I'll suggest it first)

@tbrockman
Copy link
Owner

tbrockman commented Jan 15, 2024

Hey, thanks for the suggestion! I totally agree that this is annoying when it happens, you can technically recover the tab (with its history) after it's been closed (in Chrome, not sure about Firefox) by re-opening the one we closed from History (after disabling show existing tables instead of duplicates), but this definitely isn't an ideal user experience.

I think some sort of sub-setting to confirm before closing the current tab is one way we could go about this (and would allow people to have a bit more say in the process), or it's possible that we might just be able to be a bit smarter about when we close and focus tabs (or, we could do both in conjunction).

For instance, if we see a navigation from an existing tab with history to a URL which is already opened in another tab, the right thing to do most of the time is probably just prevent the navigation and focus the existing tab (rather than closing the tab with history). I think we could implement this logic without requiring additional permissions or too much code.

But, to your point, I've also heard a lot of feedback from people that sometimes they want more control over when to close already opened tabs, so giving users a confirmation dialog could be useful anyways.

I also don't always get as much time as I'd like to work on this, so definitely open to working with you on a PR to build this. It'd also be a good opportunity for me to get an idea of how much friction new contributors experience trying to work on the project, so that I can figure out anything can make it a bit smoother and encourage collaboration so that my schedule isn't a barrier to adding features to the extension 😬

@tbrockman
Copy link
Owner

Keep the tab open, but move focus to older tab, while backing up in the background on the younger tab

is now implemented, and should be available in the latest version in Chrome + Firefox (Edge awaiting approval). There's some edge cases

re: confirmation prompt

As for implementing any sort of prompt, it might require a bit more thinking/experimentation. It seems like it would be possible to do using an offscreen document that creates a window prompt, but I'm not sure how that'd actually work in practice, and it'd require another permission which is a bit less desirable (think it could be requested when needed as an optional permission, but would have to implement).

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

No branches or pull requests

2 participants