Intent to Ship: Writable directory prompts for the File System Access API

318 views
Skip to first unread message

Austin Sullivan

unread,
Jun 13, 2022, 7:58:43 AM6/13/22
to blink-dev, Ajay Rahatekar

Contact emails

asu...@chromium.org

Explainer

None

Specification

https://github.com/WICG/file-system-access/pull/300

Summary

Allow returning a directory with both read and write permissions in a single prompt for the File System Access API. Currently showDirectoryPicker() always returns a read-only directory (after showing a read access prompt), requiring a second permission prompt to get write access. This double-prompt is a poor user experience and contributes to confusion and permission fatigue among users.


Adds an optional "mode" option to DirectoryPickerOptions which can be specified as "read" or "readwrite".



Blink component

Blink>Storage>FileSystem

TAG review

We did not seek a TAG review given the small scope of this feature. This launch does not add any new capabilities, but merely provides the browser with enough information to combine two permission prompts into one. 

TAG review status

N/A

Risks



Interoperability and Compatibility



Gecko: No signal

WebKit: No signal

Web developers: Strongly positive (https://github.com/WICG/file-system-access/issues/89)

Other signals:

WebView application risks

Does this intent deprecate or change behavior of existing APIs, such that it has potentially high risk for Android WebView-based applications?

No



Debuggability

N/A



Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)?

No - The File System Access API is not supported on Android

Is this feature fully tested by web-platform-tests?

No

Flag name



Requires code in //chrome?

False

Tracking bug

https://crbug.com/1115632

Launch bug

https://crbug.com/1213159

Estimated milestones

105



Anticipated spec changes

Open questions about a feature may be a source of future web compat or interop issues. Please list open issues (e.g. links to known github issues in the project for the feature specification) whose resolution may introduce web compat/interop risk (e.g., changing to naming or structure of the API in a non-backward-compatible way).



Link to entry on the Chrome Platform Status

https://chromestatus.com/feature/6383970247770112

This intent message was generated by Chrome Platform Status.

Yoav Weiss

unread,
Jun 15, 2022, 10:55:23 AM6/15/22
to blink-dev, Austin Sullivan, Ajay Rahatekar
On Monday, June 13, 2022 at 1:58:43 PM UTC+2 Austin Sullivan wrote:

Contact emails

asu...@chromium.org

Explainer

None

Specification

https://github.com/WICG/file-system-access/pull/300

Summary

Allow returning a directory with both read and write permissions in a single prompt for the File System Access API. Currently showDirectoryPicker() always returns a read-only directory (after showing a read access prompt), requiring a second permission prompt to get write access. This double-prompt is a poor user experience and contributes to confusion and permission fatigue among users.


Adds an optional "mode" option to DirectoryPickerOptions which can be specified as "read" or "readwrite".



Blink component

Blink>Storage>FileSystem

TAG review

We did not seek a TAG review given the small scope of this feature. This launch does not add any new capabilities, but merely provides the browser with enough information to combine two permission prompts into one. 

TAG review status

N/A

Risks



Interoperability and Compatibility



Gecko: No signal

WebKit: No signal

Have you asked for signals? https://bit.ly/blink-signals

Austin Sullivan

unread,
Jun 15, 2022, 11:06:10 AM6/15/22
to Yoav Weiss, blink-dev, Ajay Rahatekar
No, I did not realize this was required? showDirectoryPicker() is currently only implemented for Chromium browsers

Joshua Bell

unread,
Jun 15, 2022, 7:00:07 PM6/15/22
to Austin Sullivan, Yoav Weiss, blink-dev, Ajay Rahatekar
Since this is an incremental addition to the existing FSA API, my guess is that the positions there sufficient here:


These two engines give a Negative signal. I would not expect they would comment further on this incremental addition. 



On Wed, Jun 15, 2022 at 8:06 AM 'Austin Sullivan' via blink-dev <blin...@chromium.org> wrote:
No, I did not realize this was required? showDirectoryPicker() is currently only implemented for Chromium browsers

On Wed, Jun 15, 2022 at 7:55 AM Yoav Weiss <yoav...@chromium.org> wrote:


On Monday, June 13, 2022 at 1:58:43 PM UTC+2 Austin Sullivan wrote:

Contact emails

asu...@chromium.org

Explainer

None

Specification

https://github.com/WICG/file-system-access/pull/300

Summary

Allow returning a directory with both read and write permissions in a single prompt for the File System Access API. Currently showDirectoryPicker() always returns a read-only directory (after showing a read access prompt), requiring a second permission prompt to get write access. This double-prompt is a poor user experience and contributes to confusion and permission fatigue among users.


Adds an optional "mode" option to DirectoryPickerOptions which can be specified as "read" or "readwrite".



Blink component

Blink>Storage>FileSystem

TAG review

We did not seek a TAG review given the small scope of this feature. This launch does not add any new capabilities, but merely provides the browser with enough information to combine two permission prompts into one. 

