-
Notifications
You must be signed in to change notification settings - Fork 386
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
[Explainer feedback] Page navigation #202
Comments
Thank you for your comments! I think there's at least one fundamental misunderstanding at play here, but this is the type of thing that requires extremely careful consideration and so it's a good conversation to have.
This is the primary concept we want to allow, yes. Let's assume for the moment that in at least some circumstances (at least same origin) we want to allow a user to stay "in VR" between pages. This requires, at minimum, for the newly loaded page to:
Obviously we need to find some better (hopefully concise) language to describe all that, to avoid confusion on the same points you listed. Beyond that, I'd argue that the WebVR spec is entirely uninterested in the mechanics of any attempt to maintain visual or temporal consistency between pages. I can see interesting use cases for communicating user coordinates between pages, but you've already pointed out a variety of existing ways that could be accomplished. This is definitely a place where I'd prefer to see the web ecosystem come up with it's own protocols rather than us guessing at the eventual needs and baking bad assumptions into the browser forevermore. So I hope that answers your concerns. I feel like we're probably largely on the same page here, with the breakdown being insufficient explainer explanation. ;) Suggestions for verbiage that would have made this clearer to you would be appreciated! |
Feedback in #202 made it clear this wasn’t explained well enough.
Updated the related section of the explainer, BTW. https://github.com/w3c/webvr/blob/master/explainer.md#page-navigation |
Ping! @travisleithead, I'd like to know if I've addressed your concerns or if there's some aspect of your feedback I've overlooked. |
We should be very careful about the spec language around this feature, but lacking additional feedback I'm going to consider this concern to be addressed and close the issue. |
Thanks for the extra details and thoughtful response. Naturally, there's still a lot of details to work out. I still have a vague sense of uneasiness about the approach. The desire to "stay in VR" across navigations, while reasonable, seems to be wrongly inside-out to me. It sounds like your ideal is to connect the web browser's presentation surface (a tab? multiple tabs?) to a separate VR presentation surface and "browse" from inside that experience. In this experience the setup and connection would be done outside the scope of a particular web page experience. The way you are proposing to do this (via an event), lacks the appropriate signals and handshakes between the two pages (the outgoing and incoming pages). It would make much more sense to me, if there was a way for the outgoing page to indicate that the VR session should be "stashed" or "suspended" (at least the device-in-use and related info--not the WebGL content, etc.). Then, optionally, the incoming page could "resume" use of that VR device if it wished to. Such a scenario would also work for the same page, if it were refreshed, for example (it could avoid the setup logic if it detected that there was a stashed VR session). Naturally, privacy/security concerns come to mind with this. The other specific concern I have with the event is that a handler must be registered for this event in order to "catch" it. Depending on the timing of when this event might be fired (which I assume is very early in the loading pipeline if you don't want the "fade-to-black" experience to wait at a black view for a long time), the web developer might miss the registration point. Specifying the timing of this event may also be very tricky. Probably an event is not the right paradigm for what you're after. :) |
Re-opening, since it's obvious there's still some productive conversation to be had on this subject.
I'm not sure I grok the benefit of having the outgoing page grant permission to the destination to stay in VR or not. I guess that's roughly analogous to a link specify something like target="_blank" to have a bit more control over the navigation. I guess the big question is "are there scenarios where the outgoing page would want to specify that they wanted to navigate to a 2D version of a site rather than any VR version it may support." Worth noting that in a world where the handshake isn't explicit the page could still trigger that mode by closing the VR device session and then navigating.
This is one of my biggest ongoing concerns with the feature. I was having a conversation about it just yesterday, actually, and we came to the conclusion that a promise may be more applicable here to catch this type of "one shot event". That doesn't totally solve our timing problem, though, since we would want to fall back to the 2D view of the page if the page isn't going to handle the VR transition, and that implies that we have to have some sort of timeout. Really just not sure how best to handle that. |
Was reading the explainer today, and got to the section about page navigation. The use case of wanting to continue a VR experience through a navigation seems like a good idea, but accomplishing it using the way described sounds very challenging.
For navigations within an origin, this may make a lot of sense, where there is clear continuity of experience due to orchestration of all the pages in question by the maintainer of the site's origin (which of course isn't guaranteed). However, when thinking about continuing an experience between unrelated origins, this starts to seem far-fetched that there is really any continuity to be had. Perhaps the idea is only to quickly re-use a previously established hardware and configuration setup?
In addition to continuity, I am concerned about potential privacy and security leakage of any shared state between origins that may be assumed in such a design.
There are other implementation concerns that come to mind for the process model if a session's data is to be preserved and re-surfaced in a new navigation...for example, it may make it difficult or impossible to segregate sites by process (process isolation) without unnaturally delaying the outgoing page's navigation until the incoming page's required event is raised.
I think there are plenty of alternate ways in which session resumption could be accomplished without introducing the proposed event. Features like sessionStorage to store state and coordinate data between navigations, pushState and HTML5 history navigation to simulate a navigation without actually triggering a full navigation, even using shared resources like IndexedDB, SharedWorkers, ServiceWorkers, or some other mechanism. In most all of these scenarios you must have coordination between source and target of navigation--and these are the cases where continuing a WebVR session across navigations makes sense to me. Otherwise, I admit that I just don't think this is a good idea.
(And in light of Issue #200, I think this section runs the risk of overshadowing other feedback that might be more relevant or useful to your group.)
If you continue down this path, consider that you may want to get web servers involved in the navigation flow (to help facilitate a faster hand-off than waiting for the subsequent page to load and run script), so adding headers or something else to let them know what's desired as part of the navigation. Also, consider how this will need to integrate with CSP, Feature Policy, and other policy mitigations that each side may want to throw up to restrict this from happening.
Thanks!
The text was updated successfully, but these errors were encountered: