Update tabs model to utilize the new API shape (#142668)

* Change shape of the tabs API

* Disable tab tests for now

* Add an onDidChangeTabGroup event

* Optimize for group activate

* Update events to no longer be an array

* Further tab optimization
This commit is contained in:
Logan Ramos
2022-02-10 15:09:11 -05:00
committed by GitHub
parent f3153f1466
commit ec9df1d972
12 changed files with 316 additions and 260 deletions

View File

@@ -615,6 +615,16 @@ export interface MainThreadEditorTabsShape extends IDisposable {
$closeTab(tab: IEditorTabDto): Promise<void>;
}
export interface IEditorTabGroupDto {
isActive: boolean;
viewColumn: EditorGroupColumn;
// Decided not to go with simple index here due to opening and closing causing index shifts
// This allows us to patch the model without having to do full rebuilds
activeTab: IEditorTabDto | undefined;
tabs: IEditorTabDto[];
groupId: number;
}
export interface IEditorTabDto {
viewColumn: EditorGroupColumn;
label: string;
@@ -625,7 +635,7 @@ export interface IEditorTabDto {
}
export interface IExtHostEditorTabsShape {
$acceptEditorTabs(tabs: IEditorTabDto[]): void;
$acceptEditorTabModel(tabGroups: IEditorTabGroupDto[]): void;
}
//#endregion