-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
WIP: Further improvements to Git Graph #12209
Conversation
Signed-off-by: Andrew Thornton <art27@cantab.net>
This seems like a overly complicated approach. I would use something like https://github.com/zenozeng/color-hash to convert a branch name to a static color. On dark theme (use I also once made a personal fork of Also see #10217 (comment) |
Git branches are misnamed they are simply named commits - once a commit has been made there is no way to determine which of the parents had the branch name, or of any of them had it. It would be lovely if we could apply fixed names to flows. There is no such naming system possible. So as far as I can see this is the simplest approach. |
Even determining whether to create a new flow or end a flow is not even fixed: Given the following glyphs:
Which flow continues, which flow creates a new flow? If we want pinning we will also have to apply #12142 - fortunately that appears to have no detrimental effects on my test machine although it definitely seems wasteful. |
But I think you're right in another way flow determination will have to go to the server for the same reason as #12142 |
Regarding colors, I just suggest a static list of 16 (or more if you like, but the more there are, the less distinction is possible) predefined colors, see #10217 (comment). It's the simplest way and we can tweak the colors to always look good. |
Rendering the git graph on the server means that we can properly track flows and switch from the Canvas implementation to a SVG implementation. * This implementation provides a 16 limited color selection * The uniqued color numbers are also provided * And there is also a monochrome version *In addition is a hover highlight that allows users to highlight commits on the same flow. Closes #12209 Signed-off-by: Andrew Thornton art27@cantab.net Co-authored-by: silverwind <me@silverwind.io>
Signed-off-by: Andrew Thornton art27@cantab.net