Skip to content
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

Hide Remote HEAD Symbolic References via Extension Setting #407

Closed
wilkmaciej opened this issue Nov 5, 2020 · 5 comments
Closed

Hide Remote HEAD Symbolic References via Extension Setting #407

wilkmaciej opened this issue Nov 5, 2020 · 5 comments
Assignees
Labels
feature request Feature request
Projects
Milestone

Comments

@wilkmaciej
Copy link
Contributor

Describe the feature that you'd like
Option to filter branch labels

Additional context (optional)
I just want to hide some branch labels to have clear view on the graph

@mhutchie
Copy link
Owner

mhutchie commented Nov 5, 2020

Hi @wilkmaciej,

Thank you for raising this feature request, and associated pull request!

From the information you've provided, it's still unclear to me what the use case is for hiding a branch labels. By hiding a branch label, the user loses all actions available for branches (check out, rename, delete, merge, push, pull etc.), and would be left with commits being shown, but no way of knowing what branch they're on.

  • If the user doesn't need a branch any more, I would have thought they would just delete the branch.
  • If the user does wants to keep the branch, but just not see it, they can use the filtering options for branches, which includes:
    • Specific Branch Names
    • Custom Branch Glob Patterns
    • Configuring the initial branches for the repository via the Repository Settings Widget
    • Custom Branch Glob Patterns to exclude - coming soon in an existing open feature request

Would you please provide some more details, and some example branch names for the use case you have, so I can better understand the motivation for this feature request.

@mhutchie mhutchie added the needs more info More information has been requested label Nov 7, 2020
@wilkmaciej
Copy link
Contributor Author

I just wanted to hide origin/HEAD label because personally I'm not using it and i wanted the graph to look more clean. :P

@mhutchie
Copy link
Owner

Thanks for the clarification @wilkmaciej,

I definitely now understand the use case you have for this functionality, and agree that there should be a way to hide <remote>/HEAD labels in the Git Graph View. I think a decent portion of users would value this capability.

I think this functionality needs to be reframed slightly, and made more specific to the use case, as after reading your initial feature request and pull request I would have never thought to use it to resolve the use case you have. If we released it in it's current form, I think many users may not realise that it could be used to solve this problem, and therefore not get as much value from it. Unless you have other potential use cases that you could let me know, I think that the <remote>/HEAD use case is what almost everyone would use it for, and we should focus on it. (I've got some feedback from several other users that feel the same as me)

I think it would be best to have a new boolean extension setting for "Repository: Show Remote Heads", that is enabled by default, but can be unchecked by the user to hide <remote>/HEAD labels in the Git Graph View, and remove them from the branches dropdown. I think this simpler feature, which still resolves your use case, will ultimately be used by more users than the current generalised solution, as it's clearer to users the benefit it can offer, and is just a checkbox instead of requiring them to carefully construct a regular expression. This alternative behaviour would only need some simple changes in ./src/config.ts and ./src/dataSource.ts, none in ./web/*.ts.

If you have other use cases that you think necessitate the current generalised solution, please let me know. If not, it would be great if you would implement this alternative solution, however I'm also more than happy to do it myself for the next release.

FYI: I really appreciate that you generalised the functionality, I assume with the intention that it would be able to be used by more users for different use cases. Almost always I try to do the same with everything I implement, the only exceptions I ever make is when a more specific solution is easier for users, will satisfy most of their needs, and ultimately be used by more people.

@wilkmaciej
Copy link
Contributor Author

Hello
Yes i generalized the functionality to allow some users more advanced configuration. I changed code according to your response.
I'm not entirely sure if everything is perfect. You mentioned <remote>/HEAD i used strictly origin/HEAD. I don't know if i should change that or not. I'm not very familiar with extension code so maybe u will find better solution.

@mhutchie mhutchie changed the title Branch labels visibility Hide Remote Head Symbolic Refs Nov 15, 2020
@mhutchie mhutchie removed the needs more info More information has been requested label Nov 15, 2020
@mhutchie mhutchie added this to To Do in Git Graph via automation Nov 15, 2020
@mhutchie mhutchie moved this from To Do to In Progress in Git Graph Nov 15, 2020
@mhutchie mhutchie added this to the v1.28.0 milestone Nov 15, 2020
@mhutchie mhutchie changed the title Hide Remote Head Symbolic Refs Hide Remote HEAD Symbolic References via Extension Setting Nov 15, 2020
@mhutchie
Copy link
Owner

This will be available in v1.28.0.

I really appreciate that you've taken the time and effort to contribute to Git Graph, and been able to implement new functionality that will be used by many users. Please read my response to your Pull Request #408 (comment) for my full thanks, and additional information.

If you'd like to use it before the next release, you can download v1.28.0-beta.1, and install it following the instructions provided here.

Git Graph automation moved this from In Progress to Ready For Release Nov 15, 2020
@mhutchie mhutchie moved this from Ready For Release to Released in Git Graph Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request Feature request
Projects
Git Graph
Released
Development

No branches or pull requests

2 participants