We have filed TAG design review requests for incremental additions to the FSA API (examples: 123) - I think it's worth doing here as well, although I expect support since it's following existing patterns (using an enum value in an options dictionary, with a reasonable/safe default).

 
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADs-7rEsYumZp%3Dd9VuzMixOq5xB7kD0HxrQ2QwYvLM_K%2B7LaLw%40mail.gmail.com.

Austin Sullivan

unread,
Jun 24, 2022, 9:02:27 AM6/24/22
to Mike Taylor, blink-dev, Joshua Bell, yoav...@chromium.org, Ajay Rahatekar
Apologies for the confusion here. I had initially been advised that a TAG review would not be necessary given the scope of this launch (it's an incremental addition which does not add any new capabilities to an API which is Chromium-only), but if you think this should undergo a TAG review then I'm happy to file one.

On Thu, Jun 23, 2022 at 5:17 PM Mike Taylor <mike...@google.com> wrote:
On Wednesday, June 15, 2022 at 7:00:07 PM UTC-4 Joshua Bell wrote:
Since this is an incremental addition to the existing FSA API, my guess is that the positions there sufficient here:


These two engines give a Negative signal. I would not expect they would comment further on this incremental addition. 



On Wed, Jun 15, 2022 at 8:06 AM 'Austin Sullivan' via blink-dev <blin...@chromium.org> wrote:
No, I did not realize this was required? showDirectoryPicker() is currently only implemented for Chromium browsers

On Wed, Jun 15, 2022 at 7:55 AM Yoav Weiss <yoav...@chromium.org> wrote:


On Monday, June 13, 2022 at 1:58:43 PM UTC+2 Austin Sullivan wrote:

Contact emails

asu...@chromium.org

Explainer

None

Specification

https://github.com/WICG/file-system-access/pull/300

Summary

Allow returning a directory with both read and write permissions in a single prompt for the File System Access API. Currently showDirectoryPicker() always returns a read-only directory (after showing a read access prompt), requiring a second permission prompt to get write access. This double-prompt is a poor user experience and contributes to confusion and permission fatigue among users.


Adds an optional "mode" option to DirectoryPickerOptions which can be specified as "read" or "readwrite".



Blink component

Blink>Storage>FileSystem

TAG review

We did not seek a TAG review given the small scope of this feature. This launch does not add any new capabilities, but merely provides the browser with enough information to combine two permission prompts into one. 

We have filed TAG design review requests for incremental additions to the FSA API (examples: 123) - I think it's worth doing here as well, although I expect support since it's following existing patterns (using an enum value in an options dictionary, with a reasonable/safe default).

Just to clarify, does this mean we can expect a TAG review for this intent?

Mike Taylor

unread,
Jun 24, 2022, 9:33:44 AM6/24/22
to Austin Sullivan, blink-dev, Joshua Bell, yoav...@chromium.org, Ajay Rahatekar
No worries. I think an "FYI" TAG review would be appropriate here.

LGTM1 to ship w/ that.

Austin Sullivan

unread,
Jun 24, 2022, 2:19:53 PM6/24/22
to Mike Taylor, blink-dev, Joshua Bell, yoav...@chromium.org, Ajay Rahatekar
An FYI TAG review has been submitted: https://github.com/w3ctag/design-reviews/issues/749

Yoav Weiss

unread,
Jun 24, 2022, 2:49:28 PM6/24/22
to Austin Sullivan, blink-dev, Ajay Rahatekar
On Mon, Jun 13, 2022 at 1:58 PM 'Austin Sullivan' via blink-dev <blin...@chromium.org> wrote:

Anything preventing us from landing the PR?
 
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.

Mike Taylor

unread,
Jun 24, 2022, 2:52:33 PM6/24/22
to blink-dev, Joshua Bell, yoav...@chromium.org, blink-dev, Ajay Rahatekar, Austin Sullivan
On Wednesday, June 15, 2022 at 7:00:07 PM UTC-4 Joshua Bell wrote:
Since this is an incremental addition to the existing FSA API, my guess is that the positions there sufficient here:


These two engines give a Negative signal. I would not expect they would comment further on this incremental addition. 



On Wed, Jun 15, 2022 at 8:06 AM 'Austin Sullivan' via blink-dev <blin...@chromium.org> wrote:
No, I did not realize this was required? showDirectoryPicker() is currently only implemented for Chromium browsers

On Wed, Jun 15, 2022 at 7:55 AM Yoav Weiss <yoav...@chromium.org> wrote:


On Monday, June 13, 2022 at 1:58:43 PM UTC+2 Austin Sullivan wrote:

Contact emails

asu...@chromium.org

Explainer

None

Specification

https://github.com/WICG/file-system-access/pull/300

Summary

Allow returning a directory with both read and write permissions in a single prompt for the File System Access API. Currently showDirectoryPicker() always returns a read-only directory (after showing a read access prompt), requiring a second permission prompt to get write access. This double-prompt is a poor user experience and contributes to confusion and permission fatigue among users.


Adds an optional "mode" option to DirectoryPickerOptions which can be specified as "read" or "readwrite".



Blink component

Blink>Storage>FileSystem

TAG review

We did not seek a TAG review given the small scope of this feature. This launch does not add any new capabilities, but merely provides the browser with enough information to combine two permission prompts into one. 

We have filed TAG design review requests for incremental additions to the FSA API (examples: 123) - I think it's worth doing here as well, although I expect support since it's following existing patterns (using an enum value in an options dictionary, with a reasonable/safe default).

Just to clarify, does this mean we can expect a TAG review for this intent?
 

Austin Sullivan

unread,
Jun 24, 2022, 3:09:34 PM6/24/22
to Yoav Weiss, blink-dev, Ajay Rahatekar
I was waiting for approval on this I2S before landing, but clearly I had my order of operations inverted :)

