vscode-dashboard icon indicating copy to clipboard operation
vscode-dashboard copied to clipboard

Feat: look for git projects inside base folder

Open DiogoAbu opened this issue 4 years ago • 5 comments

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.

DiogoAbu avatar May 30 '20 18:05 DiogoAbu

Thanks for the PR, I will have a look on it soon! :)

Kruemelkatze avatar May 31 '20 17:05 Kruemelkatze

Hello, is it a good idea to changed it to respect the globalState/settings toggle?


Edit:

  • Changed the settings from projectsBaseDirectories to baseDirectories.
  • Introduced a command to add base directories.
  • Handle .code-workspace files, in addition to git directories.

DiogoAbu avatar Jun 04 '20 20:06 DiogoAbu

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! :)

Kruemelkatze avatar Jun 06 '20 10:06 Kruemelkatze

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. :)

Kruemelkatze avatar Jun 24 '20 12:06 Kruemelkatze

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 .gitfolder 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.

Kruemelkatze avatar Jun 24 '20 12:06 Kruemelkatze