mirror of
https://github.com/Azure/cosmos-explorer.git
synced 2025-12-20 09:20:16 +00:00
Migration Expand/Collapse Resource Tree to React (#815)
Co-authored-by: Steve Faulkner <southpolesteve@gmail.com>
This commit is contained in:
committed by
GitHub
parent
e7e15c54b3
commit
1bcb4246f6
@@ -53,7 +53,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"isAccountReady": [Function],
|
||||
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
||||
"isHostedDataExplorerEnabled": [Function],
|
||||
"isLeftPaneExpanded": [Function],
|
||||
"isNotebookEnabled": [Function],
|
||||
"isNotebooksEnabledForAccount": [Function],
|
||||
"isResourceTokenCollectionNodeSelected": [Function],
|
||||
@@ -111,7 +110,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"activeTab": [Function],
|
||||
"openedTabs": [Function],
|
||||
},
|
||||
"toggleLeftPaneExpandedKeyPress": [Function],
|
||||
},
|
||||
"databaseId": "test",
|
||||
"defaultTtl": [Function],
|
||||
@@ -158,7 +156,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"isAccountReady": [Function],
|
||||
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
||||
"isHostedDataExplorerEnabled": [Function],
|
||||
"isLeftPaneExpanded": [Function],
|
||||
"isNotebookEnabled": [Function],
|
||||
"isNotebooksEnabledForAccount": [Function],
|
||||
"isResourceTokenCollectionNodeSelected": [Function],
|
||||
@@ -216,7 +213,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"activeTab": [Function],
|
||||
"openedTabs": [Function],
|
||||
},
|
||||
"toggleLeftPaneExpandedKeyPress": [Function],
|
||||
}
|
||||
}
|
||||
isAutoPilotSelected={false}
|
||||
@@ -276,7 +272,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"isAccountReady": [Function],
|
||||
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
||||
"isHostedDataExplorerEnabled": [Function],
|
||||
"isLeftPaneExpanded": [Function],
|
||||
"isNotebookEnabled": [Function],
|
||||
"isNotebooksEnabledForAccount": [Function],
|
||||
"isResourceTokenCollectionNodeSelected": [Function],
|
||||
@@ -334,7 +329,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"activeTab": [Function],
|
||||
"openedTabs": [Function],
|
||||
},
|
||||
"toggleLeftPaneExpandedKeyPress": [Function],
|
||||
},
|
||||
"databaseId": "test",
|
||||
"defaultTtl": [Function],
|
||||
@@ -381,7 +375,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"isAccountReady": [Function],
|
||||
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
||||
"isHostedDataExplorerEnabled": [Function],
|
||||
"isLeftPaneExpanded": [Function],
|
||||
"isNotebookEnabled": [Function],
|
||||
"isNotebooksEnabledForAccount": [Function],
|
||||
"isResourceTokenCollectionNodeSelected": [Function],
|
||||
@@ -439,7 +432,6 @@ exports[`SettingsComponent renders 1`] = `
|
||||
"activeTab": [Function],
|
||||
"openedTabs": [Function],
|
||||
},
|
||||
"toggleLeftPaneExpandedKeyPress": [Function],
|
||||
}
|
||||
}
|
||||
geospatialConfigType="Geometry"
|
||||
|
||||
@@ -114,7 +114,6 @@ export default class Explorer {
|
||||
public databases: ko.ObservableArray<ViewModels.Database>;
|
||||
public selectedDatabaseId: ko.Computed<string>;
|
||||
public selectedCollectionId: ko.Computed<string>;
|
||||
public isLeftPaneExpanded: ko.Observable<boolean>;
|
||||
public selectedNode: ko.Observable<ViewModels.TreeNode>;
|
||||
private resourceTree: ResourceTreeAdapter;
|
||||
|
||||
@@ -238,7 +237,6 @@ export default class Explorer {
|
||||
}
|
||||
return true;
|
||||
});
|
||||
this.isLeftPaneExpanded = ko.observable<boolean>(true);
|
||||
this.selectedNode = ko.observable<ViewModels.TreeNode>();
|
||||
this.selectedNode.subscribe((nodeSelected: ViewModels.TreeNode) => {
|
||||
// Make sure switching tabs restores tabs display
|
||||
@@ -493,16 +491,8 @@ export default class Explorer {
|
||||
this.setIsNotificationConsoleExpanded(true);
|
||||
}
|
||||
|
||||
public toggleLeftPaneExpanded() {
|
||||
this.isLeftPaneExpanded(!this.isLeftPaneExpanded());
|
||||
|
||||
if (this.isLeftPaneExpanded()) {
|
||||
document.getElementById("expandToggleLeftPaneButton").focus();
|
||||
this.splitter.expandLeft();
|
||||
} else {
|
||||
document.getElementById("collapseToggleLeftPaneButton").focus();
|
||||
this.splitter.collapseLeft();
|
||||
}
|
||||
public collapseConsole(): void {
|
||||
this.setIsNotificationConsoleExpanded(false);
|
||||
}
|
||||
|
||||
public refreshDatabaseForResourceToken(): Q.Promise<any> {
|
||||
@@ -621,14 +611,6 @@ export default class Explorer {
|
||||
this.refreshNotebookList();
|
||||
};
|
||||
|
||||
public toggleLeftPaneExpandedKeyPress = (source: any, event: KeyboardEvent): boolean => {
|
||||
if (event.keyCode === Constants.KeyCodes.Space || event.keyCode === Constants.KeyCodes.Enter) {
|
||||
this.toggleLeftPaneExpanded();
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
};
|
||||
|
||||
// Facade
|
||||
public provideFeedbackEmail = () => {
|
||||
window.open(Constants.Urls.feedbackEmail, "_blank");
|
||||
|
||||
@@ -42,7 +42,6 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
|
||||
"isAccountReady": [Function],
|
||||
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
||||
"isHostedDataExplorerEnabled": [Function],
|
||||
"isLeftPaneExpanded": [Function],
|
||||
"isNotebookEnabled": [Function],
|
||||
"isNotebooksEnabledForAccount": [Function],
|
||||
"isResourceTokenCollectionNodeSelected": [Function],
|
||||
@@ -100,7 +99,6 @@ exports[`GitHub Repos Panel should render Default properly 1`] = `
|
||||
"activeTab": [Function],
|
||||
"openedTabs": [Function],
|
||||
},
|
||||
"toggleLeftPaneExpandedKeyPress": [Function],
|
||||
},
|
||||
"getRepo": [Function],
|
||||
"pinRepo": [Function],
|
||||
|
||||
@@ -32,7 +32,6 @@ exports[`StringInput Pane should render Create new directory properly 1`] = `
|
||||
"isAccountReady": [Function],
|
||||
"isFixedCollectionWithSharedThroughputSupported": [Function],
|
||||
"isHostedDataExplorerEnabled": [Function],
|
||||
"isLeftPaneExpanded": [Function],
|
||||
"isNotebookEnabled": [Function],
|
||||
"isNotebooksEnabledForAccount": [Function],
|
||||
"isResourceTokenCollectionNodeSelected": [Function],
|
||||
@@ -90,7 +89,6 @@ exports[`StringInput Pane should render Create new directory properly 1`] = `
|
||||
"activeTab": [Function],
|
||||
"openedTabs": [Function],
|
||||
},
|
||||
"toggleLeftPaneExpandedKeyPress": [Function],
|
||||
}
|
||||
}
|
||||
inProgressMessage="Creating directory "
|
||||
|
||||
@@ -32,7 +32,6 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database
|
||||
"isHostedDataExplorerEnabled": [Function],
|
||||
"isLastCollection": [Function],
|
||||
"isLastNonEmptyDatabase": [Function],
|
||||
"isLeftPaneExpanded": [Function],
|
||||
"isNotebookEnabled": [Function],
|
||||
"isNotebooksEnabledForAccount": [Function],
|
||||
"isResourceTokenCollectionNodeSelected": [Function],
|
||||
@@ -92,7 +91,6 @@ exports[`Delete Database Confirmation Pane submit() Should call delete database
|
||||
"activeTab": [Function],
|
||||
"openedTabs": [Function],
|
||||
},
|
||||
"toggleLeftPaneExpandedKeyPress": [Function],
|
||||
}
|
||||
}
|
||||
openNotificationConsole={[Function]}
|
||||
|
||||
Reference in New Issue
Block a user