Skip to content

Commit 450b002

Browse files
Rename some things (#1146)
## Changes * Use link-external icon <img width="52" alt="image" src="https://github.com/databricks/databricks-vscode/assets/88345179/eda6495f-8bb7-4309-933b-c8ad41a07af9"> instead of link icon for urls * Change DABs resource explorer to Bundle resource explorer * Remove nesting of sync destination tree item. Now there is only 1 level directly displaying the full path. * Remove intentionally setting tnc flag to false (some leftover debugging code from previous PR). ## Tests <!-- How is this tested? -->
1 parent 5370f04 commit 450b002

File tree

5 files changed

+17
-34
lines changed

5 files changed

+17
-34
lines changed

packages/databricks-vscode/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@
177177
{
178178
"command": "databricks.utils.openExternal",
179179
"title": "Open link externally",
180-
"icon": "$(link)",
180+
"icon": "$(link-external)",
181181
"category": "Databricks"
182182
},
183183
{
@@ -294,7 +294,7 @@
294294
},
295295
{
296296
"id": "dabsResourceExplorerView",
297-
"name": "DABs Resource Explorer",
297+
"name": "Bundle Resource Explorer",
298298
"visibility": "visible",
299299
"when": "databricks.context.bundle.isTargetSet"
300300
},

packages/databricks-vscode/src/configuration/auth/AuthProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ export abstract class AuthProvider {
8585
await window.withProgress(
8686
{
8787
location: ProgressLocation.Notification,
88-
title: `Databricks: Trying to login using ${this.describe()}`,
88+
title: `Databricks: Logging in using ${this.describe()}`,
8989
},
9090
async () => await checkFn()
9191
);

packages/databricks-vscode/src/configuration/ui/BundleTargetComponent.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,13 @@ export class BundleTargetComponent extends BaseComponent {
6161

6262
return [
6363
{
64-
label: target,
64+
label: "Target",
6565
id: TREE_ICON_ID,
6666
iconPath: new ThemeIcon(
6767
"target",
6868
new ThemeColor("debugIcon.startForeground")
6969
),
70-
description: humanisedMode,
70+
description: target,
7171
contextValue: `databricks.configuration.target.${humanisedMode.toLocaleLowerCase()}}`,
7272
collapsibleState: TreeItemCollapsibleState.Collapsed,
7373
},

packages/databricks-vscode/src/configuration/ui/SyncDestinationComponent.ts

Lines changed: 12 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import {posix} from "path/posix";
21
import {ConfigModel} from "../models/ConfigModel";
32
import {ConnectionManager} from "../ConnectionManager";
43
import {BaseComponent} from "./BaseComponent";
@@ -42,10 +41,9 @@ export class SyncDestinationComponent extends BaseComponent {
4241
: undefined;
4342
}
4443
private async getRoot(): Promise<ConfigurationTreeItem[]> {
45-
const config = await this.configModel.get("remoteRootPath");
46-
if (config === undefined) {
47-
// Workspace folder is not set in bundle and override
48-
// We are not logged in
44+
const workspaceFsPath = await this.configModel.get("remoteRootPath");
45+
46+
if (workspaceFsPath === undefined) {
4947
return [];
5048
}
5149

@@ -54,12 +52,15 @@ export class SyncDestinationComponent extends BaseComponent {
5452

5553
return [
5654
{
57-
label: "Sync",
55+
label: "Workspace Folder",
5856
tooltip: url ? undefined : "Created after deploy",
59-
description: posix.basename(posix.dirname(config)),
60-
collapsibleState: TreeItemCollapsibleState.Expanded,
57+
description: workspaceFsPath,
58+
collapsibleState: TreeItemCollapsibleState.None,
6159
contextValue: url ? `${contextValue}.has-url` : contextValue,
62-
iconPath: new ThemeIcon("sync", new ThemeColor("charts.green")),
60+
iconPath: new ThemeIcon(
61+
"folder-active",
62+
new ThemeColor("charts.green")
63+
),
6364
resourceUri: url
6465
? undefined
6566
: DecorationUtils.getModifiedStatusDecoration(
@@ -78,27 +79,11 @@ export class SyncDestinationComponent extends BaseComponent {
7879
if (this.connectionManager.state !== "CONNECTED") {
7980
return [];
8081
}
82+
8183
if (parent === undefined) {
8284
return this.getRoot();
8385
}
84-
// If the parent is not intended for this component, return empty array
85-
if (parent.id !== TREE_ICON_ID) {
86-
return [];
87-
}
88-
const workspaceFsPath = await this.configModel.get("remoteRootPath");
89-
90-
if (workspaceFsPath === undefined) {
91-
return [];
92-
}
93-
94-
const children: ConfigurationTreeItem[] = [
95-
{
96-
label: "Workspace Folder",
97-
description: workspaceFsPath,
98-
collapsibleState: TreeItemCollapsibleState.None,
99-
},
100-
];
10186

102-
return children;
87+
return [];
10388
}
10489
}

packages/databricks-vscode/src/extension.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,6 @@ export async function activate(
7575
const stateStorage = new StateStorage(context);
7676
const packageMetadata = await PackageJsonUtils.getMetadata(context);
7777

78-
await stateStorage.set("databricks.preview-tnc.accepted", false);
79-
8078
if (
8179
!stateStorage.get("databricks.preview-tnc.accepted") &&
8280
!isIntegrationTest()

0 commit comments

Comments
 (0)