Skip to content

Commit 6825853

Browse files
authored
Add tree welcome views (#1693)
* add welcome view when there are no columns in the project * update text in test * add welcome view for tracked tree
1 parent 8eb2b33 commit 6825853

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

extension/package.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1107,6 +1107,14 @@
11071107
"contents": "The currently open folder does not contain a DVC project. You can initialize a project which will enable features powered by DVC.\n[Initialize Project](command:dvc.init)\nTo learn more about how to use DVC please read [our docs](https://dvc.org/doc).",
11081108
"when": "dvc.commands.available && !dvc.cli.incompatible && !dvc.project.available"
11091109
},
1110+
{
1111+
"view": "dvc.views.trackedExplorerTree",
1112+
"contents": "No tracked data to display."
1113+
},
1114+
{
1115+
"view": "dvc.views.experimentsColumnsTree",
1116+
"contents": "No columns to display."
1117+
},
11101118
{
11111119
"view": "dvc.views.experimentsTree",
11121120
"contents": "No experiments to display. \n[Run Experiment](command:dvc.runExperiment)\n"

extension/src/experiments/columns/quickPick.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,9 @@ describe('pickFromColumns', () => {
4343
}
4444
const exampleColumns = [epochsParam, paramsYamlParam]
4545

46-
it('should return early if no params or metrics are provided', async () => {
46+
it('should return early if no columns are provided', async () => {
4747
const picked = await pickFromColumns([], {
48-
title: "can't pick from no params or metrics" as Title
48+
title: "can't pick from no columns" as Title
4949
})
5050
expect(picked).toBeUndefined()
5151
expect(mockedShowError).toBeCalledTimes(1)

extension/src/experiments/columns/quickPick.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const pickFromColumns = (
1111
quickPickOptions: QuickPickOptionsWithTitle
1212
) => {
1313
if (!definedAndNonEmpty(columns)) {
14-
return Toast.showError('There are no params or metrics to select from')
14+
return Toast.showError('There are no columns to select from.')
1515
}
1616
return quickPickValue<Column>(
1717
columns.map(column => ({

0 commit comments

Comments
 (0)