Repository navigation
feat(rex): zoom the pane for diffs and the graph - #6
Merged
Merged
Conversation
In a Rex pane, z zooms rex-git to fill its window while a diff or the commit graph is open. Leaving them, or quitting, puts the layout back. The Rex calls move to src/rex.rs, which the pane title now uses too.
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.
This is the bottom layer of four. rex-git usually sits in a narrow pane, about 30% of a Rex window, so a diff wraps a lot and long lines are hard to read. Until now the only Rex-specific thing rex-git did was keep its pane title up to date.
What changed
zzooms rex-git's pane to fill its Rex window. Pressing it again unzooms.Esc, a click on the header), or quitting, puts the layout back.z zoom/z unzoomsecond, so it still fits in a narrow pane. The hint only shows in Rex. Outside Rex,zsays "zoom works in a Rex pane".src/rex.rs, which the pane title uses too.Evidence
This is from a throwaway Rex session with a temp repo, rex-git split beside a shell.
zoomed_block_idcomes fromrex session inspect. I captured it on the top of the stack, which has the same zoom code.The diff footer, unzoomed:
(
o opencomes from the next layer.)cargo fmt --check,cargo clippy --all-targetsandcargo test(40 tests) pass on this branch.Not checked: if you unzoom with Rex's own shortcut, rex-git still thinks it's zoomed, so the next
zsends "off" and appears to do nothing once.ELI5
The git panel is skinny. Press
zwhile reading a change and it fills the whole window; go back and everything returns to where it was.