Skip to content

[css-view-transitions-1] Skip transition if viewport changes. Fixes #8045 #8306

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

Merged
merged 2 commits into from
Jan 13, 2023

Conversation

jakearchibald
Copy link
Contributor

No description provided.

@jakearchibald jakearchibald added the css-view-transitions-1 View Transitions; Bugs only label Jan 12, 2023
@@ -806,6 +814,9 @@ urlPrefix: https://html.spec.whatwg.org/multipage/rendering.html; type: dfn;

Note: This happens if |transition| was [=skip the view transition|skipped=] before this point.

1. If |transition|'s [=ViewTransition/initial snapshot viewport size=] is not equal to the [=snapshot viewport size=],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if we need to specify exact when we do this check, or we can just add it to the step that's setting it:

1. Set |transition|'s [=ViewTransition/initial snapshot viewport size=] to the [=snapshot viewport size=]. If this size changes after this point, skip the transition.

I'm fine with this too.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought about this, but doing it properly would be more complicated.

Changes to the snapshot viewport happen outside the page, so to do things on the page, it would need to queue a task. Because a task is queued, we can't guarantee the same view transition is active compared to when the task was queued, so that will need to be verified before skipping the transition.

@jakearchibald jakearchibald marked this pull request as ready for review January 13, 2023 10:36
@jakearchibald jakearchibald merged commit c3dde2f into w3c:main Jan 13, 2023
@jakearchibald jakearchibald deleted the skip-on-viewport-change branch January 13, 2023 11:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
css-view-transitions-1 View Transitions; Bugs only
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants