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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
purescript-gargantext
Commits
f256e891
Commit
f256e891
authored
Apr 17, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[forest] some debugging for graph added
parent
20a7cbb9
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
63 additions
and
46 deletions
+63
-46
GraphExplorer.purs
src/Gargantext/Components/GraphExplorer.purs
+7
-7
Controls.purs
src/Gargantext/Components/GraphExplorer/Controls.purs
+3
-4
Router.purs
src/Gargantext/Components/Router.purs
+53
-35
No files found.
src/Gargantext/Components/GraphExplorer.purs
View file @
f256e891
...
...
@@ -154,6 +154,7 @@ explorerCpt = here.component "explorer" cpt
{ mGraph, mMetaData, sideTab } <- GEST.focusedSidePanel sidePanelGraph
R.useEffectOnce' $ do
here.log2 "writing graph" graph
T.write_ (Just graph) mGraph
T.write_ mMetaData' mMetaData
...
...
@@ -208,9 +209,9 @@ explorerCpt = here.component "explorer" cpt
Types.RightHanded -> "righthanded"
type TopBar =
(
boxes :: Boxes
)
(
boxes :: Boxes
)
topBar :: R2.Component TopBar
topBar = R.createElement topBarCpt
...
...
@@ -220,12 +221,11 @@ topBarCpt = here.component "topBar" cpt where
cpt { boxes: { showTree
, sidePanelGraph
, sidePanelState } } _ = do
sidePanelGraph' <- T.useLive T.unequal sidePanelGraph
let mGraph = maybe Nothing (_.mGraph) sidePanelGraph'
{ mGraph, multiSelectEnabled, selectedNodeIds, showControls } <- GEST.focusedSidePanel sidePanelGraph
{ multiSelectEnabled, selectedNodeIds, showControls } <- GEST.focusedSidePanel sidePanel
Graph
mGraph' <- T.useLive T.unequal m
Graph
let search = case mGraph of
let search = case mGraph
'
of
Just graph -> nodeSearchControl { graph
, multiSelectEnabled
, selectedNodeIds } []
...
...
src/Gargantext/Components/GraphExplorer/Controls.purs
View file @
f256e891
...
...
@@ -158,10 +158,9 @@ controlsCpt = here.component "controls" cpt
let nodeSizeMax = maybe 100.0 _.size $ A.last nodesSorted
let nodeSizeRange = Range.Closed { min: nodeSizeMin, max: nodeSizeMax }
pure $ case showControls' of
false -> RH.div {} []
-- true -> R2.menu { id: "toolbar" } [
true -> RH.nav { className: "navbar navbar-expand-lg" }
let className = "navbar navbar-expand-lg " <> if showControls' then "" else "d-none"
pure $ RH.nav { className }
[ RH.ul { className: "navbar-nav mx-auto" }
[ -- change type button (?)
navItem [ centerButton sigmaRef ]
...
...
src/Gargantext/Components/Router.purs
View file @
f256e891
...
...
@@ -174,6 +174,24 @@ sidePanel = R.createElement sidePanelCpt
sidePanelCpt :: R.Component (WithSessionContext Props)
sidePanelCpt = here.component "sidePanel" cpt where
cpt props@{ boxes: boxes@{ graphVersion
, reloadForest
, sidePanelGraph
, sidePanelState
, sidePanelLists
, sidePanelTexts }
, session } _ = do
sidePanelState' <- T.useLive T.unequal sidePanelState
case sidePanelState' of
Opened -> pure $ openedSidePanel props []
_ -> pure $ H.div {} []
openedSidePanel :: R2.Component (WithSessionContext Props)
openedSidePanel = R.createElement openedSidePanelCpt
openedSidePanelCpt :: R.Component (WithSessionContext Props)
openedSidePanelCpt = here.component "openedSidePanel" cpt where
cpt props@{ boxes: boxes@{ graphVersion
, reloadForest
, sidePanelGraph
...
...
@@ -183,45 +201,45 @@ sidePanelCpt = here.component "sidePanel" cpt where
, session } _ = do
route' <- T.useLive T.unequal boxes.route
session' <- R.useContext session
sidePanelState' <- T.useLive T.unequal sidePanelState
let className = "side-panel"
case sidePanelState' of
Opened ->
case route' of
GR.Lists s n -> do
pure $ H.div { className }
[ Lists.sidePanel { session: session'
, sidePanel: sidePanelLists
, sidePanelState } [] ]
GR.PGraphExplorer s g -> do
{ mGraph, mMetaData, removedNodeIds, selectedNodeIds, sideTab } <- GEST.focusedSidePanel sidePanelGraph
mGraph' <- T.useLive T.unequal mGraph
mGraphMetaData' <- T.useLive T.unequal mMetaData
case (mGraph' /\ mGraphMetaData') of
(Nothing /\ _) -> pure $ H.div {} []
(_ /\ Nothing) -> pure $ H.div {} []
(Just graph /\ Just metaData) -> do
pure $ H.div { className }
[ GES.sidebar { frontends: defaultFrontends
, graph
, graphId: g
, graphVersion
, metaData
, reloadForest
, removedNodeIds
, selectedNodeIds
, session: session'
, sideTab
} [] ]
GR.Texts s n -> do
case route' of
GR.Lists s n -> do
pure $ H.div { className }
[ Lists.sidePanel { session: session'
, sidePanel: sidePanelLists
, sidePanelState } [] ]
GR.PGraphExplorer s g -> do
{ mGraph, mMetaData, removedNodeIds, selectedNodeIds, sideTab } <- GEST.focusedSidePanel sidePanelGraph
mGraph' <- T.useLive T.unequal mGraph
mGraphMetaData' <- T.useLive T.unequal mMetaData
R.useEffect' $ do
here.log2 "mGraph" mGraph'
here.log2 "mGraphMetaData" mGraphMetaData'
case (mGraph' /\ mGraphMetaData') of
(Nothing /\ _) -> pure $ H.div {} []
(_ /\ Nothing) -> pure $ H.div {} []
(Just graph /\ Just metaData) -> do
pure $ H.div { className }
[ Texts.sidePanel { session: session'
, sidePanel: sidePanelTexts
, sidePanelState } [] ]
_ -> pure $ H.div {} []
[ GES.sidebar { frontends: defaultFrontends
, graph
, graphId: g
, graphVersion
, metaData
, reloadForest
, removedNodeIds
, selectedNodeIds
, session: session'
, sideTab
} [] ]
GR.Texts s n -> do
pure $ H.div { className }
[ Texts.sidePanel { session: session'
, sidePanel: sidePanelTexts
, sidePanelState } [] ]
_ -> pure $ H.div {} []
annuaire :: R2.Component SessionNodeProps
...
...
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