Move restore flag behind feature flag. Whitelist restorable tabs in for Fabric. Restore e2e tests.

This commit is contained in:
Laurent Nguyen
2024-11-14 15:31:18 +01:00
parent 846cc105d7
commit 35e997a97b
4 changed files with 20 additions and 5 deletions
+4 -1
View File
@@ -1166,7 +1166,10 @@ export default class Explorer {
}
await this.refreshSampleData();
this.restoreOpenTabs();
if (userContext.features.restoreTabs) {
this.restoreOpenTabs();
}
}
public async configureCopilot(): Promise<void> {
+14
View File
@@ -1,4 +1,5 @@
// TODO convert this file to an action registry in order to have actions and their handlers be more tightly coupled.
import { configContext, Platform } from "ConfigContext";
import { useDatabases } from "Explorer/useDatabases";
import React from "react";
import { ActionContracts } from "../../Contracts/ExplorerContracts";
@@ -56,6 +57,19 @@ function openCollectionTab(
continue;
}
if (
configContext.platform === Platform.Fabric &&
!(
// whitelist the tab kinds that are allowed to be opened in Fabric
(
action.tabKind === ActionContracts.TabKind.SQLDocuments ||
action.tabKind === ActionContracts.TabKind.SQLQuery
)
)
) {
continue;
}
//expand database first if not expanded to load the collections
if (!database.isDatabaseExpanded?.()) {
database.expandDatabase?.();