Closed AlbertSabate closed 1 month ago
I think is for this:
https://developer.mozilla.org/en-US/docs/Web/API/NavigateEvent/canIntercept
That is used here:
https://github.com/brisa-build/brisa/blob/9693d60a8dd353f899e4f17cab098243ae123250/packages/brisa/src/utils/rpc/rpc.ts#L111 Many things it does are right and we want them. But it also says this:
intercept the navigation if only the fragment portion differs.
Before implementing something, it would be good to know what other frameworks do in this case. I also don't see it problematic a normal navigation without SPA in this case, making it do nothing would be worse as user feedback I think. In which cases do you want to navigate to the same page without updating parameters or anything?
Next.js what it does is to scroll up the page and nothing else, nothing is saved to navigation history
My concern of triggering native reload are as follows:
While it is not very serious issue, and should not be priority, I think we should think in how to make it better. NextJS approach is what I would be expecting.
I've created a $20 bounty for someone in the community to solve this issue so you can focus on more important tasks!
I'd like to work on this @AlbertSabate
@mobley-trent feel free to PR!
It would be awesome to receive and review your PR. If you need any guidance, feel free to ask on this thread, and we will be doing our best to guide you. :)
I pre-released 0.1.3-canary.1 with this change. Thanks for the contribution @mobley-trent
I've already paid the bounty, congrats @mobley-trent, great job! 👏🏼
Describe the bug When you are in page / and have a link to /. This performs a full reload.
Expected behavior Should not do anything? Should only navigate to the top and trigger navigate events?