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

[css-view-transitions-2] Define what happens when an outbound cross-document view transition starts before rendering #9822

Closed
noamr opened this issue Jan 19, 2024 · 2 comments · Fixed by #9948
Labels
css-view-transitions-2 View Transitions; New feature requests

Comments

@noamr
Copy link
Collaborator

noamr commented Jan 19, 2024

Envision the current scenario:

  • A document has an view-transition MPA opt-in (@view-transition { navigation: auto })
  • That document has some render-blocking resources that take a long time
  • The user navigates away before the first frame

The current specified behavior is that navigating away would be stalled until rendering is unblocked.
Suggesting instead that until the page is revealed (the first frame is rendered), outbound cross-document view-transitions would be automatically skipped.

@noamr
Copy link
Collaborator Author

noamr commented Jan 23, 2024

Proposed resolution from internal sync: A page that hadn't rendered yet would not trigger a cross-document view-transition.

More precisely, a page that hasn't been revealed yet (probably due to render-blocking) would not count as opting in to an outbound view-transition.

@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed [css-view-transitions-2] Define what happens when an outbound cross-document view transition starts before rendering, and agreed to the following:

  • RESOLVED: If a frame hasn't even been captured yet when a nav is initiated
  • RESOLVED: If a frame hasn't even been rendered yet when a nav is initiated, don't run a VT at all (as if there was no rule declaring one)
The full IRC log of that discussion <TabAtkins> noamr: I think this one is easy
<TabAtkins> noamr: about what happens when we're starting an outgoing VT before the page is rendered
<TabAtkins> noamr: say you have render-blocking styles or scripts that are slow
<TabAtkins> noamr: but your at-rule has already loaded, then you navigate away before even a single frame has rendered
<TabAtkins> noamr: currently we'd wait until the first frame then capture it, then transition away
<TabAtkins> noamr: proposal is if you haven't rendered a frame, you shouldn't have an outgoing transition
<TabAtkins> noamr: as if you hadn't encountered the opt-in at all
<fantasai> TabAtkins: +1 from me
<khush> +1
<bramus> +1
<fantasai> +1
<kbabbitt> +1
<fantasai> TabAtkins: This only happens for script initiated? Browser UI?
<fantasai> noamr: You happen to see CSS opt in early, but haven't rendered the page yet
<fantasai> TabAtkins: What causes it?
<fantasai> noamr: press Back, or bookmark
<TabAtkins> khush: also a client-side redirect
<fantasai> TabAtkins: That's what I meant by script-initiated navigation
<fantasai> noamr: that or Back
<TabAtkins> miriam: any other discussion?
<noamr> Proposed resolution: a page that hasn't rendered yet cannot trigger cross-document view transition
<TabAtkins> RESOLVED: If a frame hasn't even been captured yet when a nav is initiated
<TabAtkins> RESOLVED: If a frame hasn't even been rendered yet when a nav is initiated, don't run a VT at all (as if there was no rule declaring one)

noamr added a commit to noamr/csswg-drafts that referenced this issue Feb 13, 2024
noamr added a commit that referenced this issue Feb 13, 2024
…dden or not-yet-revealed (#9948)

* [css-view-transitions-2] Skip cross-document view-transitions when hidden or not-yet-revealed

Closes #9822
See also #9543

* Add dfn
@github-project-automation github-project-automation bot moved this to Monday morning in Feb 2024 Agenda Aug 26, 2024
noamr added a commit to noamr/csswg-drafts that referenced this issue Sep 2, 2024
When hiding the document, and inbound cross-document
view transition should be skipped.

Closes web-platform-tests/wpt#47828
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-view-transitions-2 View Transitions; New feature requests
Projects
Status: Monday morning
3 participants