-
Notifications
You must be signed in to change notification settings - Fork 39
Add create file support to WSFS explorer #1922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -196,6 +196,20 @@ | |
| "enablement": "databricks.context.activated && databricks.context.loggedIn && !databricks.context.remoteMode", | ||
| "category": "Databricks" | ||
| }, | ||
| { | ||
| "command": "databricks.wsfs.createNewFile", | ||
| "title": "Create File", | ||
| "icon": "$(new-file)", | ||
| "enablement": "databricks.context.activated && databricks.context.loggedIn && !databricks.context.remoteMode", | ||
| "category": "Databricks" | ||
| }, | ||
| { | ||
| "command": "databricks.wsfs.createNewFile.toolbar", | ||
| "title": "Create File", | ||
| "icon": "$(new-file)", | ||
| "enablement": "databricks.context.activated && databricks.context.loggedIn && !databricks.context.remoteMode", | ||
| "category": "Databricks" | ||
| }, | ||
| { | ||
| "command": "databricks.wsfs.openInBrowser", | ||
| "title": "Open in Browser", | ||
|
|
@@ -726,6 +740,11 @@ | |
| "when": "view == workspaceFsView", | ||
| "group": "navigation@1" | ||
| }, | ||
| { | ||
| "command": "databricks.wsfs.createNewFile.toolbar", | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [regression] That toolbar button is available regardless of selected item. VS Code can pass the selected tree item to the toolbar command, and createFileFromToolbar currently uses activeElement?.path without checking type. So if a file/notebook is selected, it tries to create under that file path and getValidRoot rejects it. |
||
| "when": "view == workspaceFsView", | ||
| "group": "navigation@1" | ||
| }, | ||
| { | ||
| "command": "databricks.unityCatalog.filter", | ||
| "when": "view == unityCatalogView", | ||
|
|
@@ -803,10 +822,15 @@ | |
| "group": "wsfs_mut@0" | ||
| }, | ||
| { | ||
| "command": "databricks.wsfs.uploadFile", | ||
| "command": "databricks.wsfs.createNewFile", | ||
| "when": "view == workspaceFsView && (viewItem == wsfs.directory || viewItem == wsfs.repo)", | ||
| "group": "wsfs_mut@1" | ||
| }, | ||
| { | ||
| "command": "databricks.wsfs.uploadFile", | ||
| "when": "view == workspaceFsView && (viewItem == wsfs.directory || viewItem == wsfs.repo)", | ||
| "group": "wsfs_mut@2" | ||
| }, | ||
| { | ||
| "command": "databricks.wsfs.downloadFile", | ||
| "when": "view == workspaceFsView && (viewItem == wsfs.file || viewItem == wsfs.notebook)", | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit (optional): this toolbar button shares
navigation@1withcreateFolder.toolbaranduploadFile.toolbar, so ordering between the three is implicit. The context-menu entries use explicitwsfs_mut@0/@1/@2; consider the same explicit ordering here for predictability. Pre-existing pattern, so optional.