Solvedvscode project manager Contextual Structure for Projects

The are some issues related with this one, but not seems the same goal.

I work in several projects that are related in some way. There are two frameworks with many sub projects, for example. I could say that I work in different contexts and the projects are differents in theses contexts, so it will be nice if I could change my current context and the projects availables in this context.

In other words, I am suggesting an project.json with this format:

[
  {
     "label": "awesome-framework",
     "projects": [
       {
          "label": "core",
          "description": "C:\\awesome-framework\core"
       }, 
       {
          "label": "ui",
          "description": "C:\\awesome-framework\ui"
       }
    ]
  },
  {
     "label": "wonderful-framework",
     "projects": [
       {
          "label": "core",
          "description": "C:\\wonderful-framework\core"
       }, 
       {
          "label": "ui",
          "description": "C:\\wonderful-framework\ui"
       }
    ]
  },
  {
     "label": "personal",
     "projects": [
       {
          "label": "resume",
          "description": "C:\\personal\resume"
       }, 
       {
          "label": "game",
          "description": "C:\\personal\game"
       }
    ]
  }

]

And, to usage, there will be another keyboard shortcut to change contexts. So I start my day, choose my context with alt+shift+c and along the day I can change my projects with alt+shift+p. Maybe I little bit crazy, but I think it will be useful for whom works in more than one company.

16 Answers

βœ”οΈAccepted Answer

πŸƒ Sneak peek...

Kapture-QuickPick-with-button-and-canSelectMany

I moved to the next milestone, because of an issue I found on a VS Code API (microsoft/vscode#119834). If no solution/fix is found, I'll change a bit on how Tags are created. Instead of a dynamic way, like the video, it would use a User Setting

Feedbacks are welcome πŸ˜‰

Other Answers:

I know it did take too long, but it's finally going to happen 😬 .

Motivation

Organize the projects in a way you could group and filter the projects, depending on some context.

Concept

  • What was initially called group will be renamed to Tag.
  • Each Project can have more than one Tag assigned

Saving Projects

When you save a new project, you just have to type its Name. I would like to keep this simple, and avoid adding another step to apply Tags to the project.

Applying Tags

A new Edit Project command will be added to context menu in the Side Bar. Once called, a multi-step command will run, where you will be able to:

  • Rename the Project
  • Update the Project's Path
  • Apply/Update Tags
  • Enable/Disable the Project

Side Bar

A new Tag/Flat view option will be added to the Favorites panel, so you will be able to choose the best way to display your projects.

When you choose Tag view, the projects will be grouped by it's Tags. If a projects has more than one Tag, it will be displayed on each's Tag node

This is a sample of a projects.json file

   {
     "name": "My Project One",
     "tags: ["Personal"],
     ...
   },
   ...
   {
     "name": "Markdown Snippets",
     "tags: ["Personal", "Company B"],
     ...
   },
   ...
   {
     "name": "Documentation",
     "tags: ["Company B"],
     ...
   },

And a mockup displaying the Side Bar

  - Personal
    > My Project One
    > My Project Two
    > Markdown Snippets
  - Company A
    > Backend A
    > Frontend A
  - Company B
    > Documentation
    > Markdown Snippets

This duplicity will be better understood with the Switching Contexts option

Switching Contexts

One of the ideas behind Tags is to define contexts for each project, like Personal, Company A, Company B, and so on.

Switching contexts will give you the chance to focus on this kind of projects, depending on its Tags. Once you switch to some context, the projects will be filtered by that Tag.

Only the projects of that context will be available in the Side Bar and Command Palette.

Roadmap

At first, it will be available only for Favorite projects.

Once stable, it could be expanded to auto-detected projects (Git, SVN and so on) too.

Limitations

  • It must be simple to use (when needed)
  • Avoid structural changes on projects.json file
  • No multi-level visualization on Side Bar

Feedback

Are welcome, of course 😁

Thanks @robsonrosa ,

Sometime ago I was thinking in a similar idea, but with a different approach. The idea was to add, what you call context as a group for each project. In fact, the same project could be part of different groups. The structure should be something like this:

[
    {
        "label": "vscode-language-pascal",
        "description": "c:\\Users\\alefr\\Documents\\GitHub\\vscode-language-pascal",
        "groups": ["vscode" , "delphi"]
    },
    {
        "label": "vscode-bookmarks",
        "description": "c:\\Users\\alefr\\Documents\\GitHub\\vscode-bookmarks",
        "groups": ["vscode"]
    }
]

But to do that, first I would like to have this issue resolved in VS Code. So, the listing and selection would be much easier.

Even so, I never thought about a specific command to change context/group, and filter the projects from that context while using List Projects. I liked your idea πŸ˜„ .

Thanks for your suggestion πŸ‘

πŸƒ Sneak peek...

Kapture-QuickPick-with-button-and-canSelectMany

I moved to the next milestone, because of an issue I found on a VS Code API (microsoft/vscode#119834). If no solution/fix is found, I'll change a bit on how Tags are created. Instead of a dynamic way, like the video, it would use a User Setting

Feedbacks are welcome πŸ˜‰

A colleague and I was literally just talking about the grouping in this tool, and you sir have come through with a result, this looks amazing!

@fabiospampinato congrats for your extension πŸ‘
I decided to wait for that issue to be released because I want to avoid workarounds in my extensions. I have some bad experiences in the past, and now I prefer to use available APIs only. Your workaround was clever, BTW.

About the nesting limitation, I'm not worried, because it wasn't supposed to support anyway. It would be limited to one level only.

More Issues: