Skip to content

Rename the ViewTransitions component to ClientRouter#11980

Merged
matthewp merged 3 commits into
nextfrom
rename-vt
Sep 13, 2024
Merged

Rename the ViewTransitions component to ClientRouter#11980
matthewp merged 3 commits into
nextfrom
rename-vt

Conversation

@matthewp

@matthewp matthewp commented Sep 12, 2024

Copy link
Copy Markdown
Contributor

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

@changeset-bot

changeset-bot Bot commented Sep 12, 2024

Copy link
Copy Markdown

🦋 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

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

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