lazygit icon indicating copy to clipboard operation
lazygit copied to clipboard

Add grouping for tags

Open Jerakin opened this issue 1 year ago • 2 comments

Is your feature request related to a problem? Please describe. When working on in a mono repository it is common to prefix all release tags with the project being released. Releasing a new version might require you to release a lot of sub packages meaning the tags count explode. This makes the menu hard to parse/read.

Describe the solution you'd like Add grouping of tags (and maybe branches1), enabled through some setting toggle.

The tags current could look like this

project/0.1.1
some_other_project/0.1.1
sub_project/0.1.0
project/0.1.0
some_other_project/0.1.0

I wish that it was collapsed into

project/
some_other_project/
sub_project/

To then see the tags that belongs to a group you would navigate into it (like what happens if you click Enter within [4] Commits)

For bonus points it would be awesome if you could see the latest tag easily maybe like this (with different colors)

project/ (0.1.1)
some_other_project/ (0.1.1)
sub_project/ (0.1.0)

1 If this is added for branches then maybe only branches of a certain age are grouped (maybe that's a different setting?). That way your common branches stay at the top but branches that are older are hidden to clean up the interface.

Jerakin avatar Aug 07 '24 09:08 Jerakin

Instead of going into a folder by pressing enter, we could make it a tree view like in the Files panel. (It's unclear to me whether folders should be collapsed or expanded by default). We could even support the ` key to toggle between tree view and flat view, for those who prefer one or the other, again like in the Files panel.

One big downside is that filtering is problematic in tree views. We currently don't support it in the Files view because it was too difficult to get the behavior right, so we only support searching there. Filtering is essential for branches and tags though (I think).

Actually I wonder whether filtering might be a good enough workaround for the problem; typing /some_other_project already gives you only the tags for some_other_project, isn't that good enough?

stefanhaller avatar Aug 07 '24 16:08 stefanhaller

My biggest difficult is that it's hard to get an overview.

For our workflow we use tags exclusively for versions. To create a new version we simply create a new tag and the CICD pipeline takes care of the rest. It is common for me to release 2-3 sub projects at a given time, all individually versioned. Given that there are so many projects I can not remember the latest version of all of them, when I release them I first have to find the latest relevant tag in the list (which to be fair the filtering could help with). Given that the tag list can have 10 entries, if it was implemented as some_other_project/ (0.1.1) I could see the latest version of the 10 latest versioned projects (which would be enough for me as of now, and even later I would only need to scroll a bit). Removing the need for any key input.

Tree view would be better, but I would still love the extra information of the latest tag. If it isn't easy to get right then I wouldn't mind having the simpler option I proposed.

I would think that this is only an issue if you are working on a mono repo, so I doubt it's a common issue.

Jerakin avatar Aug 08 '24 09:08 Jerakin

I'm going to jump in here to add my +1 to grouping, especially for branches.

A tree view would be awesome for branches. In our project, some of us have a lot of POC branches that we can't delete until stakeholders make a decision, and my branches tab is super cluttered with stuff I can't clean up. It would be really nice to be able to group them so they can be out of sight until they are needed!

This is obviously not a showstopper for me, but it would be really nice.

Anyways, just going to also use the opportunity to send all my love and kudos to this amazing project and its maintainers!

lucastraba avatar Nov 08 '24 15:11 lucastraba