tab-search
tab-search copied to clipboard
Option to visually center the tab search dialog
I'm a fan of Vivaldi's "Quick Commands" presentation where the dialog is vertically and horizontally centered over the current tab, as opposed to appearing in the top right corner. Something like that for TabSearch would be great.
Something like this, right?
Yes, that's right.
I've also noticed that currently the toolbar icon is required for the shortcut to work. I'm guessing because it needs somewhere to visually anchor to. So a floating panel could also be the default behaviour when the icon is hidden?
The toolbar icon (aka browser action) is currently wired to open a WebExtension popup, which provides convenient access to the browser apis (namely tabs). The main downside of this popup approach is that we lose control over where the popup appears, it's always dependent on position of the toolbar icon.
In order to get the floating panel working, we'd have to switch to an approach that lets us override the active tab's DOM and in overlay the TabSearch interface there. In order to go with this approach we'd have to switch from the popup approach to one that uses a background script (which has access to all WebExtension APIs but no access to the DOM) to communicate with a content script that can handle injecting new DOM elements to a webpage.
I think what I'll do is set up a settings page where people can check whether they want the popup or the visually centered popup when it's implemented. If both were active at the same time they'd have to have separate keyboard shortcuts, which I don't want (for simplicity's sake).
@reblws Any updates on this?