Release 150 tab split view functionality#43589
Conversation
| }); | ||
| ``` | ||
|
|
||
| ## Working with tab groups and split views |
There was a problem hiding this comment.
Tab groups and split views are distinct features. Please list them separately.
There was a problem hiding this comment.
Done and links updated
| > Features to work with a tab group are provided in {{WebExtAPIRef("tabGroups")}}. | ||
|
|
||
| > [!NOTE] | ||
| > APIs to enable the creation and removal of split views (without moving or removing the tabs) are being developed under ([Firefox bug 2016928](https://bugzil.la/2016928)). |
There was a problem hiding this comment.
Let's use w3c/webextensions#967 as a reference instead. This is a cross-browser API design effort.
| ## Changes for add-on developers | ||
|
|
||
| - The behavior of {{WebExtAPIRef("tabs.move")}} is updated for split views so that: | ||
| - The order of tabs in a split view can be swapped. |
There was a problem hiding this comment.
Please include bug numbers for reference, since we usually do so.
There was a problem hiding this comment.
How did I miss those! Added
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Rob Wu <[email protected]>
| You can only move tabs to and from windows whose {{WebExtAPIRef('windows.WindowType', 'WindowType')}} is `"normal"`. | ||
|
|
||
| When the call moves a tab or tabs in a split view, Firefox moves the tabs in the split view together to preserve the split view. In Chrome, moving a tab away from the other tab in a split view removes the split view. | ||
| In Chrome, moving a tab away from the other tab in a split view removes the split view. This behavior may change in a future release. |
There was a problem hiding this comment.
Let's move this to a note below so that we introduce the split view behavior and only after that clarify that Chrome's behavior differs. I image that when the implementation changes that we want to document the standard behavior first and then have a note about older versions.
|
|
||
| ## Working with tab groups | ||
|
|
||
| Tab functionality enables users to create [group tabs](https://support.mozilla.org/en-US/kb/tab-groups). |
There was a problem hiding this comment.
I asked for a "split views" article because we don't have a better place to offer an overview of its capability and describe it.
For tab groups, the tabGroups API reference serves that purpose, and is linked from various places such as https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/Tab#groupid
Can we use that as the canonical place for the description of what tab groups are instead of linking to SUMO here (that SUMO article is already linked from tabGroups MDN page).
|
|
||
| Tab functionality lets display two tabs side-by-side in a [split view](https://support.mozilla.org/en-US/kb/split-view-firefox). | ||
|
|
||
| Various tab methods enable you to work with the content of groups and split views, including: |
There was a problem hiding this comment.
Please add text offering the following overview of relevant details. I am asking for this so we have one place where a dev can learn at once what they should do if they want to work with split views:
- split view consists of exactly two adjacent tabs
- when an individual tab of a split is moved, the other tab in the split moves with it to preserve the split (the emphasis here is to show that conceptually the pair of tabs in a split view should be regarded as one unit). The moved tab that moves along can be observed with tabs.onMoved.
- when a tab is removed, the other tab in the split remains but is no longer part of a split view
- given a tab, whether it is a member of a split view can be seen through its splitViewId property (https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/tabs/Tab#splitviewid ). Split view membership changes can be observed through tabs.onUpdated
Co-authored-by: Rob Wu <[email protected]>
- removing working with tab groups from working with the tabs API article and adding additional details to the tabGroups API overview. - adding additional details to the working with split tabs in the working with the tabs API article - adding links to the working with split tabs section in the working with the tabs ID article - rewording the information about moving a tab in a split view
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
|
@Rob--W your comment should all be addressed |
Description
This PR addresses the dev-docs-needed requirements of:
In addition, it adds a section summarizing the features for working with groups and split views in the working with the tab API article.