Re: [csswg-drafts] [css-view-transitions-2] Declarative opt-in for cross-document navigations (#8048)

> Sorry I'm still not following how we're dealing with the combination of nav type + from/to url. Every combination of these 2 is possible. So if an author has CSS like:
> 
> ```
> @view-transition same-site {
>   trigger: navigation;
> }
> 
> @view-transition reload {
>   trigger: navigation;
> }
> ```
> 
> What happens if there is a reload which results in a same-site navigation? Your comment above sounds like all the qualifiers are a combination of nav type and from/to url. "same-origin" means any same-origin url of type "navigate", "back" and "forward". Presumably "same-site" would cover the same nav types. And "reload" means only same-origin reload navigations?

I think so. Mainly because a reload with cross-origin redirects is something that feels unexpected and uncommon. Edge case?

> 
> > We can perhaps keep the same-origin implicit when reload is present, but I'm not sure we have to decide on this now.

Yes exactly

> 
> Asking this right now because IMO "same-origin" should only be about the from/to url. Overloading the nav type into it is not a good idea. So I'd expect `@view-transition same-origin { trigger: navigation; }` to include reloads.

I see the value in having a clean separation between URLs and types, and having `same-origin` mean only the URLs.

But I think there is greater value in reasonable defaults. Putting UX first, view transitions on reload is something unexpected and needs to be handled a bit like an edge case, and in most cases not have a transition there at all unless explicitly requested. 
This was the tone of [this CSSWG resolution](https://github.com/w3c/csswg-drafts/issues/8784#issuecomment-1640701514).

The same argument for reasonable defaults (which I think is consistent with a lot of CSS) goes for having reloads be same-origin only by default.

As for being conceptually clean, I'd say that in this case `same-origin` does mean just the from/to URLs, and since there is no type defined, we go with the specified "default set of navigation types" - which are navigate/back/forward/(maybe also jump? not sure).





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


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

Received on Thursday, 28 September 2023 18:22:41 UTC