Skip to content

Commit

Permalink
fix: Add a welcome view to the Bazel Build Targets tree view (#372)
Browse files Browse the repository at this point in the history
By showing a welcome view, we draw more attention to the "refresh"
button which might otherwise be overlooked, in particular by newcomers
to this extension which might be particularly prone to an empty build
target list.

Co-authored-by: Cameron Martin <cameronmartin123@gmail.com>
  • Loading branch information
vogelsgesang and cameron-martin committed Apr 9, 2024
1 parent 14ed3ea commit 1cbdfd6
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -432,7 +432,14 @@
"when": "bazel.haveWorkspace"
}
]
}
},
"viewsWelcome": [
{
"view": "bazelWorkspace",
"contents": "No Bazel targets found.\n[Refresh Target List](command:bazel.refreshBazelBuildTargets)",
"when": "bazel.haveWorkspace"
}
]
},
"scripts": {
"check-lint": "eslint .",
Expand Down
2 changes: 1 addition & 1 deletion src/bazel/bazel_utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function shouldIgnorePath(fsPath: string): boolean {
* Search for the path to the directory that has the Bazel WORKSPACE file for
* the given file.
*
* If multiple directories along the path to the file has files called
* If multiple directories along the path to the file have files called
* "WORKSPACE", the lowest path is returned.
*
* @param fsPath The path to a file in a Bazel workspace.
Expand Down

0 comments on commit 1cbdfd6

Please sign in to comment.