-
Notifications
You must be signed in to change notification settings - Fork 308
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
[feat] "New Folder" option for Mac file dialogs #949
Comments
This should be the relevant obj-c api: https://developer.apple.com/documentation/appkit/nssavepanel/1532626-cancreatedirectories (as shown in tauri-apps/tauri#6435) |
Is there an alternative way to get the "New Folder" button in the meanwhile? |
Yeah, has anyone figured anything out yet? |
As far as I can see in |
After a second look, seems like |
Opened a PR and since this will require a new version of |
Thanks! |
* feat(dialog): allow setting `canCreateDirectories` on macOS closes #949 * Discard changes to plugins/log/src/api-iife.js * Discard changes to plugins/store/src/api-iife.js * Discard changes to plugins/window-state/src/api-iife.js * Update plugins/dialog/src/commands.rs Co-authored-by: Fabian-Lars <[email protected]> * Update plugins/dialog/src/commands.rs Co-authored-by: Fabian-Lars <[email protected]> * Update plugins/dialog/src/lib.rs Co-authored-by: Fabian-Lars <[email protected]> * Update plugins/dialog/guest-js/index.ts Co-authored-by: Fabian-Lars <[email protected]> * Update plugins/dialog/guest-js/index.ts Co-authored-by: Fabian-Lars <[email protected]> --------- Co-authored-by: Fabian-Lars <[email protected]>
Describe the problem
I'm not able to show the native "New Folder" button in Mac file dialogs to let users create a new folder directly in the dialog according to the docs.
I'm building an app where the user has to choose a location for their "project". The project location likely doesn't exist yet, so they'll have to create it. Because they can't create the location inline in the file dialog, they have to jump out of the app, create the directory, come back to the app, and then select it.
Describe the solution you'd like
In Electron, you can pass the
createDirectory
flag to show a native "New Folder" button in the Mac file dialog (link to relevant docs).Seems like this is the cleanest solution, and Tauri could expose this option.
Alternatives considered
User can always go outside the app to create the directory.
Additional context
I understand Tauri uses rfd for file dialogs. Maybe this needs to be implemented there first? It seems it's not supported at the moment.
Love what you folks are doing with Tauri! 🎉
The text was updated successfully, but these errors were encountered: