-
Notifications
You must be signed in to change notification settings - Fork 50
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
Naming clash with navigation API #143
Comments
This seems to be where the 'transition' naming happened WICG/navigation-api#94 (comment) |
This is not how I would phrase it. I would phrase it as "a same-document navigation has just happened, but the page is still transitioning into the new state".
I'm not sure I see the clash. At least for same-document navigations, they should have basically the same meaning. I guess shared element transitions also allow transitions for cross-document navigations, but that seems like an OK superset. |
I guess my worry is:
Both features involve navigations, both features use "transition", but mean different things. |
The next least-bad option might be I understand that CSS has a precedent for “transition” meaning auto-interpolation between two states, but from the looks of things this API will resemble (Other issues about naming: #122, #129. “Page transitions” was also the name for Internet Explorer’s old |
Fixed in WICG/navigation-api#235 |
In the navigation API, "transition" means "a navigation that was intercepted as part of the navigate event and will result in a same-document navigation". This seems a bit tenuous to me. I think developers pretty strongly associate "transition" on the web to mean an animation of sorts, thanks to CSS transitions.
This seems like a pretty serious clash. Shared element transitions are visual transitions usually as part of a navigation, but the navigation API uses transition to mean something different.
However, @domenic said the naming process here was long and arduous, and didn't seem keen on renaming, so I'm not really sure what to do here. Some ideas just in case the navigation API naming could change:
canTransition
->canIntercept
navigation.transition
->navigation.ongoingIntercept
navigation.transitionWhile(promise)
->navigation.intercept(promise)
ornavigation.intercept(functionThatReturnsPromise)
ornavigation.interceptWhile(promise)
The navigation API will ship before shared element transitions.
The text was updated successfully, but these errors were encountered: