klaus
klaus copied to clipboard
Show branches graphically
It would be nice if klaus had the functionality to show branch histories graphically, similarly to how gitg or giggle do it.
This has also just come up on the mailing list: https://groups.google.com/forum/#!topic/klaus-users/OKyd4suHN2g
My thoughts on this feature: I’m not sure how well these graphs fit into the general idea and current state of klaus. Depending on the way it's implemented (client-side or server-side), it requires tons of Javascript hackery and a JSON API, or it requires an additional server-side dependency and makes the server side even slower.
Maybe it's just me, but I've never found these graphs to be telling much. So right now I don't think it's worth the effort (implementation complexity, performance penalty, ...).
Perhaps this feature is just out of scope of what is useful to do in a browser. klaus was never intended to make all Git CLI workflows possible in the browser.
That being said, if someone can come up with a simple, non-intrusive, plug-in* implementation, I'm all for it :-)
*meaning the dependencies are optional and you can disable it if you don't wish to use it.
I was thinking of something simple, similar to how git log
can draw using ascii graphics, perhaps using unicode box drawing characters. I don't think this would involve anything super-complex on either client or server side.
I don't think unicode characters are a good way to represent graphs in browsers. We have 2014 and there is no reason not to use SVG for such graphs. I like the unobtrusive way Bitbucket goes, which just displays a graph for the current visible commits.
Similar to Jonas, I find commit graphs not really meaningful (I use graphs in git log
but I have way more local branches than public branches).
Having looked at Bitbucket, I see it uses a canvas element. I agree with posativ that graphics would look prettier than box drawing characters (having said that, I wrote a tree browser for a programming language using box drawing characters a few years ago and I thought it looked OK), however box drawing characters have the advantage that they would be easier to code and not introduce dependencies.
jonashaag:
klaus was never intended to make all Git CLI workflows possible in the browser.
Actually I think that'd be a pretty good goal for klaus.
My thoughts on this feature: I’m not sure how well these graphs fit into the general idea and current state of klaus. Depending on the way it's implemented (client-side or server-side), it requires tons of Javascript hackery and a JSON API, or it requires an additional server-side dependency and makes the server side even slower.
It could be done by inserting the json data into the page and then drawing the graph using an svg drawing library. I'll see if I can implement something simple like that on my local machine later. Seems like a fun thing to do.
I'll see if I can implement something simple like that on my local machine later. Seems like a fun thing to do.
Please don't be disappointed if I'm not willing to merge it though...
Do you want to implement the other git module first or do you not want to work on this application anymore. If the latter is the case then I'll just fork the repo and continue working on it myself under a different name or something.
---- Jonas Haag wrote ----
I'll see if I can implement something simple like that on my local machine later. Seems like a fun thing to do.
Please don't be disappointed if I'm not willing to merge it though...
— Reply to this email directly or view it on GitHub.
I don't want waste time on this particular feature, that's all.