WICG / file-system-access

Expose the file system on the user’s device, so Web apps can interoperate with the user’s native applications.
https://wicg.github.io/file-system-access/
Other
670 stars 66 forks source link

Support for remembering accepted permission up to a certain amount of time #285

Closed Jarred-Sumner closed 3 years ago

Jarred-Sumner commented 3 years ago

Say you're building a browser-based bundler.

The user makes a change to their local code and refreshes the page.

Immediately, they're hit with a permissions request.

Rather than instantly showing a permissions dialog, you might provide a little context – something like this: image

Then, they make a small tweak. Maybe change a button color in css. And click refresh.

Then they see this again:

image

At this point, they're probably getting a little annoyed and might go back to using a Node.js-based bundler.

As a workaround, the product could suggest the user keep a separate tab open. Something like this (notice the link at the bottom): image

But it's not great. Native apps don't have to ask you to run two copies of the same app in order to maintain access to a directory.

I understand there are real privacy concerns with an API like this and any change like this would require careful consideration. But without some kind of persistent permissioning, its tough to see how web-based software that needs persistent filesystem access can provide a good user experience.

mkruisselbrink commented 3 years ago

This is not so much a spec issue as more of an implementation issue. But this is definitely something we're considering/working on in Chrome. The exact behavior we're still trying to figure out, but we are very much aware of the problem.