Skip to content

Issue 45524 Expanded toolbar button details in your second extension tutorial - #45583

Open
rebloor wants to merge 1 commit into
mdn:mainfrom
rebloor:Issue-45524-action-manifest-key-to-your-second-extension-guide
Open

Issue 45524 Expanded toolbar button details in your second extension tutorial#45583
rebloor wants to merge 1 commit into
mdn:mainfrom
rebloor:Issue-45524-action-manifest-key-to-your-second-extension-guide

Conversation

@rebloor

@rebloor rebloor commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

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

@rebloor
rebloor requested review from Rob--W and bacharakis September 8, 2026 23:34
@rebloor rebloor self-assigned this Sep 8, 2026
@rebloor rebloor added the Content:WebExt WebExtensions docs label Sep 8, 2026
@rebloor
rebloor requested a review from a team as a code owner September 8, 2026 23:34
@github-actions github-actions Bot added the size/s [PR only] 6-50 LoC changed label Sep 8, 2026
@github-actions

github-actions Bot commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Preview URLs (1 page)

External URLs (4)

URL: /en-US/docs/Mozilla/Add-ons/WebExtensions/Your_second_WebExtension
Title: Your second extension

@Rob--W Rob--W left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"defines the extension's main user interface" is overstating what the button is. Could you rephrase this new sentence?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:WebExt WebExtensions docs size/s [PR only] 6-50 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add details about the action manifest key to your second extension guide

3 participants