Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
purescript-gargantext
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Grégoire Locqueville
purescript-gargantext
Commits
44a83609
Commit
44a83609
authored
Nov 19, 2022
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[graph] some small refactorings
parent
9d8ff06d
Changes
10
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
9 additions
and
23 deletions
+9
-23
spago.dhall
spago.dhall
+0
-1
Cloak.purs
src/Gargantext/Components/Bootstrap/Abstract/Cloak.purs
+3
-4
Sync.purs
src/Gargantext/Components/Forest/Tree/Node/Tools/Sync.purs
+0
-1
Layout.purs
src/Gargantext/Components/GraphExplorer/Layout.purs
+2
-2
Resources.purs
src/Gargantext/Components/GraphExplorer/Resources.purs
+0
-2
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+0
-1
Legend.purs
src/Gargantext/Components/GraphExplorer/Sidebar/Legend.purs
+0
-1
Controls.purs
...Gargantext/Components/GraphExplorer/Toolbar/Controls.purs
+1
-5
Graph.purs
src/Gargantext/Components/Nodes/Graph.purs
+1
-1
Graphology.purs
src/Gargantext/Hooks/Sigmax/Graphology.purs
+2
-5
No files found.
spago.dhall
View file @
44a83609
...
...
@@ -70,7 +70,6 @@ to generate this file without the comments in this block.
, "record"
, "record-extra"
, "routing"
, "sequences"
, "simple-json"
, "simple-json-generics"
, "simplecrypto"
...
...
src/Gargantext/Components/Bootstrap/Abstract/Cloak.purs
View file @
44a83609
...
...
@@ -33,6 +33,9 @@ options =
, sustainingPhaseDuration : Nothing
}
cname :: String
cname = "b-cloak"
-- | Abstract component type easing the transition display between a content
-- | component and transitional (or cloak) component
-- |
...
...
@@ -108,10 +111,6 @@ options =
-- | ```
cloak :: forall r. R2.OptLeaf Options Props r
cloak = R2.optLeaf component options
cname :: String
cname = "b-cloak"
component :: R.Component Props
component = R.hooksComponent cname cpt where
cpt props _ = do
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools/Sync.purs
View file @
44a83609
...
...
@@ -49,7 +49,6 @@ type GraphUpdateButtonProps =
graphUpdateButton :: Record GraphUpdateButtonProps -> R.Element
graphUpdateButton p = R.createElement graphUpdateButtonCpt p []
graphUpdateButtonCpt :: R.Component GraphUpdateButtonProps
graphUpdateButtonCpt = here.component "graphUpdateButton" cpt
where
...
...
src/Gargantext/Components/GraphExplorer/Layout.purs
View file @
44a83609
...
...
@@ -51,8 +51,8 @@ type Props =
layout :: R2.Leaf Props
layout = R2.leaf layoutCpt
layoutCpt :: R.
Memo
Props
layoutCpt =
R.memo' $ here.component "explorerWriteGraph
" cpt where
layoutCpt :: R.
Component
Props
layoutCpt =
here.component "layout
" cpt where
cpt { fa2Ref
, sigmaRef
} _ = do
...
...
src/Gargantext/Components/GraphExplorer/Resources.purs
View file @
44a83609
...
...
@@ -64,7 +64,6 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
, edgeConfluence
, edgeWeight
, forceAtlasState
, graph
, graphStage
, hyperdataGraph
, mouseSelectorSize
...
...
@@ -78,7 +77,6 @@ drawGraphCpt = R.memo' $ here.component "graph" cpt where
edgeWeight' <- R2.useLive' edgeWeight
forceAtlasState' <- R2.useLive' forceAtlasState
graphStage' <- R2.useLive' graphStage
graph' <- R2.useLive' graph
startForceAtlas' <- R2.useLive' startForceAtlas
hyperdataGraph' <- R2.useLive' hyperdataGraph
...
...
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
44a83609
...
...
@@ -160,7 +160,6 @@ sideTabLegendCpt = here.component "sideTabLegend" cpt where
sideTabData :: R2.Leaf Props
sideTabData = R2.leaf sideTabDataCpt
sideTabDataCpt :: R.Component Props
sideTabDataCpt = here.component "sideTabData" cpt where
cpt props _ = do
...
...
src/Gargantext/Components/GraphExplorer/Sidebar/Legend.purs
View file @
44a83609
...
...
@@ -31,7 +31,6 @@ type Props =
legend :: R2.Leaf Props
legend = R2.leaf legendCpt
legendCpt :: R.Component Props
legendCpt = here.component "legend" cpt where
cpt { legendSeq
...
...
src/Gargantext/Components/GraphExplorer/Toolbar/Controls.purs
View file @
44a83609
...
...
@@ -54,9 +54,7 @@ controlsCpt = R.memo' $ here.component "controls" cpt where
, edgeWeight
, forceAtlasState
, graph
, graphId
, graphStage
, hyperdataGraph
, labelRenderedSizeThreshold
, labelSize
, mouseSelectorSize
...
...
@@ -71,9 +69,7 @@ controlsCpt = R.memo' $ here.component "controls" cpt where
forceAtlasState' <- R2.useLive' forceAtlasState
graph' <- R2.useLive' graph
graphId' <- R2.useLive' graphId
graphStage' <- R2.useLive' graphStage
hyperdataGraph' <- R2.useLive' hyperdataGraph
selectedNodeIds' <- R2.useLive' selectedNodeIds
showSidebar' <- R2.useLive' showSidebar
...
...
@@ -89,7 +85,7 @@ controlsCpt = R.memo' $ here.component "controls" cpt where
-- When graph is changed, cleanup the mFAPauseRef so that forceAtlas
-- timeout is retriggered.
R.useEffect' $ do
R.useEffect
1' graphStage
' $ do
case graphStage' of
GET.Init -> R.setRef mFAPauseRef Nothing
_ -> pure unit
...
...
src/Gargantext/Components/Nodes/Graph.purs
View file @
44a83609
...
...
@@ -114,7 +114,6 @@ renderNodeCpt = here.component "renderNode" cpt where
GET.HyperdataGraph { graph: hyperdataGraph } = loaded
Tuple mMetaData graph = convert hyperdataGraph
in
-- H.div {} [ H.text "hello" ]
hydrateStore
{ cacheParams: cache'
, graph
...
...
@@ -185,6 +184,7 @@ hydrateStoreCpt = here.component "hydrateStore" cpt where
-- |
pure $
GraphStore.provide
state
[
...
...
src/Gargantext/Hooks/Sigmax/Graphology.purs
View file @
44a83609
...
...
@@ -44,12 +44,9 @@ newGraph = runEffectFn1 _newGraph
graphFromSigmaxGraph :: Types.Graph Types.Node Types.Edge -> Effect Graph
graphFromSigmaxGraph (Types.Graph g) = do
graph <- newGraph unit
_ <- traverse (addNode graph) nodes
_ <- traverse (addEdge graph) edges
_ <- traverse (addNode graph)
g.
nodes
_ <- traverse (addEdge graph)
g.
edges
pure graph
where
nodes = A.fromFoldable g.nodes
edges = A.fromFoldable g.edges
addNode :: Graph -> Record Types.Node -> Effect String
addNode g node@{ id } = runEffectFn3 _addNode g id node
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment