Repository navigation
fix: the Files tree keeps its opened folders while the panel is hidden - #242
Merged
Merged
Conversation
…n or the layout changes
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.
Which folders the reader had opened lived in
ResourceTree's own state. The tree unmounts whenever Files is hidden on a wide screen, whenever the drawer closes on a narrower one, and when the window crosses the 1100px breakpoint, so each of these folded the library shut again, apart from the open file's folders.useFolderExpansioninfeatures/resourcesholds the opened folders, one set for Files and one for Attachments. The workbench calls it, so the state outlasts the panel; it is passed down throughResourcePanelto each tree.The folded-folder integration test now hides and reopens Files before any file is open, and fails without the change.
Checked end to end on the tutorial project at 1500px and 900px:
examplesandguidestay open after Hide/Open files, after the drawer closes and reopens, and after resizing across the breakpoint both ways.guide/Labs.mdfrom Recent still opensguide.Closes #195