Also I could've sworn I was already in the WICG, but for some reason the IPR bot doesn't think I am. I've submitted another request...

Austin Sullivan

unread,
Jun 27, 2022, 10:40:51 AM6/27/22
to Yoav Weiss, blink-dev, Ajay Rahatekar
PR is landed

Mike West

unread,
Jun 29, 2022, 10:52:08 AM6/29/22
to Austin Sullivan, Yoav Weiss, blink-dev, Ajay Rahatekar
LGTM2. Thank you for working with the permissions and UX teams to hammer out a reasonable approach here.

-mike


Chris Harrelson

unread,
Jun 29, 2022, 10:57:14 AM6/29/22
to Mike West, Austin Sullivan, Yoav Weiss, blink-dev, Ajay Rahatekar
Can you clarify? Is it tested via wpt-internal, because of the status of the spec in WICG? Or is it not possible to test this feature via that kind of mechanism? If so, is it instead tested via integration tests?
 

Austin Sullivan

unread,
Jun 29, 2022, 11:22:22 AM6/29/22
to Chris Harrelson, Mike West, Yoav Weiss, blink-dev, Ajay Rahatekar
This feature is covered by integration tests. showDirectoryPicker() only has manual WPT coverage, and since this launch only corresponds to changes in permission prompt behavior, WPTs didn't really make sense.

Philip Jägenstedt

unread,
Jun 29, 2022, 11:57:05 AM6/29/22
to Austin Sullivan, Chris Harrelson, Mike West, Yoav Weiss, blink-dev, Ajay Rahatekar
Hi Austin,

Would you mind filing a bug for this testing capability for WPT at
https://github.com/web-platform-tests/wpt/issues?q=is%3Aopen+is%3Aissue+label%3Atype%3Auntestable?

It sounds like what you need here is a WebDriver end point that
configures the browser to automatically resolve a
showDirectoryPicker() call with a directory controlled by WebDriver.

Tests would then do something like `await
test_driver.set_directory_picker('/path/to/a/directory')` before the
showDirectoryPicker() call.

If you think that setup would make sense, I'd be happy to provide more
pointers for how to get it done in the different layers.

Best regards,
Philip

On Wed, Jun 29, 2022 at 5:22 PM 'Austin Sullivan' via blink-dev
> To view this discussion on the web visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/CADs-7rEztSpx1n8CfmKsAuRS0jx7NoSetSkzX2HZjxPTgh4LTg%40mail.gmail.com.

Marijn Kruisselbrink

unread,
Jun 29, 2022, 12:55:03 PM6/29/22
to Philip Jägenstedt, Austin Sullivan, Chris Harrelson, Mike West, Yoav Weiss, blink-dev, Ajay Rahatekar
FWIW, that is more or less how in chrome's tree we already automate some of these "manual" WPT tests. Chrome has two private test APIs, one to set whatever path file/directory pickers should return, and one to get a path to a temporary (writable) directory. That doesn't really help for testing most of the options passed to the various picker methods since their effect generally isn't visible to the web (most options just change what the UI looks like/behaves like), although for this particular one I suppose there at least some web-visible/testable effects.

https://github.com/web-platform-tests/wpt/issues/8114 is at least tangentially related to the missing WP functionality

Austin Sullivan

unread,
Jun 30, 2022, 4:12:19 PM6/30/22
to Marijn Kruisselbrink, Philip Jägenstedt, Chris Harrelson, Mike West, Yoav Weiss, blink-dev, Ajay Rahatekar
I've filed an issue, though I don't have access to add the "untestable" label

Yoav Weiss

unread,
Jul 1, 2022, 3:55:29 AM7/1/22
to Austin Sullivan, Marijn Kruisselbrink, Philip Jägenstedt, Chris Harrelson, Mike West, blink-dev, Ajay Rahatekar
LGTM3
Reply all
Reply to author
Forward
0 new messages