tui: draw session tree rails in full mode only - #1159
Merged
Conversation
Compact mode packs its rows with nothing between them, so the two-cell indentation step already reads as hierarchy and the rails are ink the densest view can't afford. Full mode keeps them: its cards are broken up by detail and spacing rows, and without a continuous rail a child stops looking attached to its parent. Compact indents by exactly the width the rails would have occupied, so switching modes moves no column.
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.
Change
Tree rails become a full-mode affordance. Compact mode indents by exactly the
width the rails would have occupied, so hierarchy still reads and no column
downstream moves.
Why
The two modes have different problems to solve. Compact packs its rows with
nothing between them, so depth alone already carries the hierarchy — the rails
are ink in the view whose entire purpose is density. Full mode breaks each
session into a title row, a detail row, and a spacing row; without a
continuous rail a child stops reading as attached to its parent across that
gap, which is exactly what the rails were introduced for in #1156.
Archived-children rows follow the same rule, so nothing in the list draws a
rail compact mode doesn't.
Screenshots
Compact,
mainon top and this branch below — same fleet, same width. The⑂marks, the▼disclosure, and every title stay in their columns; onlythe rails go.
Full mode on this branch, unchanged — rails still run through the detail and
spacing rows:
Compact, full frame
Tests
display width as the full-mode prefix it replaces, so dropping the rails can
never shift a row.
cargo test --workspacegreen.Relevant binary:
construct(this PR only touchescrates/cli).