feat(graph-ui): URL routing, filter panel UX, and camera fly-to fix#740
Open
rarepops wants to merge 4 commits into
Open
feat(graph-ui): URL routing, filter panel UX, and camera fly-to fix#740rarepops wants to merge 4 commits into
rarepops wants to merge 4 commits into
Conversation
Cap the filter panel height and move the node and edge chips into a scroll area so a long type list no longer pushes the folder tree off screen. Regroup the chips under Node types and Relationships, pin the show-labels toggle as a footer, and add a Folders heading (en and zh) above the folder tree so the section is clearly labelled. Signed-off-by: Zadak <rarepops@protonmail.com>
Store the active tab and selected project in the URL query string so the view survives refreshes and can be bookmarked or shared, syncing back on browser back and forward via popstate. Query params are used rather than path segments because the embedded server only serves index.html at the root path. Opening the Projects tab now clears the active project, and the Graph tab stays disabled until a project is selected. Signed-off-by: Zadak <rarepops@protonmail.com>
Rename the ambiguous Clear button to Clear selection so it reads distinctly from Refresh, and point the empty-state hint at the Projects tab instead of the renamed Stats tab. Signed-off-by: Zadak <rarepops@protonmail.com>
The fly-to animation moved only the camera and called lookAt, leaving the OrbitControls pivot at the origin, so OrbitControls re-centred the view on the next frame and snapped the camera back once the animation ended. Lerp the controls target to the focus point as well so the view stays on the clicked node or cluster and orbits around it afterwards. Signed-off-by: Zadak <rarepops@protonmail.com>
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.
Summary
Improvements to the graph UI: the left filter panel is reworked, the active tab and selected project are now reflected in the URL, the camera fly-to no longer snaps back to centre, and a few confusing labels are clarified.
All changes are scoped to
graph-ui/. No server or protocol changes.Changes
Filter panel and folder tree
URL routing
?tab=...&project=...), so the view survives refreshes and can be bookmarked or shared. Back/forward is handled viapopstate.index.htmlat/(path routes would 404 on refresh).Graph tab and HUD
Camera fly-to fix
lookAt, leaving theOrbitControlspivot at the origin.OrbitControlsre-centred the view on the next frame, snapping the camera back once the animation ended.Screenshots
Testing
npm run build(tsc typecheck + vite build): passingnpm test(vitest): 8/8 passing/?tab=graph&project=<name>restores the view; the Projects tab clears the selection and disables the Graph tab; browser back/forward round-trips; the camera stays on the focused node.Follow-up (not in this PR)