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

"side_panel":{} declaration should automatically grant sidePanel permission #631

Open
tophf opened this issue Jun 6, 2024 · 1 comment
Labels
needs-triage: chrome Chrome needs to assess this issue for the first time supportive: safari Supportive from Safari

Comments

@tophf
Copy link

tophf commented Jun 6, 2024

As observed in Chrome's implementation of ManifestV3, we have to add "sidePanel" to "permissions" even if we already have "side_panel": {} in manifest.json in order to use chrome.sidePanel API in the extension scripts.

This is not consistent with the conceptually identical/similar chrome.browserAction and chrome.action, which are automatically allowed when manifest.json has the corresponding section e.g. "browser_action":{} or "action":{}.

Separation is only necessary when there are two permissions e.g. "declarative_net_request":{...} has "declarativeNetRequest" and "declarativeNetRequestWithHostAccess".


Additionally, to help new developers who haven't looked at least at the beginning of the documentation page where the requirements are described and examples are demonstrated, the error message should be clarified for all such API (action, sidePanel, commands):

Cannot read properties of undefined (reading 'open'). Make sure to add "side_panel":{} to manifest.json.

@github-actions github-actions bot added needs-triage: chrome Chrome needs to assess this issue for the first time needs-triage: firefox Firefox needs to assess this issue for the first time needs-triage: safari Safari needs to assess this issue for the first time labels Jun 6, 2024
@Rob--W Rob--W removed the needs-triage: firefox Firefox needs to assess this issue for the first time label Jun 6, 2024
@tophf
Copy link
Author

tophf commented Jun 6, 2024

[solomon] The issue calls out the action API as an example, but that is not really comparable since it doesn't have a permission.

The point of comparison is to show that sidePanel is an outlier that doesn't follow the established pattern.

@xeenon xeenon added supportive: safari Supportive from Safari and removed needs-triage: safari Safari needs to assess this issue for the first time labels Sep 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-triage: chrome Chrome needs to assess this issue for the first time supportive: safari Supportive from Safari
Projects
None yet
Development

No branches or pull requests

3 participants