Tech
Drawing a Git commit graph that stays narrow: lane layout in TypeScript and SVG
If you've looked at a commit graph for a repo with a few long-lived branches, you've seen this: every branch gets its own column, columns never go away, and eventually the graph is wider than the commit messages next to it.
I ran into this while building the history view for a desktop Git client. The first version gave each line its own column for good. On one 122-commit repo that came to 14 lanes, 276px of graph before any text. This post covers how I rebuilt the layout so lanes get reused, ...
Read the full discussion on Dev.to
This article was aggregated from Dev.to. Click to join the conversation.
View on Dev.to