Issue 45524 Expanded toolbar button details in your second extension tutorial - #45583
Conversation
|
Preview URLs (1 page) External URLs (4)URL:
|
Rob--W
left a comment
There was a problem hiding this comment.
The added text is quite verbose and at the same time not providing context.
For example, in the part about the default_popup, there is:
If you don't supply this property, Firefox dispatches a click event to your extension when the user clicks the button.
This API behavior is cross-browser, I don't know why Firefox is singled out here.
Moreover "a click event" is vague; linking to action.onClicked would make more sense.
Could you review your diff, and check for conciseness without loss of clarity?
| ### The toolbar button | ||
|
|
||
| The toolbar button also needs an icon, and manifest.json specifies that it is at "icons/beasts-32.png". | ||
| The [`action`](/en-US/docs/Mozilla/Add-ons/WebExtensions/manifest.json/action) key defines the extension's toolbar button, which is the extension's main user interface. All the key's properties are optional. This example uses four of them: |
There was a problem hiding this comment.
"defines the extension's main user interface" is overstating what the button is. Could you rephrase this new sentence?
Description
This change expands the tool power button section to provide a more detailed explanation of the value set in the action key along with links to the two icons used.
Motivation
Primarily motivated by a desire to address concerns that links weren't provided for the icons used in the key, but also to provide more complete information on the key's purpose and behavior.
Additional details
I was curious as to why we were defining both the default icon and theme icons. I did some testing, and as far as I can tell, once you define the theme icons, the default icon is never used. An AI review of the source code says it should occur when the "System theme (default-theme@mozilla.org) [is set and], OS in light mode" but I couldn't reproduce this. But I'm not sure whether that's because I simply didn't have the correct settings. If the theme icons are always used instead of the default, we don't document this in the action key.
Related issues and pull requests
Fixes #45524