-
Notifications
You must be signed in to change notification settings - Fork 22.6k
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
Bug-1538451 documentation for commands.openShortcutSetting
#38234
Bug-1538451 documentation for commands.openShortcutSetting
#38234
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rephrased documentation to make it more generic, and added browser-specific guidance.
files/en-us/mozilla/add-ons/webextensions/api/commands/openshortcutsettings/index.md
Outdated
Show resolved
Hide resolved
|
||
In Firefox, this function opens the [Manage Extension Shortcuts](https://support.mozilla.org/en-US/kb/manage-extension-shortcuts-firefox) view. | ||
|
||
Chrome doesn't support this function yet. In Chrome, `chrome://extensions/shortcuts` can be opened using the `tabs.create` function. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just did a quick search and it appears that Safari does not allow users to change keyboard shortcuts for web extensions. (Corroborated in the commands
compatibility note for Safari). Should we call this out here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, there's probably a broader issue here in that we don't call out in the API overview that only Firefox supports updating and resetting the shortcut keys programmatically. At the same time it's probably also worth pointing out that Safari doesn't provide for changing them at all. I'll update the PR.
files/en-us/mozilla/add-ons/webextensions/api/commands/openshortcutsettings/index.md
Outdated
Show resolved
Hide resolved
Co-authored-by: Simeon Vincent <[email protected]>
… asynchronous function notes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approved provided that the feedback below is addressed.
@@ -9,6 +9,8 @@ browser-compat: webextensions.api.commands | |||
|
|||
Listen for the user executing commands that you have registered using the [`commands` manifest.json key](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/commands). | |||
|
|||
In Firefox, this API provides features to update the shortcut key settings. In Chrome, the user can update shortcut key settings through the extension options UI. Safari doesn't support user modification of extension shortcut keys. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sentences about Chrome and Safari are not about API behavior, but browser UI. I'm not sure if that text belongs here. If we drop that, then the only remaining sentence is about Firefox's API support for updating shortcuts.
If you'd like to emphasize the update behavior and browser UI, I suggest adding a brief note that connects the relevant APIs, along with the existing note at https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/commands#updating_shortcuts
Here is an example, rephrase as needed:
In Firefox, this API provides features to update the shortcut key settings. In Chrome, the user can update shortcut key settings through the extension options UI. Safari doesn't support user modification of extension shortcut keys. | |
Shortcuts can be [updated](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/commands#updating_shortcuts) through {{WebExtAPIRef("commands.update")}}, or by the user via browser UI (see {{WebExtAPIRef("commands.openShortcutSettings")}}). |
@@ -9,6 +9,8 @@ browser-compat: webextensions.api.commands | |||
|
|||
Listen for the user executing commands that you have registered using the [`commands` manifest.json key](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/commands). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also reference the new method from the existing commands
documentation on updating shortcuts at https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/commands#updating_shortcuts
E.g. by appending a note,
To open this browser UI, use {{WebExtAPIRef("commands.openShortcutSettings")}}.
You can also put Safari-specific notes here, as a follow-up to #38234 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No additional comments beyond what @Rob--W identified.
This pull request has merge conflicts that must be resolved before it can be merged. |
…/github.com/rebloor/content into Bug-1538451-add-commands.openShortcutSettings
Description
Addresses the dev-docs-needed requirements of Bug 1538451 Make extension shortcut management page accessible by a link/URL for a WebExtension by adding documentation for
commands.openShortcutSetting
along with accompanying release note.Related issues and pull requests
BCD for
commands.openShortcutSetting
added in mdn/browser-compat-data#25944