Repository navigation
feat(git-graph): draw a six-lane window instead of widening the gutter - #1666
Merged
Merged
Conversation
A lane is two cells and the subject starts after the gutter, so a log with ten lines of work open pushes every subject twenty cells right. The picture now stops at six lanes: a line past the sixth is drawn inside the last column, sharing it with the other lines out there. It keeps its commits and their dots; it just no longer has a column of its own, and the six colours are the six columns. Capped in both producers — the host's picture (what the phone and desktop decode) and the TUI's own — so all three surfaces draw the same gutter.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gutter stopped at six lanes: for any line of work past the sixth, its commits
keep their dots but are drawn inside the last column, sharing it with the other
lines past the window. The picture stays 12 cells / 91 pt wide instead of growing
by two cells per extra lane (a history with ten lanes open used to take 40 cells
on a phone, leaving the subject about one word).
LANE_WINDOW = 6in both producers (host/src/git_history.rs,tui/src/workbench/git_panel.rs)so the TUI, the phone and the desktop draw the same gutter.
Assertions:
the_gutter_stops_widening_past_the_window(TUI): with ten lanes, every row'sgutter is ≤ 12 cells and equal in width, and a commit on the tenth lane still
has its
oin that column.the_picture_stops_widening_past_the_window(host): a real ten-branch repo islaid out and every row is ≤ 12 cells, dots sit on even cells and never past the
window, and one row uses all six columns.
docs/guide/tui.mdandtui.zh-CN.mddescribe the cap;packages/git-graph/src/palette.tsrecords why six colours still stand.
User-visible changes
gutter by two cells per extra lane (ten lanes took 40 cells on a phone). After,
LANE_WINDOW = 6keeps the gutter at 12 cells in the TUI, desktop and mobile;commits past the sixth lane keep their dots but share the last column.
Revert
3f502d25eto restore the widening gutter.