8000 Proposal: Add tabGroups.tabGroup.shared by dpenning · Pull Request #761 · w3c/webextensions · GitHub
[go: up one dir, main page]

Skip to content

Conversation

dpenning
Copy link
@dpenning dpenning commented Feb 4, 2025

proposal introducing shared state. see issue #749

Copy link
Member
@oliverdunk oliverdunk left a comment

Choose a reason for hiding this comment

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

I left a few comments, but this largely matches the issue which we are all supportive of. Thanks for opening this.

dpenning and others added 4 commits February 10, 2025 09:19
Co-authored-by: Timothy Hatcher <timothy@hatcher.name>
Copy link
Member
@Rob--W Rob--W left a comment

Choose a reason for hiding this comment

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

That which has been written looks good, with minor editorial suggestions applied.

During the meeting where this proposal was discussed, I said that it looks good on the basis that it is just exposing information, and not managing groups (see meeting notes quoted below). Assuming that it is still read-only, this proposal looks good. If in the meantime you have added support for updating shared state, then I'd like to see some more details on that in the proposal.

[Issue 749](https://github.com/w3c/webextensions/issues/749): Proposal: Support a shared state for tab groups
* [oliver] We are working on a Chrome feature where users are able to share a tab group. Changes to a tab group will be reflected in tab groups of those with whom the tab group is shared.
* [timothy] No objections from my part.
* [simeon] This proposal introduces a `shared` boolean. Is there any intention/desire to allow extensions to be involved in sharing the tab group?
* [oliver] Not aware of any; I know that we had (temporary) restrictions in the initial implementation, e.g. to prevent extensions from triggering many changes that the system did not account for.
* [krzysztof] Is there a need for a permission? E.g. to counter concerns that a user's tab group is leaked to another user.
* [rob] This request here just exposes the information about whether the tabgroup is shared, there is no API to manage tab groups. Looks good to me.
* [oliver] Exactly. Even without this proposal, the tab group is known, but extensions would not know whether it is shared.
* [krzysztof] And privacy-aware extensions can choose to ignore shared tab groups.

### Existing Workarounds

Extensions developers currently need to rely on error handling in order to handle issues that arise from restrictions on "saved and synced" groups. These will also apply, and more restrictions may be
put in place for "shared" groups
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
put in place for "shared" groups
put in place for "shared" groups.


### Open Web API

the tabGroups functionality is purely a browser feature, which is why we only expose this information through the extensions API
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
the tabGroups functionality is purely a browser feature, which is why we only expose this information through the extensions API
The tabGroups functionality is purely a browser feature, which is why we only expose this information through the extensions API.


## Implementation Notes

Other browser vendors have similar implementations of groups, however im not currently aware of any implementation of this shared state exposure for extensions.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
Other browser vendors have similar implementations of groups, however im not currently aware of any implementation of this shared state exposure for extensions.
Other browser vendors have similar implementations of groups, however I'm not currently aware of any implementation of this shared state exposure for extensions.

the `queryInfo` parameter will accept a new field `shared bool optional`
When provided the tab groups query will filter based on the shared states of the group.
[browser.tabGroups.onUpdated](https://developer.chrome.com/docs/extensions/reference/api/tabGroups#event-onUpdated)
a method that is currently fired when a group is udated, will also fire when the group's shared state changes.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
a method that is currently fired when a group is udated, will also fire when the group's shared state changes.
an event that is currently fired when a group is updated, will also fire when the group's shared state changes.

a method that is currently fired when a group is udated, will also fire when the group's shared state changes.
### Behavior

Browsers may place browser-specific restrictions on shared groups for security and privacy purposes. This is not limited to the `tabGroups` API and could extend to `browser.tabs` and other related API surfaces. The restriction would result in an error that "the action can not be performed due to the object being in a shared state." or a similar error message.
Copy link
Member

Choose a reason for hiding this comment

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

Is this vaguely phrased description meant to rule out the modification of shared state via tabGroups.update? And maybe even preventing the move of groups from tabGroups.move? It is open for interpretation right now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants
0