Skip to content

Add 'ShowTags' configuration option #4629

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Cway14
Copy link

@Cway14 Cway14 commented Jun 9, 2025

  • PR Description

When working on projects that make heavy use of tags (ie. every commit has multiple tags), it would be nice to be able to hide commit tags.

This commit adds this option.

Discussion with interest for the feature:
#3294

  • Please check if the PR fulfills these requirements
  • Cheatsheets are up-to-date (run go generate ./...)
  • Code has been formatted (see here)
  • Tests have been added/updated (see here for the integration test guide)
  • Text is internationalised (see here)
  • If a new UserConfig entry was added, make sure it can be hot-reloaded (see here)
  • Docs have been updated if necessary
  • You've read through your own file changes for silly mistakes etc

@rivenirvana
Copy link

rivenirvana commented Jun 9, 2025

Thoughts about making it a CommitTagFormat/Style option instead with options "prefix" (default), "postfix", and "hidden"?

@stefanhaller stefanhaller added the enhancement New feature or request label Jun 9, 2025
@stefanhaller
Copy link
Collaborator

I think it's important to have different configurations for normal layout and the maximized view; I find it likely that people will want to hide tags in the normal view, but show them when maximized. One way to do that is what we do for the showGraph config, and make it an enum with the possible values "always", "never", "when-maximized".

Also, I'd consider adding it to the LogConfig struct rather than the Gui struct. It seems to fit well with the other LogConfig options, and the name of the option could then just be ShowTags.

Thoughts about making it a CommitTagFormat/Style option instead with options "prefix" (default), "postfix", and "hidden"?

It's not immediately obvious how this would work for different settings for normal/maximized, which I find more important. Also, I don't really find a "postfix" setting useful for this; you'd have to constantly scroll horizontally to find out if a given commit even has a tag.

@Cway14
Copy link
Author

Cway14 commented Jun 9, 2025

@stefanhaller Thanks for the feedback, those all sound like solid improvements. I will make those changes today :)

@Cway14 Cway14 changed the title Add 'ShowCommitTags' configuration option Add 'ShowTags' configuration option Jun 10, 2025
@Cway14
Copy link
Author

Cway14 commented Jun 10, 2025

This implementation does not refresh the tags after changing the setting. I will look into fixing that tomorrow.

When working on projects that make heavy use of tags (ie. every commit
has multiple tags), it would be nice to be able to hide commit tags.

This commit adds this option.

Discussion with interest for the feature:
jesseduffield#3294
@stefanhaller
Copy link
Collaborator

It's a good addition to allow changing the setting at runtime with the menu, I like that.

What I don't like is that you store the setting in AppState. I know we do this for some other things too, but I'd like to get away from that; see #4602 for a discussion. Unfortunately we don't have agreement on that yet, because Jesse didn't have time to give his input. I'd suggest to pause this PR until we know which direction we are taking with this.

@Cway14
Copy link
Author

Cway14 commented Jun 12, 2025

Yep that works, no rush

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants