feat(graph-ui): URL routing, filter panel UX, and camera fly-to fix#740
Conversation
|
Thanks for the graph UI work. Triage: this is an enhancement/UX PR, priority normal, scoped to For review, the main things we will check are URL/query-state behavior across refresh and browser back/forward, selected-project encoding, i18n coverage for the new labels, and whether the camera fly-to / filter-panel changes have regression coverage. This is in the maintainer review queue now. |
28560df to
d9e1db9
Compare
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>
d9e1db9 to
c751240
Compare
|
Thank you — this is exactly the kind of graph-ui polish that makes the next release feel better: dependency-free URL routing (native URLSearchParams + history, correctly whitelisting the tab param — the right call for the embedded SPA rather than pulling in react-router), the filter-panel scroll/grouping cleanup, the honest label fixes, and the camera fly-to lerp fix with a clear root-cause note. Clean per-commit split, green on every platform incl. Windows, no new deps. Merged as 9987a4e. (If you ever feel like peeling the camera fix into its own PR next time it keeps the history even cleaner, but the split here made it trivial to review.) Appreciated! |
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)