-
Notifications
You must be signed in to change notification settings - Fork 283
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(sidebar/#2084): Don't show sidebar if no folder is open #2711
Merged
Conversation
This file contains 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
Closed
bryphe
added a commit
to revery-ui/revery
that referenced
this pull request
Nov 23, 2020
This is a very basic, naive implementation of `openFileDialog` - enough to open single files and folders to unblock onivim/oni2#2711
5 tasks
bryphe
added a commit
that referenced
this pull request
Nov 25, 2020
__Issue:__ Onivim may crash on OSX with `Cmd+P` when launching from finder for the first time __Defect:__ The default directory for Onivim was set to the `Documents` folder. However, Onivim may not actually have permission to access this folder due to OSX's sandboxing. __Fix:__ If we don't have permission, don't set a workspace and fall-back to `Cmd+P` opening active buffers. #2711 helped this particular scenario, by setting up state and UI for the case where no workspace is opened / the working directory is not valid. However, there is still the case that we may have persisted the `Documents` folder, and we could still get that or another invalid folder coming from persistence. Therefore, we need to check permission for the folder prior to changing directory. __TODO:__ - [x] Remove getWorkingDirectory in QuickMenuStoreConnector - [x] Test on OSX w/ no persistence set - [x] Test on OSX w/ persistence set to 'documents' folder - [x] Test on Windows w/ no persistence set - [x] Test on Linux w/ no persistence set Fixes #2742
bryphe
added a commit
that referenced
this pull request
Nov 25, 2020
With #2711 , we now have an 'Open Folder' button when no workspace is opened: ![open-folder](https://user-images.githubusercontent.com/13532591/100265104-96203580-2f04-11eb-9db3-79154c03192d.gif) This just implements a small tweak to always have the `Workspace: Open Folder` option available in the command palette, even when one is currently opened (for changing folders). Fixes #730
Closed
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.
Issue: The first-run experience on some platforms isn't ideal - the explorer can take long to load, or in the case of MacOS, ask the user for permission to their documents folder - not a great first-time experience!
Defect: If no folder was opened, we'd try and default to the user's documents folder - but this isn't really ideal for the above reasons.
Fix: Create a 'no-workspace-opened' state, and don't show the sidebar in that case. Once a folder is explicitly specified, or we have one from persistence, then we can go ahead and show it. In addition, for the file explorer, add an empty experience (an open folder button) if the user opens the sidebar.
Fixes #2084
TODO:
$initializeWorkspace
with the initial directory.master
once validated everywhere