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] Which skipping reason does "View transition page-visibility change steps" use? #10101

Closed
nt1m opened this issue Mar 20, 2024 · 2 comments · Fixed by #10122
Labels
css-view-transitions-1 View Transitions; Bugs only Needs Edits

Comments

@nt1m
Copy link
Member

nt1m commented Mar 20, 2024

https://drafts.csswg.org/css-view-transitions-1/#page-visibility-change-steps

If document’s active view transition is not null, then skip document’s active view transition.

I noticed this while implementing in WebKit, the current spec doesn't say which reason / exception to pass to the skip the view transition algorithm.

cc @noamr @khushalsagar

@nt1m nt1m added the css-view-transitions-1 View Transitions; Bugs only label Mar 20, 2024
@nt1m
Copy link
Member Author

nt1m commented Mar 20, 2024

I also noticed another bug in the spec:

In https://drafts.csswg.org/css-view-transitions-1/#ViewTransition-prepare

If document’s visibility state is "hidden", then skip transition with an "InvalidStateError" DOMException, and return.

We should be returning the transition here, instead of returning nothing.

@css-meeting-bot
Copy link
Member

The CSS Working Group just discussed [css-view-transitions-1] Which skipping reason does "View transition page-visibility change steps" use?, and agreed to the following:

  • RESOLVED: Use "InvalidStateError" when skipping the view transition due to document not visible
  • RESOLVED: Fix algorithm error, always return transition object
  • RESOLVED: Publish CRD of css-view-transitions-1
The full IRC log of that discussion <fantasai> s/Topic/Subtopic/
<fantasai> ntim: implementing recent resolution to skip transition when document is hidden
<fantasai> ntim: we didn't define the reason/exception to pass
<khush_> q+
<fantasai> ntim: also noticed that the algorithm to prepare the view transition returns nothing
<fantasai> ntim: in the case where it skips the transition
<fantasai> s/transition/transition because it's hidden/
<fantasai> ntim: seems it should return the transition
<astearns> ack khush_
<fantasai> ntim: seems like a bugfix issue?
<fantasai> khush_: I think that was a typo, that algorithm should return transition
<fantasai> khush_: wrt reasonable exception to use, the other spot we use "InvalidStateError" which seems like reasonable error code for invisibility
<vmpstr> +1
<fantasai> ntim: sgtm
<fantasai> astearns: anyone else?
<fantasai> RESOLVED: Use "InvalidStateError" when skipping the view transition due to document not visible
<fantasai> vmpstr: If transition is skipped, algorithm steps should still return 'transition'
<fantasai> khush_: it's an error in the spec, should be returning that in al cases
<fantasai> RESOLVED: Fix algorithm error, always return transition object
<astearns> ack fantasai
<fantasai> fantasai: do we need to publish a new CR?
<fantasai> khush_: If there's other issues to batch up, can batch up. Otherwise ok to republish
<fantasai> ntim: I look at ED when I implement, so fine either way
<fantasai> fantasai: It's a problem if the ED is more reliable than the /TR copy, so let's do a CRD.
<fantasai> astearns: proposed to update draft with all resolutions and update CRD of VT1
<fantasai> RESOLVED: Publish CRD of css-view-transitions-1

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 Needs Edits
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants