Repository navigation
feat(pages): expose current, active, and pending link status - #924
Open
karthickeyan-dev wants to merge 3 commits into
Open
karthickeyan-dev wants to merge 3 commits into
karthickeyan-dev wants to merge 3 commits into
Conversation
Solid and Svelte link status derivations returned a fresh object on every navigation or URL change, re-running effects and render-prop children even when current, active, and pending stayed the same. Compare Solid memos by value with a shared linkStatusEquals helper, and derive each Svelte field separately. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e and React Vue's computed and React's useMemo returned a fresh LinkStatus object on every navigation, so watchers, Link renders, memoized children, and effect dependencies reran even when current, active, and pending stayed the same. Reuse the previous object for an equal status in both adapters, and cover unchanged-status notifications for Vue, React, and Svelte plus null-router cases for isLinkActive and isLinkPending. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
karthickeyan-dev
marked this pull request as ready for review
November 26, 2026 06:12
This branch has not been deployed
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.
Closes #803.
A sidebar button can now read the state of its destination, and a link can show a spinner while its own destination loads. All four Pages adapters expose
useLinkStatus(href, { method, data, activeMatch })and pass the same{ current, active, pending }to link children through a render prop, scoped slot, or snippet. For breadcrumbs and menus,isLinkActiveandisLinkPendingfromvoid/pages-clientcan run inside a loop.Design
Void already distinguishes the current page from an active parent section, and matches pending visits by method, path, full query, and hash. The hook, children, and automatic DOM attributes now use one implementation of those rules. Existing links can keep ordinary children and override the rendered attributes.
Verification
The shared matching tests cover query data, prefix boundaries, methods, hashes, and pending visits. Browser coverage across React, Vue, Svelte, and Solid holds a POST request open, checks that its link label and surrounding component update together, and verifies that both return to idle.