Repository navigation
Navigation - #773
Navigation#773
Conversation
…istry@5.0.2-0 profile-pane@4.1.0-0) (latest: rdflib@2.4.1 solid-ui@5.0.1 activitystreams-pane@2.0.0 chat-pane@4.0.0 contacts-pane@4.0.0 folder-pane@4.0.0 issue-pane@4.0.0 meeting-pane@4.0.0 source-pane@4.0.0)
…istry@5.0.2-0 profile-pane@4.1.0-0) (latest: rdflib@2.4.1 solid-ui@5.0.1 activitystreams-pane@2.0.0 chat-pane@4.0.0 contacts-pane@4.0.0 folder-pane@4.0.0 issue-pane@4.0.0 meeting-pane@4.0.0 source-pane@4.0.0)
| // header only makes sense when the page URL is inside the viewer's own pod. | ||
| const hideOutsideViewerPod = !!options.headerOnlyInViewerPod && !(await isInViewerPod(document.location.href)) | ||
| provider.showHeader = !isRootResource && !isWebIdUri(subject) && !hideOutsideViewerPod | ||
| const viewerPodOnly = !!options.headerOnlyInViewerPod |
| const menuItems: NavbarMenuItem[] = [] | ||
|
|
||
| if (webId) { | ||
| if (context.owner) { |
|
|
||
| const request = ++rebuildRequest | ||
| getPodContext(url).then(next => { | ||
| if (request !== rebuildRequest || isSamePod(podContext, next)) return |
There was a problem hiding this comment.
Direct navigation within the current pod leaves the navbar’s selected item stale.
Same-pod direct navigation does not update selected navbar item
The new solid-panes:navigated listener in navbar.ts returns immediately when the incoming navigation state belongs to the current pod:
This means a direct navigation such as OutlineManager.GotoSubject(...) to another pane in the same pod can update the visible pane and navigation state, but not the navbar selection. The menu can continue to show the previous pane as active.
That appears inconsistent with the purpose of announceNavigation(), which exists to notify the UI after direct navigation callers update paneName / paneUri.
Suggested correction
For same-pod navigation events, apply state.view to the existing navbar items—selecting the matching pane—before returning. A full pod-context/menu rebuild should still remain reserved for cross-pod navigation.
Feedback from my AI
SharonStrats
left a comment
There was a problem hiding this comment.
I really like it!
We have so many different scenarios of viewing and navigating.
This is much clearer.
…istry@5.0.2-0 profile-pane@4.1.0-0) (latest: rdflib@2.4.1 solid-ui@5.0.1 activitystreams-pane@2.0.0 chat-pane@4.0.0 contacts-pane@4.0.0 folder-pane@4.0.0 issue-pane@4.0.0 meeting-pane@4.0.0 source-pane@4.0.0)
I refactored the navigation in solid-panes: navbar, menu and browser actions.