From 0494da4162a41094ed22fee255d543c611602e92 Mon Sep 17 00:00:00 2001 From: Steve Faulkner Date: Tue, 26 May 2020 13:53:41 -0500 Subject: [PATCH] Update to ADO 5ed9b2130da7f822153531489d802c28986f5d30 --- package-lock.json | 132 +- package.json | 2 +- src/Common/Constants.ts | 6 +- src/Common/DataAccessUtilityBase.ts | 4 +- src/Common/MongoProxyClient.test.ts | 32 +- src/Common/MongoProxyClient.ts | 9 +- src/Config.ts | 2 +- src/Contracts/DataModels.ts | 2 + src/Contracts/ViewModels.ts | 21 + ...DefaultDirectoryDropdownComponent.test.tsx | 10 +- .../Directory/DirectoryListComponent.tsx | 4 +- .../DirectoryListComponent.test.tsx.snap | 1153 ++++++++++------- .../Controls/GitHub/AddRepoComponent.tsx | 14 +- .../Controls/GitHub/GitHubReposComponent.tsx | 2 +- .../Controls/GitHub/ReposListComponent.tsx | 4 +- src/Explorer/Explorer.ts | 11 +- .../MeControlComponent.test.tsx.snap | 1 + .../NotebookContentProvider.ts | 2 +- .../Notebook/NotebookContentClient.ts | 18 +- src/Explorer/Notebook/NotebookUtil.test.ts | 49 + src/Explorer/Notebook/NotebookUtil.ts | 36 +- src/Explorer/OpenActionsStubs.ts | 2 + src/Explorer/Panes/AddCollectionPane.ts | 36 +- src/Explorer/Panes/AddDatabasePane.ts | 10 +- .../Panes/CassandraAddCollectionPane.ts | 14 +- src/Explorer/Panes/GitHubReposPane.ts | 5 +- src/Explorer/Tabs/DatabaseSettingsTab.ts | 11 +- src/Explorer/Tabs/QueryTab.ts | 2 - src/Explorer/Tabs/SettingsTab.html | 5 +- src/Explorer/Tree/ResourceTreeAdapter.tsx | 9 +- src/GitHub/GitHubClient.ts | 37 +- src/GitHub/GitHubContentProvider.test.ts | 12 +- src/GitHub/GitHubContentProvider.ts | 67 +- src/Shared/AddCollectionUtility.test.ts | 992 +------------- src/Shared/AddCollectionUtility.ts | 380 +----- src/Shared/AddDatabaseUtility.test.ts | 12 +- src/Shared/Constants.ts | 11 + src/Shared/Telemetry/TelemetryProcessor.ts | 48 +- src/Utils/GitHubUtils.test.ts | 66 +- src/Utils/GitHubUtils.ts | 64 +- src/Utils/JunoUtils.ts | 22 + tsconfig.strict.json | 109 +- 42 files changed, 1186 insertions(+), 2242 deletions(-) create mode 100644 src/Explorer/Notebook/NotebookUtil.test.ts diff --git a/package-lock.json b/package-lock.json index 393c7a8a4..2968a51c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13060,80 +13060,110 @@ "dev": true }, "office-ui-fabric-react": { - "version": "6.210.5", - "resolved": "https://registry.npmjs.org/office-ui-fabric-react/-/office-ui-fabric-react-6.210.5.tgz", - "integrity": "sha512-kq2nLG20qwxez5N8QdrEs5eFJwpKa/V1qemob9cqAUrioxR29GAlqAHRFSjg+U6UYEm6ypUBS0cF1235jwspWw==", + "version": "7.115.0", + "resolved": "https://registry.npmjs.org/office-ui-fabric-react/-/office-ui-fabric-react-7.115.0.tgz", + "integrity": "sha512-FZG5SM9ZHI+gTiJsW7RRpEVQReasCNni25BpsLY+sjvdn3jTpeXOYFXDmfV8yiUDetLvDBTf5O0b0intWCOCqw==", "requires": { - "@microsoft/load-themed-styles": "^1.7.13", - "@uifabric/foundation": "^0.8.3", - "@uifabric/icons": "^6.5.5", - "@uifabric/merge-styles": "^6.19.4", - "@uifabric/set-version": "^1.1.3", - "@uifabric/styling": "^6.50.7", - "@uifabric/utilities": "^6.45.1", - "prop-types": "^15.5.10", - "tslib": "^1.7.1" + "@fluentui/react-focus": "^7.11.7", + "@fluentui/react-icons": "^0.1.18", + "@microsoft/load-themed-styles": "^1.10.26", + "@uifabric/foundation": "^7.7.16", + "@uifabric/icons": "^7.3.42", + "@uifabric/merge-styles": "^7.14.0", + "@uifabric/react-hooks": "^7.3.7", + "@uifabric/set-version": "^7.0.12", + "@uifabric/styling": "^7.12.9", + "@uifabric/utilities": "^7.17.3", + "prop-types": "^15.7.2", + "tslib": "^1.10.0" }, "dependencies": { - "@uifabric/foundation": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/@uifabric/foundation/-/foundation-0.8.3.tgz", - "integrity": "sha512-r3WhRj7Out8QAOe50BGA36R8zgRPy0D0GNPuwFK9BB9oIidf91ycj7/miY8U0TZRZi5fB3Kg+dy/uxSDfgC6Og==", + "@fluentui/react-focus": { + "version": "7.11.7", + "resolved": "https://registry.npmjs.org/@fluentui/react-focus/-/react-focus-7.11.7.tgz", + "integrity": "sha512-EHPwScf8k4Rlzki6M7cWA09D80rZiN7E0tZmh6yoZVvdPY0AcrnUTLy0lWIVRk/1oAt7Ko4Yhss7aaYX7jqNXQ==", "requires": { - "@uifabric/set-version": "^1.1.3", - "@uifabric/styling": "^6.50.7", - "@uifabric/utilities": "^6.41.7", - "tslib": "^1.7.1" + "@fluentui/keyboard-key": "^0.2.0", + "@uifabric/merge-styles": "^7.14.0", + "@uifabric/set-version": "^7.0.12", + "@uifabric/styling": "^7.12.9", + "@uifabric/utilities": "^7.17.3", + "tslib": "^1.10.0" + } + }, + "@fluentui/react-icons": { + "version": "0.1.18", + "resolved": "https://registry.npmjs.org/@fluentui/react-icons/-/react-icons-0.1.18.tgz", + "integrity": "sha512-63u5sO568nI4ORgwewqKynB+M+NkGQys1F8EDkW/wYcF24uNuAQUID4JIBvIbB57M10YDDYHCqXYB8RTJy1Cww==", + "requires": { + "@uifabric/set-version": "^7.0.12", + "@uifabric/styling": "^7.12.9", + "@uifabric/utilities": "^7.17.3", + "tslib": "^1.10.0" + } + }, + "@uifabric/foundation": { + "version": "7.7.16", + "resolved": "https://registry.npmjs.org/@uifabric/foundation/-/foundation-7.7.16.tgz", + "integrity": "sha512-9ED+nyAmfBcLbL5LuVDoSSxGxexGs11fCsDyVoPoJ4Er2qmSIH30STe/+AwFHq3nEBD1ztiHDIVcKfLf4GT7VQ==", + "requires": { + "@uifabric/merge-styles": "^7.14.0", + "@uifabric/set-version": "^7.0.12", + "@uifabric/styling": "^7.12.9", + "@uifabric/utilities": "^7.17.3", + "tslib": "^1.10.0" } }, "@uifabric/icons": { - "version": "6.5.5", - "resolved": "https://registry.npmjs.org/@uifabric/icons/-/icons-6.5.5.tgz", - "integrity": "sha512-cGjzdpT0jzQ2RJvzlCVTrewaHCi4rb+ZNL2LWoceMi+5h196Y32qJwKMsc0ggR6u5CjMrzBiAxUFNppBSCutdA==", + "version": "7.3.42", + "resolved": "https://registry.npmjs.org/@uifabric/icons/-/icons-7.3.42.tgz", + "integrity": "sha512-RWGXdOBWaEjIqtOc4y/xwp3Cgc0gmU5ApBXw8AipjdwJyEPuV2UGjtk4URs0Iog42WoUxDfDKnRrH4dAjGV34g==", "requires": { - "@uifabric/set-version": "^1.1.3", - "@uifabric/styling": "^6.50.7", - "tslib": "^1.7.1" + "@uifabric/set-version": "^7.0.12", + "@uifabric/styling": "^7.12.9", + "tslib": "^1.10.0" } }, "@uifabric/merge-styles": { - "version": "6.19.4", - "resolved": "https://registry.npmjs.org/@uifabric/merge-styles/-/merge-styles-6.19.4.tgz", - "integrity": "sha512-bjQdDHxmRIZVPwL//MtErODhEfcRJ2y+zJXoIWNh3T8JfAepeRDdoJ/pGNnnyJxA/AHMtlWt0IgMaz150/nfAA==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@uifabric/merge-styles/-/merge-styles-7.14.0.tgz", + "integrity": "sha512-LR70l856QTVYfceUA1HtHws0iFUQI3pN1Z2fyH2M1RPeBA35NimpaGkEaNSPHsCAiJ09evVsG6JP7iTUItWHUQ==", "requires": { - "@uifabric/set-version": "^1.1.3", - "tslib": "^1.7.1" + "@uifabric/set-version": "^7.0.12", + "tslib": "^1.10.0" } }, - "@uifabric/set-version": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@uifabric/set-version/-/set-version-1.1.3.tgz", - "integrity": "sha512-IYpwVIuN7MJOeiWzZzr9AmFSvA5zc6gJn4fNHtEFIQnNB8WVWIcYrvx8Tbf7wWj9MvhdHYp70F054zZlHbL/Ag==", + "@uifabric/react-hooks": { + "version": "7.3.7", + "resolved": "https://registry.npmjs.org/@uifabric/react-hooks/-/react-hooks-7.3.7.tgz", + "integrity": "sha512-hNMma78ewtM4adwpVS+nFKvJpZ9blYz5AuNFjUfsn85YmutmfJ2BuV//SWnELKgX+ahASZSdSIwJLVYXHwYrKw==", "requires": { - "tslib": "^1.7.1" + "@uifabric/set-version": "^7.0.12", + "@uifabric/utilities": "^7.17.3", + "tslib": "^1.10.0" } }, "@uifabric/styling": { - "version": "6.50.7", - "resolved": "https://registry.npmjs.org/@uifabric/styling/-/styling-6.50.7.tgz", - "integrity": "sha512-F2aBiB30ZiFxlZzy5hzLXODWOl6jySvPFAsoaTofk37xucHiunBLZYjX6WkfZrCWiyGPva+DLssNcwly9ZHVjg==", + "version": "7.12.9", + "resolved": "https://registry.npmjs.org/@uifabric/styling/-/styling-7.12.9.tgz", + "integrity": "sha512-eImcC3YiLoCp6RaxtQLqcRSj5ErcI/96+nvGlR+7F+KZ0aAj4vWDCCU5cUd5UI+wL11yCREN7DnWTQWpP98I7Q==", "requires": { - "@microsoft/load-themed-styles": "^1.7.13", - "@uifabric/merge-styles": "^6.19.4", - "@uifabric/set-version": "^1.1.3", - "@uifabric/utilities": "^6.41.7", - "tslib": "^1.7.1" + "@microsoft/load-themed-styles": "^1.10.26", + "@uifabric/merge-styles": "^7.14.0", + "@uifabric/set-version": "^7.0.12", + "@uifabric/utilities": "^7.17.3", + "tslib": "^1.10.0" } }, "@uifabric/utilities": { - "version": "6.45.2", - "resolved": "https://registry.npmjs.org/@uifabric/utilities/-/utilities-6.45.2.tgz", - "integrity": "sha512-JiC92OjMOkVoiIAeS2b3R9B1XQU0cJ5bDr9B7VvrxlwKe1W9xMtVsCer7b8gNCU5NFNYBN5ckM3Q7x2Zs5cH0A==", + "version": "7.17.3", + "resolved": "https://registry.npmjs.org/@uifabric/utilities/-/utilities-7.17.3.tgz", + "integrity": "sha512-NeLL6Bsg7F/1BMYrg/dcnxm7LjwPm9OSg14aK/YI60iBSO6QQpPJ6UrSTflVh6JKBAAA26kTR9/3fJiLxO+2PA==", "requires": { - "@uifabric/merge-styles": "^6.19.4", - "@uifabric/set-version": "^1.1.3", - "prop-types": "^15.5.10", - "tslib": "^1.7.1" + "@uifabric/merge-styles": "^7.14.0", + "@uifabric/set-version": "^7.0.12", + "prop-types": "^15.7.2", + "tslib": "^1.10.0" } } } diff --git a/package.json b/package.json index 5d6f28b45..d0139e78c 100644 --- a/package.json +++ b/package.json @@ -60,7 +60,7 @@ "knockout": "3.5.1", "monaco-editor": "0.15.6", "object.entries": "1.1.0", - "office-ui-fabric-react": "6.210.5", + "office-ui-fabric-react": "7.115.0", "plotly.js-cartesian-dist-min": "1.52.3", "promise-polyfill": "8.1.0", "promise.prototype.finally": "3.1.0", diff --git a/src/Common/Constants.ts b/src/Common/Constants.ts index 773643c0a..372e06d76 100644 --- a/src/Common/Constants.ts +++ b/src/Common/Constants.ts @@ -41,7 +41,7 @@ export class ArmApiVersions { public static readonly arcadiaLivy: string = "2019-11-01-preview"; public static readonly arm: string = "2015-11-01"; public static readonly armFeatures: string = "2014-08-01-preview"; - public static readonly publicVersion = "2020-03-01"; + public static readonly publicVersion = "2020-04-01"; } export class ArmResourceTypes { @@ -334,11 +334,13 @@ export class HttpHeaders { public static populateCollectionThroughputInfo = "x-ms-documentdb-populatecollectionthroughputinfo"; public static supportSpatialLegacyCoordinates = "x-ms-documentdb-supportspatiallegacycoordinates"; public static usePolygonsSmallerThanAHemisphere = "x-ms-documentdb-usepolygonssmallerthanahemisphere"; - public static autoPilotThroughput = "ProvisionedThroughputSettings"; + public static autoPilotThroughput = "autoscaleSettings"; + public static autoPilotThroughputSDK = "x-ms-cosmos-offer-autopilot-settings"; public static autoPilotTier = "x-ms-cosmos-offer-autopilot-tier"; public static partitionKey: string = "x-ms-documentdb-partitionkey"; public static migrateOfferToManualThroughput: string = "x-ms-cosmos-migrate-offer-to-manual-throughput"; public static migrateOfferToAutopilot: string = "x-ms-cosmos-migrate-offer-to-autopilot"; + public static mongoFixedCollectionWithSharedThroughput: string = "InsertSystemPartitionKey"; } export class ApiType { diff --git a/src/Common/DataAccessUtilityBase.ts b/src/Common/DataAccessUtilityBase.ts index d563f584f..e6c992783 100644 --- a/src/Common/DataAccessUtilityBase.ts +++ b/src/Common/DataAccessUtilityBase.ts @@ -544,7 +544,7 @@ export abstract class DataAccessUtilityBase { const initialHeaders = request.autoPilot ? !hasAutoPilotV2FeatureFlag ? { - [Constants.HttpHeaders.autoPilotThroughput]: JSON.stringify({ + [Constants.HttpHeaders.autoPilotThroughputSDK]: JSON.stringify({ maxThroughput: request.autoPilot.maxThroughput }) } @@ -654,7 +654,7 @@ export abstract class DataAccessUtilityBase { const initialHeaders = autoPilot ? !hasAutoPilotV2FeatureFlag ? { - [Constants.HttpHeaders.autoPilotThroughput]: JSON.stringify({ maxThroughput: autoPilot.maxThroughput }) + [Constants.HttpHeaders.autoPilotThroughputSDK]: JSON.stringify({ maxThroughput: autoPilot.maxThroughput }) } : { [Constants.HttpHeaders.autoPilotTier]: autoPilot.autopilotTier diff --git a/src/Common/MongoProxyClient.test.ts b/src/Common/MongoProxyClient.test.ts index b6ae0a375..a6324c2af 100644 --- a/src/Common/MongoProxyClient.test.ts +++ b/src/Common/MongoProxyClient.test.ts @@ -259,15 +259,19 @@ describe("MongoProxyClient", () => { sid: "a2", rg: "c1", dba: "main", - is: false + is: false, + isFixedCollectionWithSharedThroughputBeingCreated: true }; _createMongoCollectionWithARM("management.azure.com", properties, { "x-ms-cosmos-offer-autopilot-tier": "1" }); - expect( - resourceProviderClientPutAsyncSpy - ).toHaveBeenCalledWith( + expect(resourceProviderClientPutAsyncSpy).toHaveBeenCalledWith( "subscriptions/a2/resourceGroups/c1/providers/Microsoft.DocumentDB/databaseAccounts/foo/mongodbDatabases/a1-db/collections/abc-collection", - "2020-03-01", - { properties: { options: { "x-ms-cosmos-offer-autopilot-tier": "1" }, resource: { id: "abc-collection" } } } + "2020-04-01", + { + properties: { + options: { "x-ms-cosmos-offer-autopilot-tier": "1", InsertSystemPartitionKey: "true" }, + resource: { id: "abc-collection" } + } + } ); }); it("should create a collection with provisioned throughput when provisioned throughput is selected + shared throughput is false", () => { @@ -282,15 +286,19 @@ describe("MongoProxyClient", () => { rg: "c1", dba: "main", is: false, - offerThroughput: 400 + offerThroughput: 400, + isFixedCollectionWithSharedThroughputBeingCreated: true }; _createMongoCollectionWithARM("management.azure.com", properties, undefined); - expect( - resourceProviderClientPutAsyncSpy - ).toHaveBeenCalledWith( + expect(resourceProviderClientPutAsyncSpy).toHaveBeenCalledWith( "subscriptions/a2/resourceGroups/c1/providers/Microsoft.DocumentDB/databaseAccounts/foo/mongodbDatabases/a1-db/collections/abc-collection", - "2020-03-01", - { properties: { options: { throughput: "400" }, resource: { id: "abc-collection" } } } + "2020-04-01", + { + properties: { + options: { throughput: "400", InsertSystemPartitionKey: "true" }, + resource: { id: "abc-collection" } + } + } ); }); }); diff --git a/src/Common/MongoProxyClient.ts b/src/Common/MongoProxyClient.ts index 4e988d093..e0be24adc 100644 --- a/src/Common/MongoProxyClient.ts +++ b/src/Common/MongoProxyClient.ts @@ -356,6 +356,7 @@ export function createMongoCollectionWithARM( armEndpoint: string, databaseId: string, analyticalStorageTtl: number, + isFixedCollectionWithSharedThroughputBeingCreated: boolean, collectionId: string, offerThroughput: number, shardKey: string, @@ -379,7 +380,8 @@ export function createMongoCollectionWithARM( sid: CosmosClient.subscriptionId(), rg: CosmosClient.resourceGroup(), dba: databaseAccount.name, - analyticalStorageTtl + analyticalStorageTtl, + isFixedCollectionWithSharedThroughputBeingCreated }; if (createDatabase) { @@ -451,6 +453,11 @@ export async function _createMongoCollectionWithARM( } } + if (params.isFixedCollectionWithSharedThroughputBeingCreated) { + rpPayloadToCreateCollection.properties.options[Constants.HttpHeaders.mongoFixedCollectionWithSharedThroughput] = + "true"; + } + if (params.analyticalStorageTtl) { rpPayloadToCreateCollection.properties.resource.analyticalStorageTtl = params.analyticalStorageTtl; } diff --git a/src/Config.ts b/src/Config.ts index ffc83d9a1..d81b5c907 100644 --- a/src/Config.ts +++ b/src/Config.ts @@ -31,7 +31,7 @@ interface Config { // Default configuration let config: Config = { platform: Platform.Portal, - allowedParentFrameOrigins: /^https:\/\/portal\.azure\.com$|^https:\/\/portal\.azure\.us$|^https:\/\/portal\.azure\.cn$|^https:\/\/portal\.microsoftazure\.de$|^https:\/\/.+\.portal\.azure\.com$|^https:\/\/.+\.portal\.azure\.us$|^https:\/\/.+\.portal\.azure\.cn$|^https:\/\/.+\.portal\.microsoftazure\.de$/, + allowedParentFrameOrigins: /^https:\/\/portal\.azure\.com$|^https:\/\/portal\.azure\.us$|^https:\/\/portal\.azure\.cn$|^https:\/\/portal\.microsoftazure\.de$|^https:\/\/.+\.portal\.azure\.com$|^https:\/\/.+\.portal\.azure\.us$|^https:\/\/.+\.portal\.azure\.cn$|^https:\/\/.+\.portal\.microsoftazure\.de$|^https:\/\/main\.documentdb\.ext\.azure\.com$|^https:\/\/main\.documentdb\.ext\.microsoftazure\.de$|^https:\/\/main\.documentdb\.ext\.azure\.cn$|^https:\/\/main\.documentdb\.ext\.azure\.us$/, // Webpack injects this at build time gitSha: process.env.GIT_SHA, hostedExplorerURL: "https://cosmos.azure.com/", diff --git a/src/Contracts/DataModels.ts b/src/Contracts/DataModels.ts index 5eb94f752..5042da2b9 100644 --- a/src/Contracts/DataModels.ts +++ b/src/Contracts/DataModels.ts @@ -301,6 +301,7 @@ export enum AutopilotTier { } export interface RpOptions { + // tier is sent as string, autoscale as object (AutoPilotCreationSettings) [key: string]: string | AutoPilotCreationSettings; } @@ -546,6 +547,7 @@ export interface MongoParameters extends RpParameters { autoPilotTier?: string; autoPilotThroughput?: string; analyticalStorageTtl?: number; + isFixedCollectionWithSharedThroughputBeingCreated?: boolean; } export interface GraphParameters extends RpParameters { diff --git a/src/Contracts/ViewModels.ts b/src/Contracts/ViewModels.ts index 8a1943107..d5551500c 100644 --- a/src/Contracts/ViewModels.ts +++ b/src/Contracts/ViewModels.ts @@ -77,6 +77,7 @@ export interface Explorer { isAccountReady: ko.Observable; + collectionCreationDefaults: CollectionCreationDefaults; isEmulator: boolean; features: ko.Observable; serverId: ko.Observable; @@ -1257,6 +1258,26 @@ export interface DataExplorerInputsFrame { sharedThroughputDefault?: number; dataExplorerVersion?: string; isAuthWithresourceToken?: boolean; + defaultCollectionThroughput?: CollectionCreationDefaults; +} + +export interface CollectionCreationDefaults { + storage: string; + throughput: ThroughputDefaults; +} + +export interface ThroughputDefaults { + fixed: number; + unlimited: + | number + | { + collectionThreshold: number; + lessThanOrEqualToThreshold: number; + greatThanThreshold: number; + }; + unlimitedmax: number; + unlimitedmin: number; + shared: number; } export enum SubscriptionType { diff --git a/src/Explorer/Controls/Directory/DefaultDirectoryDropdownComponent.test.tsx b/src/Explorer/Controls/Directory/DefaultDirectoryDropdownComponent.test.tsx index efa9a333a..66620a818 100644 --- a/src/Explorer/Controls/Directory/DefaultDirectoryDropdownComponent.test.tsx +++ b/src/Explorer/Controls/Directory/DefaultDirectoryDropdownComponent.test.tsx @@ -90,7 +90,10 @@ describe("test function", () => { const wrapper = mount(); - wrapper.find("div.defaultDirectoryDropdown").simulate("click"); + wrapper + .find("div.defaultDirectoryDropdown") + .find("div.ms-Dropdown") + .simulate("click"); expect(wrapper.exists("div.ms-Callout-main")).toBe(true); wrapper .find("button.ms-Dropdown-item") @@ -99,7 +102,10 @@ describe("test function", () => { expect(props.onDefaultDirectoryChange).toBeCalled(); expect(props.onDefaultDirectoryChange).toHaveBeenCalled(); - wrapper.find("div.defaultDirectoryDropdown").simulate("click"); + wrapper + .find("div.defaultDirectoryDropdown") + .find("div.ms-Dropdown") + .simulate("click"); expect(wrapper.exists("div.ms-Callout-main")).toBe(true); wrapper .find("button.ms-Dropdown-item") diff --git a/src/Explorer/Controls/Directory/DirectoryListComponent.tsx b/src/Explorer/Controls/Directory/DirectoryListComponent.tsx index 7e593df18..9ba6b4f27 100644 --- a/src/Explorer/Controls/Directory/DirectoryListComponent.tsx +++ b/src/Explorer/Controls/Directory/DirectoryListComponent.tsx @@ -51,7 +51,7 @@ export class DirectoryListComponent extends React.Component { + private _onFilterChanged = (event: React.FormEvent, text?: string): void => { this.setState({ filterText: text }); diff --git a/src/Explorer/Controls/Directory/__snapshots__/DirectoryListComponent.test.tsx.snap b/src/Explorer/Controls/Directory/__snapshots__/DirectoryListComponent.test.tsx.snap index 213fb3a95..9865452f5 100644 --- a/src/Explorer/Controls/Directory/__snapshots__/DirectoryListComponent.test.tsx.snap +++ b/src/Explorer/Controls/Directory/__snapshots__/DirectoryListComponent.test.tsx.snap @@ -11,7 +11,7 @@ exports[`test render renders with directories and selected 1`] = ` @@ -79,19 +79,19 @@ exports[`test render renders with filters 1`] = ` Object { "disableGlobalClassNames": false, "effects": Object { - "elevation16": "0 0 5px 0 rgba(0,0,0,.4)", - "elevation4": "0 0 5px 0 rgba(0,0,0,.4)", - "elevation64": "0 0 5px 0 rgba(0,0,0,.4)", - "elevation8": "0 0 5px 0 rgba(0,0,0,.4)", - "roundedCorner2": "0px", + "elevation16": "0 6.4px 14.4px 0 rgba(0, 0, 0, 0.132), 0 1.2px 3.6px 0 rgba(0, 0, 0, 0.108)", + "elevation4": "0 1.6px 3.6px 0 rgba(0, 0, 0, 0.132), 0 0.3px 0.9px 0 rgba(0, 0, 0, 0.108)", + "elevation64": "0 25.6px 57.6px 0 rgba(0, 0, 0, 0.22), 0 4.8px 14.4px 0 rgba(0, 0, 0, 0.18)", + "elevation8": "0 3.2px 7.2px 0 rgba(0, 0, 0, 0.132), 0 0.6px 1.8px 0 rgba(0, 0, 0, 0.108)", + "roundedCorner2": "2px", }, "fonts": Object { "large": Object { "MozOsxFontSmoothing": "grayscale", "WebkitFontSmoothing": "antialiased", - "fontFamily": "'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif", - "fontSize": "17px", - "fontWeight": 300, + "fontFamily": "'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif", + "fontSize": "18px", + "fontWeight": 400, }, "medium": Object { "MozOsxFontSmoothing": "grayscale", @@ -104,15 +104,15 @@ exports[`test render renders with filters 1`] = ` "MozOsxFontSmoothing": "grayscale", "WebkitFontSmoothing": "antialiased", "fontFamily": "'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif", - "fontSize": "15px", + "fontSize": "16px", "fontWeight": 400, }, "mega": Object { "MozOsxFontSmoothing": "grayscale", "WebkitFontSmoothing": "antialiased", "fontFamily": "'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif", - "fontSize": "72px", - "fontWeight": 100, + "fontSize": "68px", + "fontWeight": 600, }, "small": Object { "MozOsxFontSmoothing": "grayscale", @@ -125,7 +125,7 @@ exports[`test render renders with filters 1`] = ` "MozOsxFontSmoothing": "grayscale", "WebkitFontSmoothing": "antialiased", "fontFamily": "'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif", - "fontSize": "13px", + "fontSize": "12px", "fontWeight": 400, }, "superLarge": Object { @@ -133,34 +133,34 @@ exports[`test render renders with filters 1`] = ` "WebkitFontSmoothing": "antialiased", "fontFamily": "'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif", "fontSize": "42px", - "fontWeight": 100, + "fontWeight": 600, }, "tiny": Object { "MozOsxFontSmoothing": "grayscale", "WebkitFontSmoothing": "antialiased", "fontFamily": "'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif", "fontSize": "10px", - "fontWeight": 600, + "fontWeight": 400, }, "xLarge": Object { "MozOsxFontSmoothing": "grayscale", "WebkitFontSmoothing": "antialiased", "fontFamily": "'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif", - "fontSize": "21px", - "fontWeight": 100, + "fontSize": "20px", + "fontWeight": 600, }, "xLargePlus": Object { "MozOsxFontSmoothing": "grayscale", "WebkitFontSmoothing": "antialiased", "fontFamily": "'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif", - "fontSize": "21px", - "fontWeight": 100, + "fontSize": "24px", + "fontWeight": 600, }, "xSmall": Object { "MozOsxFontSmoothing": "grayscale", "WebkitFontSmoothing": "antialiased", "fontFamily": "'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif", - "fontSize": "11px", + "fontSize": "10px", "fontWeight": 400, }, "xxLarge": Object { @@ -168,14 +168,14 @@ exports[`test render renders with filters 1`] = ` "WebkitFontSmoothing": "antialiased", "fontFamily": "'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif", "fontSize": "28px", - "fontWeight": 100, + "fontWeight": 600, }, "xxLargePlus": Object { "MozOsxFontSmoothing": "grayscale", "WebkitFontSmoothing": "antialiased", "fontFamily": "'Segoe UI', 'Segoe UI Web (West European)', 'Segoe UI', -apple-system, BlinkMacSystemFont, 'Roboto', 'Helvetica Neue', sans-serif", - "fontSize": "28px", - "fontWeight": 100, + "fontSize": "32px", + "fontWeight": 600, }, }, "isInverted": false, @@ -193,18 +193,18 @@ exports[`test render renders with filters 1`] = ` "magenta": "#b4009e", "magentaDark": "#5c005c", "magentaLight": "#e3008c", - "neutralDark": "#212121", - "neutralLight": "#eaeaea", - "neutralLighter": "#f4f4f4", - "neutralLighterAlt": "#f8f8f8", - "neutralPrimary": "#333333", - "neutralPrimaryAlt": "#3c3c3c", - "neutralQuaternary": "#d0d0d0", - "neutralQuaternaryAlt": "#dadada", - "neutralSecondary": "#666666", - "neutralSecondaryAlt": "#767676", - "neutralTertiary": "#a6a6a6", - "neutralTertiaryAlt": "#c8c8c8", + "neutralDark": "#201f1e", + "neutralLight": "#edebe9", + "neutralLighter": "#f3f2f1", + "neutralLighterAlt": "#faf9f8", + "neutralPrimary": "#323130", + "neutralPrimaryAlt": "#3b3a39", + "neutralQuaternary": "#d2d0ce", + "neutralQuaternaryAlt": "#e1dfdd", + "neutralSecondary": "#605e5c", + "neutralSecondaryAlt": "#8a8886", + "neutralTertiary": "#a19f9d", + "neutralTertiaryAlt": "#c8c6c4", "orange": "#d83b01", "orangeLight": "#ea4300", "orangeLighter": "#ff8c00", @@ -212,7 +212,7 @@ exports[`test render renders with filters 1`] = ` "purpleDark": "#32145a", "purpleLight": "#b4a0ff", "red": "#e81123", - "redDark": "#a80000", + "redDark": "#a4262c", "teal": "#008272", "tealDark": "#004b50", "tealLight": "#00b294", @@ -231,89 +231,108 @@ exports[`test render renders with filters 1`] = ` "yellowDark": "#d29200", "yellowLight": "#fff100", }, + "rtl": undefined, "semanticColors": Object { "accentButtonBackground": "#0078d4", "accentButtonText": "#ffffff", - "actionLink": "#333333", - "actionLinkHovered": "#212121", - "blockingBackground": "rgba(234, 67, 0, .2)", + "actionLink": "#323130", + "actionLinkHovered": "#201f1e", + "blockingBackground": "#FDE7E9", + "blockingIcon": "#FDE7E9", "bodyBackground": "#ffffff", - "bodyDivider": "#eaeaea", + "bodyBackgroundChecked": "#edebe9", + "bodyBackgroundHovered": "#f3f2f1", + "bodyDivider": "#edebe9", "bodyFrameBackground": "#ffffff", - "bodyFrameDivider": "#eaeaea", - "bodyStandoutBackground": "#f8f8f8", - "bodySubtext": "#666666", - "bodyText": "#333333", + "bodyFrameDivider": "#edebe9", + "bodyStandoutBackground": "#faf9f8", + "bodySubtext": "#605e5c", + "bodyText": "#323130", "bodyTextChecked": "#000000", - "buttonBackground": "#f4f4f4", - "buttonBackgroundChecked": "#c8c8c8", - "buttonBackgroundCheckedHovered": "#eaeaea", - "buttonBackgroundDisabled": "#f4f4f4", - "buttonBackgroundHovered": "#eaeaea", - "buttonBackgroundPressed": "#eaeaea", - "buttonBorder": "transparent", - "buttonBorderDisabled": "transparent", - "buttonText": "#333333", - "buttonTextChecked": "#212121", + "buttonBackground": "#ffffff", + "buttonBackgroundChecked": "#c8c6c4", + "buttonBackgroundCheckedHovered": "#edebe9", + "buttonBackgroundDisabled": "#f3f2f1", + "buttonBackgroundHovered": "#f3f2f1", + "buttonBackgroundPressed": "#edebe9", + "buttonBorder": "#8a8886", + "buttonBorderDisabled": "#f3f2f1", + "buttonText": "#323130", + "buttonTextChecked": "#201f1e", "buttonTextCheckedHovered": "#000000", - "buttonTextDisabled": "#a6a6a6", - "buttonTextHovered": "#212121", - "buttonTextPressed": "#212121", - "defaultStateBackground": "#f8f8f8", - "disabledBackground": "#f4f4f4", - "disabledBodySubtext": "#c8c8c8", - "disabledBodyText": "#a6a6a6", - "disabledSubtext": "#d0d0d0", - "disabledText": "#a6a6a6", - "errorBackground": "rgba(232, 17, 35, .2)", - "errorText": "#a80000", - "focusBorder": "#666666", + "buttonTextDisabled": "#a19f9d", + "buttonTextHovered": "#201f1e", + "buttonTextPressed": "#201f1e", + "defaultStateBackground": "#faf9f8", + "disabledBackground": "#f3f2f1", + "disabledBodySubtext": "#c8c6c4", + "disabledBodyText": "#a19f9d", + "disabledBorder": "#c8c6c4", + "disabledSubtext": "#d2d0ce", + "disabledText": "#a19f9d", + "errorBackground": "#FDE7E9", + "errorIcon": "#A80000", + "errorText": "#a4262c", + "focusBorder": "#605e5c", + "infoBackground": "#f3f2f1", + "infoIcon": "#605e5c", "inputBackground": "#ffffff", "inputBackgroundChecked": "#0078d4", - "inputBackgroundCheckedHovered": "#106ebe", - "inputBorder": "#a6a6a6", - "inputBorderHovered": "#333333", + "inputBackgroundCheckedHovered": "#005a9e", + "inputBorder": "#605e5c", + "inputBorderHovered": "#323130", "inputFocusBorderAlt": "#0078d4", "inputForegroundChecked": "#ffffff", - "inputPlaceholderText": "#666666", - "inputText": "#333333", - "inputTextHovered": "#212121", + "inputIcon": "#0078d4", + "inputIconDisabled": "#a19f9d", + "inputIconHovered": "#005a9e", + "inputPlaceholderBackgroundChecked": "#deecf9", + "inputPlaceholderText": "#605e5c", + "inputText": "#323130", + "inputTextHovered": "#201f1e", "link": "#0078d4", "linkHovered": "#004578", "listBackground": "#ffffff", - "listHeaderBackgroundHovered": "#f4f4f4", - "listHeaderBackgroundPressed": "#eaeaea", - "listItemBackgroundChecked": "#eaeaea", - "listItemBackgroundCheckedHovered": "#dadada", - "listItemBackgroundHovered": "#f4f4f4", - "listText": "#333333", - "listTextColor": "#333333", + "listHeaderBackgroundHovered": "#f3f2f1", + "listHeaderBackgroundPressed": "#edebe9", + "listItemBackgroundChecked": "#edebe9", + "listItemBackgroundCheckedHovered": "#e1dfdd", + "listItemBackgroundHovered": "#f3f2f1", + "listText": "#323130", + "listTextColor": "#323130", "menuBackground": "#ffffff", - "menuDivider": "#c8c8c8", + "menuDivider": "#c8c6c4", "menuHeader": "#0078d4", "menuIcon": "#0078d4", - "menuItemBackgroundChecked": "#eaeaea", - "menuItemBackgroundHovered": "#f4f4f4", - "menuItemBackgroundPressed": "#eaeaea", - "menuItemText": "#333333", - "menuItemTextHovered": "#212121", + "menuItemBackgroundChecked": "#edebe9", + "menuItemBackgroundHovered": "#f3f2f1", + "menuItemBackgroundPressed": "#edebe9", + "menuItemText": "#323130", + "menuItemTextHovered": "#201f1e", + "messageLink": "#005A9E", + "messageLinkHovered": "#004578", + "messageText": "#323130", "primaryButtonBackground": "#0078d4", - "primaryButtonBackgroundDisabled": "#f4f4f4", + "primaryButtonBackgroundDisabled": "#f3f2f1", "primaryButtonBackgroundHovered": "#106ebe", "primaryButtonBackgroundPressed": "#005a9e", "primaryButtonBorder": "transparent", "primaryButtonText": "#ffffff", - "primaryButtonTextDisabled": "#d0d0d0", + "primaryButtonTextDisabled": "#d2d0ce", "primaryButtonTextHovered": "#ffffff", "primaryButtonTextPressed": "#ffffff", - "smallInputBorder": "#666666", - "successBackground": "rgba(186, 216, 10, .2)", + "severeWarningBackground": "#FED9CC", + "severeWarningIcon": "#D83B01", + "smallInputBorder": "#605e5c", + "successBackground": "#DFF6DD", + "successIcon": "#107C10", "successText": "#107C10", - "variantBorder": "#eaeaea", - "variantBorderHovered": "#a6a6a6", - "warningBackground": "rgba(255, 185, 0, .2)", + "variantBorder": "#edebe9", + "variantBorderHovered": "#a19f9d", + "warningBackground": "#FFF4CE", "warningHighlight": "#ffb900", - "warningText": "#333333", + "warningIcon": "#797775", + "warningText": "#323130", }, "spacing": Object { "l1": "20px", @@ -329,6 +348,18 @@ exports[`test render renders with filters 1`] = ` className="ms-ScrollablePane root-40" data-is-scrollable="true" > +