Add context menu to file explorer sidebar#653
Merged
dzhou121 merged 2 commits intolapce:masterfrom Jun 23, 2022
Merged
Conversation
Collaborator
|
Thanks so much for working on this. I think it would be better if the file/folder name is in the sidebar, which gives you a direct visual confirmation of where the file/folder is. |
f387b5e to
20c1503
Compare
1114a8e to
63b93ad
Compare
Member
Author
34 tasks
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.

Closes #621
This PR adds a context menu to the file explorer sidebar that allows the following actions:
The inputs for what the name should be used are taken in through the palette input. This is simpler to implement than something like vscode's method of editing the filename in the sidebar.
This does however raise further the probable existing issues around files being renamed out from under Lapce, and new files being created. As well, there's more potential now for cross platform issues where P
Notes:
FileExplorerFileListto take up the full height of the sidebar. This is in order to capture right clicks in the empty space below the files. This would have to be changed around (such as moving right click handling up a 'layer') if there were other areas added to the file explorer sidebar later on, but would not be hard to do.get_node_by_indexis renamedget_node_by_index_mutand an immutable version is added