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

Rename the ViewTransitions component to ClientRouter #11980

Merged
merged 3 commits into from
Sep 13, 2024
Merged

Rename the ViewTransitions component to ClientRouter #11980

merged 3 commits into from
Sep 13, 2024

Conversation

matthewp
Copy link
Contributor

@matthewp matthewp commented Sep 12, 2024

Changes

  • Renames it to ClientRouter
  • The old name can still be imported and used, but you get a deprecation message in TS.

Testing

  • All tests updated

Docs

Copy link

changeset-bot bot commented Sep 12, 2024

🦋 Changeset detected

Latest commit: add38f4

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@github-actions github-actions bot added pkg: example Related to an example package (scope) pkg: astro Related to the core `astro` package (scope) docs pr semver: minor Change triggers a `minor` release labels Sep 12, 2024
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is blocked because it contains a minor changeset. A reviewer will merge this at the next release if approved.

@matthewp matthewp marked this pull request as ready for review September 12, 2024 20:57
@@ -1,5 +1,5 @@
---
import { ViewTransitions } from 'astro:transitions';
import { ClientRouter } from 'astro:transitions';
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there at all a concern regarding the fact that you still import this from astro:transitions? Perhaps it should be exported from astro/components now as well and documented as such?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it's "not real view transitions"? It still uses view transitions; that's still the biggest part of the router. It's not like the other stuff inside astro:transitions are not also enhancements to view transitions. This is no different. It's just a rename to clarify that it's an enhancement.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant more so in a marketing sense. If we start selling this to users outside of the context of view transitions (e.g. "If you need a client side router, use this") it could be confusing why it's imported from astro:transitions

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still pretty deeply tied to view transitions. The fallback property is about view transitions. The animations that occur are view transitions. If you wanted to disable the animations you need to do transition:animate="none". It's not a traditional SPA style router and I don't think we should rethink everything just for a rename.

@matthewp matthewp merged commit a604a0c into next Sep 13, 2024
14 checks passed
@matthewp matthewp deleted the rename-vt branch September 13, 2024 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs pr pkg: astro Related to the core `astro` package (scope) pkg: example Related to an example package (scope) semver: minor Change triggers a `minor` release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants