-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[electron] Add ability to create folder in OpenDialog on MacOS #7208
[electron] Add ability to create folder in OpenDialog on MacOS #7208
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
packages/filesystem/src/electron-browser/file-dialog/electron-file-dialog-service.ts
Outdated
Show resolved
Hide resolved
Older versions of MacOS don't have this icon (see my screenshot), so the new button was badly needed :)
I disagree, this type is already brought in with the Electron dependency and partially copied here, here and here. Perhaps I should reword the comment so it doesn't say "copied"? @marcdumais-work what do you think? |
+1 ; this case IMHO we're not literally copying code - we're just using an Electron API as per their documentation. |
Signed-off-by: Rob Moran <rob.moran@arm.com>
e397237
to
3cecef9
Compare
Comment updated :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I verified the changes on macOS and it worked great :)
I also verified on Linux (Ubuntu) and could not find any regressions.
Thanks @vince-fugnitto |
Signed-off-by: Rob Moran rob.moran@arm.com
What it does
With reference to the electron docs for the version we use (4.2.12), the file dialog on MacOS doesn't show the 'New Folder' button unless
properties.createDirectory
has been set.This is restrictive behaviour when a user needs to use the file dialog to select a folder (
properties.openDirectory
set to true).Short of implementing this feature for all other platforms (Windows, Linux, Browser), an easier approach is to set the
createDirectory
property wheneveropenDirectory
is set on MacOS only.How to test
Ensure the
New Folder
button appears when using the openDialog for folders in Electron for MacOS (e.g. open a new workspace).Review checklist
Reminder for reviewers