Repository navigation
fix(ui): restore tree pane when a one-file review grows - #386
Merged
Merged
Conversation
a one-file review collapses the tree pane, and nothing brought it back when the file list grew later, for example after toggling untracked files with `u`. The pane kept zero width and the diff kept the full width until the next resize. handleFilesLoaded now restores the tree width once the list holds more than one file, unless the pane was hidden with `t`.
the comment on contentWidth cited a one-file review growing to several files as a way to reach treeWidth 0 with the pane shown. That path now restores the width in `fitPanesToFileCount`, so the example no longer holds. The reason for keying on the resolved width stays.
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.
a one-file review collapses the tree pane, and nothing restored it when the file list grew later, for example after toggling untracked files with
u. The pane kept zero width and the diff kept the full width until the next resize.handleFilesLoadednow restores the tree width once the list holds more than one file. A pane hidden withtstays hidden.the restore logic is taken from @codemageddon's prototype in #377.