API for clientside router#8571
Conversation
🦋 Changeset detectedLatest commit: 9a71303 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 |
|
Thanks! Will start reviewing next week. |
|
Looks great! I'd be happy to take on the docs part of this. Do you think it makes sense to add the |
|
I added docs here: withastro/docs#4756 |
|
I'll also update the changeset here. We try to have longer changesets for new features. |
| @@ -0,0 +1,5 @@ | |||
| --- | |||
| 'astro': patch | |||
There was a problem hiding this comment.
Can you make this be minor?
There was a problem hiding this comment.
changed to minor and copied your very good example from the docs. Feel free to improve the text as I am not a native speaker (well at least not of English)
ematipico
left a comment
There was a problem hiding this comment.
I left some comments. Many of them are nitpicks, which I prefixed them with nit:, feel free to ignore them.
|
Will address the review comments on the main branch in another PR (#8617), keep this PR as draft and redo the refactoring for the API just in time for 3.2 |
|
"Check mergeability" is ok to fail here, it's the thing that blocks PRs with minor changesets. I think there might be a problem with that script. |
|
Thanks @martrapp |
Changes
This is the first version of an API for the existing client side router of the view transition feature.
It provides a method to remote control the page navigation.
It does not support any options yet.
Outlook: First supported option will be:
{history: 'push' | 'replace' | 'auto'}(see also https://developer.mozilla.org/en-US/docs/Web/API/Navigation/navigate)For further discussion see withastro/roadmap#653
Testing
added e2e test
Docs