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-1] Handling snapshot viewport sizes changes during transitions #8045

Closed
jakearchibald opened this issue Nov 8, 2022 · 3 comments

Kommentare

@jakearchibald
Copy link
Contributor

The snapshot viewport size would change by:

  • The user or script resizing the window.
  • A mobile device changing orientation.

This impacts a transition if it happens:

  • Between capturing the old and new states.
  • During the transition animation.

Options:

Skip the transition

A resize creates situations the developer may not have predicted and catered for. For example, they may have assumed that their site header would be the same size in the old and new states. A resize can break that assumption.

Given that the transition is an enhancement, and the user is performing an 'interrupting' action by resizing the window, skipping the transition seems reasonable.

Update the animation state and continue

All 'new' elements will be updated with their new size, which in turn will update all animations in progress. This includes the transition container representing the root element - this will be the only case where this element animates width & height.

@jakearchibald jakearchibald added the css-view-transitions-1 View Transitions; Bugs only label Nov 8, 2022
@khushalsagar
Copy link
Member

My vote is for skipping the transition:

So not worth the complexity IMO. We can collect metrics to see how often we get these resizes midway through a transition and do something better if its worthwhile.

@astearns astearns added Async Resolution: Proposed Candidate for auto-resolve with stated time limit and removed Agenda+ labels Dec 15, 2022
@astearns
Copy link
Member

Since this is merely limiting the scope of the first iteration of this feature we likely do not need to spend meeting time on it.

The CSSWG will automatically accept this resolution one week from now if no objections are raised here. Anyone can add an emoji to this comment to express support. If you do not support this resolution, please add a new comment.

Proposed Resolution: For the current module level, abort view transitions if the snapshot viewport changes size. We can take this up in future levels as use cases and solutions permit.

@astearns
Copy link
Member

RESOLVED: For the current module level, abort view transitions if the snapshot viewport changes size. We can take this up in future levels as use cases and solutions permit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants