Skip to content
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

Browser compatibility data on OPFS page #37004

Open
josephrocca opened this issue Nov 27, 2024 · 10 comments
Open

Browser compatibility data on OPFS page #37004

josephrocca opened this issue Nov 27, 2024 · 10 comments
Labels
Content:WebAPI Web API docs needs decision The task needs consensus through discussion needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.

Comments

@josephrocca
Copy link

josephrocca commented Nov 27, 2024

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system

What specific section or headline is this issue about?

Browser compatibility

What information was incorrect, unhelpful, or incomplete?

At the top of the page there's some text "supporting browsers" which link to this URL: https://developer.mozilla.org/en-US/docs/Web/API/File_System_API/Origin_private_file_system#browser_compatibility

But there's no browser compat section on that page, so nothing happens when you click it.

What did you expect to see?

Browser compat data

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

Thanks!

MDN metadata

Page report details
@josephrocca josephrocca added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Nov 27, 2024
@github-actions github-actions bot added Content:WebAPI Web API docs and removed Content:WebAPI Web API docs labels Nov 27, 2024
@josephrocca josephrocca changed the title Browser compatibility on OPFS page (invalid URI fragment) Browser compatibility data on OPFS page Nov 27, 2024
@Josh-Cena
Copy link
Member

Duplicate of mdn/yari#11290

@Josh-Cena Josh-Cena marked this as a duplicate of mdn/yari#11290 Nov 27, 2024
@Josh-Cena Josh-Cena closed this as not planned Won't fix, can't repro, duplicate, stale Nov 27, 2024
@Josh-Cena Josh-Cena added closed: duplicate This issue or pull request already exists and removed needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. labels Nov 27, 2024
@josephrocca
Copy link
Author

Hey @Josh-Cena, this was originally about the broken link, because I though the compat data was on compiled in one spot on the File System Access API page, but then I realized that it's nowhere to be found, so I updated the issue to be about the compat data itself.

I notice that there are other issues here about lack of compat data which are open, so I assume this one should stay open?

I unfortunately don't have comprehensive info, but after some research just now, this is what I determined:

Notable quote from a popular database: https://rxdb.info/rx-storage-opfs.html

From the beginning of 2023, the Origin Private File System API is supported by all modern browsers like Safari, Chrome, Edge and Firefox. Only Internet Explorer is not supported and likely will never get support.

@Josh-Cena
Copy link
Member

Support is tied to particular methods and interfaces, not to an API as a whole. For example, you will want to find support data on https://developer.mozilla.org/en-US/docs/Web/API/StorageManager/getDirectory.

@josephrocca
Copy link
Author

@Josh-Cena AFAIK the above versions I gave are for nagivator.storage.getDirectory, since that's all you need for OPFS support. IIUC, everything else is specified "upstream" since it's used for regular File System Access API stuff.

@josephrocca
Copy link
Author

josephrocca commented Nov 27, 2024

Ah, all the versions are available on the FileSystemSyncAccessHandle page from the first row of the compat table, since this is only available in OPFS.

Looks like they align with the versions I specified above - except that not sure what Safari version macOS 12.2 corresponds to, or if that was a typo in their release notes. It definitely wasn't available in Safari 12.2 on macOS. I think I trust the FileSystemSyncAccessHandle data - i.e. Safari 15.2 on both iOS and macOS.

So in summary: It seems like it'd make sense to add a single row on the Origin Private File System page with nagivator.storage.getDirectory, which uses the FileSystemSyncAccessHandle versions.

@Josh-Cena
Copy link
Member

Our convention is to not include compatibility information in API landing pages, hence the issue I linked which will remove the reference to the browser compat section if it doesn't exist.

@josephrocca
Copy link
Author

josephrocca commented Nov 27, 2024

Is this convention strict? I noticed that this API landing page does have xr compatibility data:

https://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API

Which is copied from here:

https://developer.mozilla.org/en-US/docs/Web/API/Navigator/xr

I'm wondering how people are supposed to work out whether a browser supports OPFS. If analogy to WebXR example isn't possible, would it e.g. be possible to add a "Browser support" section at the bottom of the page which has a sentence or two that directs people to https://developer.mozilla.org/en-US/docs/Web/API/StorageManager/getDirectory ? Or some other way to help people find it?

@Josh-Cena
Copy link
Member

Josh-Cena commented Nov 27, 2024

It's not strict, but we have far more cases where we do hold it than where we don't. Some APIs, like WebXR, has a single entrypoint (navigator.xr), so its support story can be told entirely through that interface, so we are more open to including it; other places that have multiple entrypoints and extensions will become very messy. Consider the extreme case: what do you mean when you say "supports the DOM API"? The norm we have established is that API landing pages are just for tutorial purposes: they build an overview of what's available and how you use them. The compat data is considered a technical detail that's tied to each individual feature, not to the API surface as a whole, so we don't put it in the landing page. In the worst case, you would need to look up each individual API you are using, since each one of those methods/interfaces may have a different support status.

@josephrocca
Copy link
Author

WebXR, has a single entrypoint

That makes sense, but that's exactly the case we have here, right? I.e. 'OPFS' as a feature is really just nagivator.storage.getDirectory - and from there onwards it's basically just normal File System Access stuff.

I assume this is why, for example, web.dev links to the nagivator.storage.getDirectory page if you click "Source" their support data:

https://web.dev/articles/origin-private-file-system

image

@Josh-Cena
Copy link
Member

That sounds reasonable—let's see what others say.

@Josh-Cena Josh-Cena reopened this Nov 27, 2024
@Josh-Cena Josh-Cena added Content:WebAPI Web API docs needs decision The task needs consensus through discussion and removed closed: duplicate This issue or pull request already exists labels Nov 27, 2024
@github-actions github-actions bot added the needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened. label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Content:WebAPI Web API docs needs decision The task needs consensus through discussion needs triage Triage needed by staff and/or partners. Automatically applied when an issue is opened.
Projects
None yet
Development

No branches or pull requests

2 participants