-
Notifications
You must be signed in to change notification settings - Fork 40
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 newtab override #208
base: master
Are you sure you want to change the base?
add newtab override #208
Conversation
Thanks for sending this in! I was playing around with it some and one thing I noticed is that, when switching to an open tab, the "new-tab" (i.e. Tab Stash) tab still sticks around. Another thing that seems to be different is that once a new tab is opened and becomes the active tab, the Tab Stash tab gets closed. (I assume this is because Tab Stash itself is the new-tab page, so the "close an unneeded new-tab page" logic kicks in.) This seems to happen even if the Tab Stash tab is pinned. So I think there's a little more we need to do here to make the UX smooth:
And we may want to distinguish between "Tab Stash as a new-tab page" (where it closes itself when a user restores something) and "Tab Stash as a UI page" (where it keeps the existing behavior). Though I'm on the fence about this--I could see it working well both ways. What are your thoughts? |
Thanks a lot for the feedback! I agree that it makes sense to differentiate between the two: I don't think one expects explicitly opened stash-list-tabs to be closed like new tabs. I've added a new-tab.html that is the same as the stash-list.html. This allows the extension to differentiate between the "Tab Stash as a new-tab page" and "Tab Stash as a UI page" by their URL. It might be nice to let the user know as well, I've tested a bit and it's easily doable with a This also means that "Tab Stash as a UI page" now behaves like they did before (not getting closed automatically), and the "Tab Stash as a new-tab page" behaves like the default new tab from Firefox (so it also gets closed even if pinned, should this be changed?). I don't know if I understand the second bullet point: As far as I can tell, the default new tab also stay open in this situation. |
I think you could do this even more simply by adding a query parameter to stash-list.html, something like https://github.com/josh-berry/tab-stash/blob/master/src/stash-list/index.ts#L9 ...and populate the Vue property from the URL in a manner similar to how we detect if we're in the sidebar or not:
I think it should be clear from context; IIRC Firefox will still title the page "New Tab" regardless, so there should be some clues there already.
I think the key question is: "when/how does the Tab Stash UI close itself?", considering variables like "is this a new-tab UI vs. regular UI?" and "is the UI a pinned or unpinned tab?". And I think the behavior that makes the most sense (to me, anyway) is:
Did that help or did I just confuse things further? 😆 |
Changes the manifest.json so that the extension changes the new tab page. The user can use a drop down in the settings to go back to the default new tab page. Addresses #93