-
Notifications
You must be signed in to change notification settings - Fork 23.2k
Release 150 tab split view functionality #43589
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
base: main
Are you sure you want to change the base?
Changes from all commits
2863217
6565561
9328cb8
8743634
17dad6f
f4628ff
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,15 +7,16 @@ sidebar: addonsidebar | |
|
|
||
| Tabs let a user open several web pages in their browser window and then switch between those web pages. With the Tabs API, you can work with and manipulate these tabs to create utilities that provide users with new ways to work with tabs or to deliver the features of your extension. | ||
|
|
||
| In this how-to article we'll look at: | ||
| This how-to article look at: | ||
|
|
||
| - Permissions needed to use the Tabs API. | ||
| - Discovering more about tabs and their properties using {{WebExtAPIRef("tabs.query")}}. | ||
| - Creating, duplicating, moving, updating, reloading, and removing tabs. | ||
| - Manipulating a tab's zoom level. | ||
| - Manipulating a tab's CSS. | ||
| - Manipulating tab groups and split views. | ||
|
|
||
| We then conclude by looking at some other, miscellaneous features offered by the API. | ||
| The article concludes by looking at some other, miscellaneous features offered by the API. | ||
|
|
||
| > [!NOTE] | ||
| > There are some Tab API features covered elsewhere. These are the methods you can use to manipulate tab content with scripts ({{WebExtAPIRef("tabs.connect")}}, {{WebExtAPIRef("tabs.sendMessage")}}, and {{WebExtAPIRef("tabs.executeScript")}}). If you want more information on these methods, see the Concepts article [Content scripts](/en-US/docs/Mozilla/Add-ons/WebExtensions/Content_scripts) and the how-to guide [Modify a web page](/en-US/docs/Mozilla/Add-ons/WebExtensions/Modify_a_web_page). | ||
|
|
@@ -553,6 +554,31 @@ Let's walk through how it's set up. | |
| }); | ||
| ``` | ||
|
|
||
| ## Working with tab groups | ||
|
|
||
| Tab functionality enables users to create [group tabs](https://support.mozilla.org/en-US/kb/tab-groups). | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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). |
||
|
|
||
| Various tab methods enable you to work with the content of groups, including: | ||
|
|
||
| - {{WebExtAPIRef("tabs.group")}} and {{WebExtAPIRef("tabs.ungroup")}} to create or remove groups. | ||
| - {{WebExtAPIRef("tabs.move")}} to move tabs within, into, or out of a group. | ||
| - {{WebExtAPIRef("tabs.remove")}} to close tabs in a group, and close the group if the tab was the last one in the group | ||
|
|
||
| > [!NOTE] | ||
| > Features to work with a tab group are provided in {{WebExtAPIRef("tabGroups")}}. | ||
|
|
||
| ## Working with tab split views | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As noted in the comment above I asked for a split view section to have a canonical place to document the split view concept. Can we link here instead of to SUMO in other places in the doc? Basically #43576 but then linking here instead of SUMO. |
||
|
|
||
| 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: | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 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:
|
||
|
|
||
| - {{WebExtAPIRef("tabs.move")}} to move tabs within or out of a split view. | ||
| - {{WebExtAPIRef("tabs.remove")}} to close a tab in a split view, which closes the split view. | ||
|
|
||
| > [!NOTE] | ||
| > APIs to enable the creation and removal of split views (without moving or removing the tabs) are being developed under [issue #967](https://github.com/w3c/webextensions/issues/967) of W3C's WebExtensions Community Group (WECG). | ||
|
|
||
| ## Some other interesting abilities | ||
|
|
||
| There are a couple of other Tabs API features that don't fit into one of the earlier sections: | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.