Re: [csswg-drafts] [css-view-transitions-2] Allow an auto-generated `view-transition-name` that doesn't default to ID (#10995)

> Seems like a very incoherent model if `element.startViewTransition()` behaved differently than `document.startViewTransition()`. It's even more unpredictable than `document.startViewTransition()` behaving differently than `@view-transition`

Nobody is suggesting any particular change in behavior; I think this is becoming a bit hypothetical. 

> `match-element` is the clearly the right behavior for `auto` in scoped-element transitions. Are we going to make `auto` behave differently there? `attr(id ident, match-element)` is useful in case someone tries to do scoped-element transitions while rebuilding the DOM.

I don't think so; Just pointing out that branching `match-element` makes sense, but that I don't see examples of usefulness of trying to match by ID first.

> > What makes these "multi-page" in the cross-document sense? Astro supports both cross-document and same-document mode. Right now auto name generation would not work with either the auto and match-element proposal without changing the DOM and adding IDs everywhere (neither astro examples use IDs in conjunction with view-transition-name)...
> 
> I wanted to point out these types of use cases would exclusively use cross document view transitions in the future.

We can't be sure of that.
Sounds like this is a bit of an attempt to "favor" cross-document HTML-first apps over JS-based single-page apps. You know I appreciate that sentiment and I would very much like to find interesting solutions to this problem (if we see that `attr` doesn't cut it), but I think that match-by-ID is a bit too particular to be it.

-- 
GitHub Notification of comment by noamr
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/10995#issuecomment-2460220229 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 6 November 2024 16:20:13 UTC