-
Notifications
You must be signed in to change notification settings - Fork 22.5k
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
Remove secure context warnings from XR member pages #7070
Conversation
This comment has been minimized.
This comment has been minimized.
in case this is turned into a guideline of some sort, just wanted to note that |
@Elchi3 Do you plan to create a guideline or discussion for this? FWIW I agree that the huge icon/banner on the "entry point" to an API makes sense (e.g. |
Yes, I agree. I think this is is part an issue about the bad UX of the "secure context" banner. We have talked before about having some space at the top of the page where we could include indicators for various things, including this (but also things like "available in workers" or "required permissions"), and avoiding the "stack of banners" scenario we get on MDN sometimes.
I've said this before but I'm uncomfortable with just sticking things in BCD because it's there. Traditionally BCD has been for, well, browser compatibility data - things that describe a specific browser's support for a feature. Secure context is specced behavior, so it doesn't belong in that category. But maybe this ship has sailed and BCD is now just "data about the web platform". This also causes practical issues though, because it works best if all the MDN pages that might want to express this had a BCD counterpart. But for example API overview pages don't live in BCD, but we might want to say "this whole API requires a secure context". (We don't at the moment: https://developer.mozilla.org/en-US/docs/Web/API/WebXR_Device_API, but maybe we should?) Also, this is only applicable to Web APIs. If we include it in BCD this isn't reflecting that constraint - we could add it to a CSS property, although it makes no sense there. If it were me I'd:
|
I think it should be in BCD data because the implementation is version and browser dependent - i.e. for a user it is a compatibility issue. So not just sticking in because it is there. But perhaps I misunderstand. In any case, sounds like we'd both like little icons :-) |
It isn't though, it's specced behavior: https://immersive-web.github.io/webxr/#xrsession-interface. A browser can't just choose to expose such an interface in unsecure contexts, not if it wants to remain compliant. If a browser did make this choice to diverge from the spec, absolutely that should be in BCD. But the fact that it's secure context only is just like the fact that it returns a I mean of course "the implementation is version and browser dependent", in the sense that everything is. But that leads to putting everything in BCD. |
I'm with @wbamberg on that one - I don't think BCD needs to be the funnel for all and any structured data into MDN content. FWIW, webref provides a convenient way to retrieve the vast majority of IDL fragments from which the API pages derive, and so it should be relatively easy to extract information to be automatically imported by Yari to set flags (e.g. secure-context only, available in workers, …), without going through BCD. This is similar (although distinct) to openwebdocs/project#44 (which also alludes as an aside to using webref to replace information about inheritance) |
OK, thanks for the explanation! |
Not sure if we have guidelines about this but to me it makes no sense to have this (loud) banner on every member page. On an interface level it makes sense to warn about availability of the whole API. However, at a stage when you are concerned with the API members already, I don't think secure context is a thing you need to worry about.