pixiebrix / pixiebrix-extension

PixieBrix browser extension
https://www.pixiebrix.com
GNU Affero General Public License v3.0
83 stars 22 forks source link

Add quick bar extension point #1866

Closed twschiller closed 2 years ago

twschiller commented 2 years ago

Context

Libraries

Related

Considerations

Related

twschiller commented 2 years ago

@fregante any idea if adding a hotkey to the manifest would result in users having to re-active the PixieBrix extension?

fregante commented 2 years ago

No it would not, it's not an extra permission. You can install GhostText to see the exact installation dialog of an extension with hotkeys (in short: it doesn't mention them)

fregante commented 2 years ago

I suppose this is mine now and I have to look into the "not implemented yet" list here: https://github.com/pixiebrix/pixiebrix-extension/pull/2095#issue-1076029135

Regarding the keyboard shortcuts

We don't need to use chrome.commands because:

Disadvantages of a custom keyboard shortcut implementation:

I suggest we have a single/global keyboard shortcut and that it's registered to the current browser rather than the extension/brick. I'll need someone to:

https://user-images.githubusercontent.com/1402241/145687337-62379c81-87e8-47ee-a94a-2d6a7317c167.mov

I didn't see any ready-made components for this, but maybe I didn't look well. Ideally what we use to capture this would be compatible with the library that registers the actual shortcut in the content script.

This could also be the base for:

twschiller commented 2 years ago

Apologies for the delay, I think I somehow missed your comment. I opened a couple tickets related to the registering/configuring the shortcut:

We don't need to use chrome.commands because:

Correct me if I'm wrong, but the main advantage of using the commands API is that triggering the Chrome command grants activeTab for the page like the context menu? This would allow you to use the quick bar on any page without PixieBrix having to request access to all pages?

I've added some notes/links on the https://github.com/pixiebrix/pixiebrix-extension/issues/2188 issue

I suggest we have a single/global keyboard shortcut and that it's registered to the current browser rather than the extension/brick

I agree that we want a single shortcut. I don't think it's urgent to allow the user to configure what the shortcut is yet. I've created a ticket for that customization here: https://github.com/pixiebrix/pixiebrix-extension/issues/2189. As you mention, I think it depends on if/how we use the commands API?

fregante commented 2 years ago

Anything else to do here? I think we have specific issues for everything. I just opened: