Repository navigation
feat(pages): mark Links to the page that is loading - #698
Merged
Merged
Conversation
Link adds `data-void-pending` while a visit to its destination loads, in React, Vue, Svelte and Solid, so a slow navigation shows feedback on the link without comparing `useNavigation().location` with each href by hand. A link is pending when the in-flight visit uses its method and goes to its path, query and hash. Non-GET Links, which render a <button>, are pending while their own request runs. `linkPendingAttributes()` in `void/pages-client` does the matching so the adapters can't drift, and the URL resolution it shares with `linkActiveAttributes()` moves into one helper. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ribute # Conflicts: # docs/reference/api/pages.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Linknow addsdata-void-pendingwhile a visit to its destination loads, so a slow navigation shows feedback on the link itself.data-void-active, the query counts.<button>, are pending while their own request runs.Worth knowing
router.refresh()marks links to the current page while it runs.Links now re-render when a visit starts and ends.Tests: the browser contract passes for all four adapters in dev and preview, along with
vp run checkand the fullvp run test. The one failure in the full run, a WebSocket playground timeout under load, passes when run alone.🤖 Generated with Claude Code