-
Notifications
You must be signed in to change notification settings - Fork 65
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
Set initial directory to be opened with chooseFileSystemEntries #94
Comments
+1 to this. My use case is an “installer”, which lets the user select a directory on their machine, to which the installer then writes a (large) number of files. The thing is, the desired location is always one of three paths, depending on the operating system ( As a workaround, I currently note down these three locations, so that the user can copy-paste them into the directory picker manually… but most users probably won’t realize they can do that. |
#261 has a proposal for an API for this, feedback welcome. |
@mkruisselbrink I just took a quick look and this proposal seems to cover the requested functionality quite well. I particularly like the ability to specify Great work to you & team! Happy to provide feedback on anything else if it'd be helpful. We're building around the Chrome FS API quite heavily for upcoming functionality on stackblitz :) |
After some more internal discussion we're currently actually leaning towards not having separate |
…#261) * Add initial explainer for suggestedName, startIn and related options. This describes a proposal for #85, #144, #94 amd #80. Co-authored-by: a-sully <[email protected]> Co-authored-by: Thomas Steiner <[email protected]>
…related options. (#261) * Add initial explainer for suggestedName, startIn and related options. This describes a proposal for #85, #144, #94 amd #80. Co-authored-by: a-sully <[email protected]> Co-authored-by: Thomas Steiner <[email protected]> SHA: 282dcba Reason: push, by @mkruisselbrink Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
If a user is trying to open a new folder, I'd prefer to have filepicker start in the parent dir of a provided file handle because the user already granted permission to its existing directory (i.e. it wouldn't make sense for the user to choose a subfolder within that directory). Otherwise the user will have to manually back out at least one level to explore directories/folders that haven't already been granted. |
This adds the options as described in https://github.com/WICG/file-system-access/blob/main/SuggestedNameAndDir.md. Fixes #85, fixes #144, fixes #94 and fixes #80 Co-authored-by: Austin Sullivan <[email protected]>
…er methods. (#287) This adds the options as described in https://github.com/WICG/file-system-access/blob/main/SuggestedNameAndDir.md. Fixes #85, fixes #144, fixes #94 and fixes #80 Co-authored-by: Austin Sullivan <[email protected]> SHA: 3309115 Reason: push, by @mkruisselbrink Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Similar to #85, but instead I think that
chooseFileSystemEntries
should accept an optional file/dir handle that it will be initially opened to.Passing a file/dir handle ensures the browser knows exactly which location to open w/ permissions (i.e. no string parsing/etc). Using handles makes a lot of sense, as the only time a web app should be instructing
chooseFileSystemEntries
to open a specific directory is when it already knows that directory exists (i.e. it has already received the handle in a previous call tochooseFileSystemEntries
).Besides the use cases mentioned in #85, this will enable file tree UIs (like the one we have on stackblitz.com) to include "create file / folder" buttons that open the picker in the desired directory the user clicked in.
IMO this is incredibly important (and the only omission I've found in this spec) for providing realistic filesystem UX.
The text was updated successfully, but these errors were encountered: