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

New API: Open Shortcut Setting #310

Open
hanguokai opened this issue Oct 28, 2022 · 7 comments
Open

New API: Open Shortcut Setting #310

hanguokai opened this issue Oct 28, 2022 · 7 comments
Labels
proposal Proposal for a change or new feature supportive: chrome Supportive from Chrome supportive: firefox Supportive from Firefox supportive: safari Supportive from Safari

Comments

@hanguokai
Copy link
Member

The Problem

Take Chrome as an example, the shortcut page is chrome://extensions/shortcuts, which centralizes all extensions' shortcuts settings. We need to let users locate to current extension (not other extensions) in this page. Assuming that the user has dozens of extensions installed, if we cannot directly locate to current extension, then the user will spend the effort to find this extension first. Assuming that if the extension supports 30 shortcuts, it is also necessary to directly locate to a specified shortcut (not other shortcuts) in this extension.

The Proposal

/**
 * Open the browser extension shortcut page and locate to (scroll to):
 * 1. if no name parameter, locate to the beginning of this extension.
 * 2. if specify the name, locate to the specified shortcut of this extension.
 * The name parameter is `Command.name` of a shortcut.
 */
browser.commands.openShortcut( name ?: string );
@hanguokai hanguokai added agenda Discuss in future meetings proposal Proposal for a change or new feature labels Oct 28, 2022
@Rob--W
Copy link
Member

Rob--W commented Oct 28, 2022

Originally reported at #300, but split off it.

I posted the following reply at #300 (comment) :

There is already precedent for opening the extension settings page via runtime.openOptionsPage. Something similar for shortcuts (provided that the browser supports it) is reasonable. FYI Firefox supports the commands.update API to update a shortcut, but it cannot do the kind of conflict resolution that is available at the shortcuts UI page: https://bugzilla.mozilla.org/show_bug.cgi?id=1654403

@hanguokai
Copy link
Member Author

In addition, for open shortcuts, not just to open a page, but to navigate to a specific shortcut in that page. The use case is user click the edit button from an extension page, then go to there for this shortcut.

@Rob--W
Copy link
Member

Rob--W commented Aug 5, 2024

There was also a feature request for a method to open the shortcuts management page from an extension, at https://bugzilla.mozilla.org/show_bug.cgi?id=1538451 . Someone has provided a patch there, so I'd like to discuss the shape of the API at the next meeting.

@oliverdunk
Copy link
Member

We had a very similar issue back in 2021 that we may want to close given this updated proposal: #126

@xeenon xeenon added the supportive: safari Supportive from Safari label Aug 15, 2024
@zombie zombie added the supportive: firefox Supportive from Firefox label Aug 15, 2024
@zombie
Copy link
Collaborator

zombie commented Aug 15, 2024

Bikeshed: openShortcutsConfig

@Rob--W Rob--W added the follow-up: chrome Needs a response from a Chrome representative label Aug 15, 2024
@oliverdunk
Copy link
Member

Chrome is supportive of this capability. We would like to have some further discussions about the namespace (runtime vs commands) before making a decision, since we're not sure what our preference is yet.

@oliverdunk oliverdunk added supportive: chrome Supportive from Chrome and removed follow-up: chrome Needs a response from a Chrome representative labels Aug 16, 2024
@mdmower
Copy link

mdmower commented Aug 18, 2024

I'm in favor of runtime as I don't see the need to disallow this feature if an extension doesn't provide commands of its own.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
proposal Proposal for a change or new feature supportive: chrome Supportive from Chrome supportive: firefox Supportive from Firefox supportive: safari Supportive from Safari
Projects
None yet
Development

No branches or pull requests

7 participants