alefragnani / vscode-project-manager

Project Manager Extension for Visual Studio Code
GNU General Public License v3.0
1.92k stars 226 forks source link

[FEATURE] - Sub-tags #689

Open Roberto286 opened 1 year ago

Roberto286 commented 1 year ago

Hi,

I would like to suggest this feature: A way to create a sort of sub-tags so that we could have like: Work as main tag and all sub-tags inside of it. Example: -Work -Completed Already completed project Already completed project -inProgress In progress project In progress project

And so on. I don't know if it's possible or it's even already a thing, the current behavior when you set multiple tags for the same project seems to be to show it once per tag and i can't find a setting to group them by name for istance

ViniciusFXavier commented 1 year ago

Perhaps it would be necessary to make a change to the tags to accept string or object and sub objects within it.

[
    {
        "name": "Bookmarks",
        "rootPath": "$home\\Documents\\GitHub\\vscode-bookmarks",
        "tags": [
            "Personal" ,
            "Project" ,
            { "name": "VS Code" },
            {
                "name": "Bookmarks",
                "tags": [
                    { "name": "V1" },
                    { "name": "V2" },
                ]
            }
        ],
        "enabled": true
    }
]
alefragnani commented 1 year ago

Hi @ViniciusFXavier ,

I hope no to be this complex 😆 .

Maybe the tags itself could have the hierarchy defined, or use something like tag/subtag/subsubtag syntax, using / or other symbol as a separator.

But, I didn't look at this yet, so I can't say exactly how it would work.

Hope this helps

ViniciusFXavier commented 1 year ago

Fair 😂

C-BoT-AU commented 8 months ago

I just started using the extension and kinda have the same thought or idea. The main reason I use the extension is for quick access to multiple folders or projects and using the tags to group them.

Temporary Solution

I've currently resorted to using Numbers at the start of my tags to separate them (and add dummy separator).

    "projectManager.tags": [
        "0.Personal",
        "0.Work",
        "0----------------",
        // Location and Type
        "1.1.Dockerfiles", // \\SHARED\MyDockerfileBuilds
        "1.1.Scripts and Apps", // \\SHARED\MyScripts
        "1.2.Deployed Docker Container Contents", // \\DOCKERHOST\.docker\appdata\*
        "1.2.Deployed Python Scripts", // C:\Python\MyPythonScripts
        "1----------------",
        // Language
        "2.Python",
        "2.Powershell",
        "2.Bash",
        "2.Dockerfile",
        "2----------------",
        // Other
        "9.Other"
    ]

image

The idea here is that, within section 0 and 1, they would be used more as folders, so select ONE only from each section, then you have other tags that you can add as many as apply.

Proposed Changes

Without changing too much, a simple way to do it might be to create some new 'Tag' Categories. Keep projectManager.tags - For general tagging like we're all used to.

Then single-select options within something like these:

    // Select which "Project Master Folder" ie. Personal, Work to use
    "projectManager.tag.division": [
        "Personal",
        "Work"]
    // Essentially these are subfolders used to group projects together
    "projectManager.tag.group": [
        "Dockerfiles", 
        ".Scripts and Apps",
        "Deployed Docker Container Contents", 
        "Deployed Python Scripts"]
    // Add a Status tag for each one so that they can be grouped together or displayed next to the name
    "projectManager.tag.status": [
        "Not Started",
        "In Progress",
        "Completed",
        "Abandoned"
    ]
    // Add a Priority tag for each one (User could replace with a number scale, or other wordings)
    "projectManager.tag.priority": [
        "Low",
        "Medium",
        "High"
    ]

Even separating out or organising the tags somehow would be great so you can have tags for languages used in the project, but they're not jumbled up with other miscellaneous tags.

    // list of popular languages, or import from elsewhere in VS Code and tick as many as apply to each project (or autodetect)
    "projectManager.tag.languages": [
        "C",
        "C++",
        "Python"
    ]

I don't know how to make a version tag work, as this would need to be a string entry for each one, but the way tags work are you select one of the available tags, so without entering every possible iteration of v0.000.0000100abc, I don't know...

Each of these could then be either enabled or disabled by default, so it's not there for those who don't want it.

I assume that creating new 'tag' groups, even like projectManager.tags2 wouldn't be too hard, I don't know how to make it only a single select option, or how that would integrate with your current sort/filter logic.

Just my thoughts. Some of this is based off my use of Obsidian and the ability to add custom properties to the header of notes. I have few templates I use with similar things like this in it. Full customization would be hard, but some additional limited options like these would be great.