Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable Routing for /node/{ref_id} #2644

Open
tomsmith8 opened this issue Jan 30, 2025 · 0 comments
Open

Enable Routing for /node/{ref_id} #2644

tomsmith8 opened this issue Jan 30, 2025 · 0 comments

Comments

@tomsmith8
Copy link
Contributor

tomsmith8 commented Jan 30, 2025

Not mindset view
Add route for main view: mainroute/node/ref_id

  • replace selectedNode in useGraphStore with ref_id
  • for all places where selectedNode is used replace selectedNode with normalizedNode from useDataStore like nodesNormalized.get(ref_id), if node position is required(for example for camera, use normalizedNode along with node from simulation.nodes() from useGraphStore)
  • for case where we reload the page, or navigate to some link with ref_id, we will get case where graph data is empty, and instead of calling latest etc, we should call getNode src/network/fetchSourcesData/index.ts, and select it after. In other words, when we see ref_id route, we should check if there is node with same ref_id in normalized nodes in useDataStore, and if not get it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant