vscode-dashboard
vscode-dashboard copied to clipboard
Feat: look for git projects inside base folder
Hello! I love this extension and decide to add a feature to get all git projects inside a base folder.
Features:
- Base folders are defined inside the user's settings, with an optional depth limit (default is 2).
{
"dashboard.baseDirectories": ["C:\\workspace"],
"dashboard.depthLimit": 2
}
- Each base directory forms a group and the git directories found inside are added to it,
.code-workspace
files too. - If the directory exists in any other group, it is skipped.
- The project`s name is the directory basename and the color is randomized.
Fixes:
- Changed the
isFolderGitRepo
function based on this answer, because it was not working for me.
Thanks for the PR, I will have a look on it soon! :)
Hello, is it a good idea to changed it to respect the globalState/settings toggle?
Edit:
- Changed the settings from
projectsBaseDirectories
tobaseDirectories
. - Introduced a command to add base directories.
- Handle
.code-workspace
files, in addition to git directories.
Hey! Sorry for not coming back to you yet. Busy time. :)
Hello, is it a good idea to changed it to respect the globalState/settings toggle?
I quickly had a look at it and I also think that the globalState/settings toggle should be respected by this feature. As a user, I would expect all data sources to be switched by that toggle.
I will review the rest of this feature in the following days. So far, thank you for building upon my extension! :)
I finally had a look at it! I like the idea but found some aspects to be unclear/unfit for the end-user and some functions buggy. E.g. the git projects inside two base directories are always synced into one group for me.
I have given a testing-build to some of my usual testers to get some additional feedback. I'll come back to you with a more detailed list of remarks as soon as I hear from them. :)
Changed the isFolderGitRepo function based on this answer, because it was not working for me.
Do you have an example for which the old function did not work? I originally refrained from using the .git
folder as an indicator, as I have some projects where I only operate on a subfolder of the repository. In my case, those are projects within a Visual Studio solution, but I guess the same principle applies to monorepos in general.