Skip to content

Import graph from sphinx-nav-fiber to hive #1285

@Rassl

Description

@Rassl

Current implementation of using sphinx-nav-fiber within iframe has limitations such as lack of data fetch control.

Solution is to import standalone graph component, which will receive data (nodes/edges) from parent.

Handle all data fetching logic on hive side, reuse graph wherevere is needed.

Steps to make make standalone graph importable:

  • update sphinx nav fiber dependencies to make compatible with react 19. Currently everything except EffectComposer works fine.
  • get rid of EffectComposer (reference to previous bullet)
  • Make graph independent from following strores
    • useAiSummaryStore
    • useAppStore
    • useControlStore
    • useFeatureFlagStore
    • useIsolatedGraphStore
    • useMindsetStore
    • useModalStore
    • usePlayerStore
    • useRefStore
    • useRootNodesStore
    • useTeachStore
    • useTopicsStore
    • useTweetMindsetStore
    • useUserStore
  • graph should rely only on following stores useDataStore, useGraphStore, useSimulationStore
  • remove styled-components dependencies => refactor all usage of styled components
  • embed all project utils that are used for graph inside Universe component
  • import graph/universe to hive
  • handle graph related data fetching via useDataStore

Additional steps in case of Microfrontend approach.

  • Make deployable package
  • Configure exports
  • Deploy microfrontend
  • Setup hive to work with microfrontends
  • Import component from microfrontend
  • Handle data fetching logic

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions