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
...
@@ -154,6 +154,7 @@ explorerCpt = here.component "explorer" cpt
{ mGraph, mMetaData, sideTab } <- GEST.focusedSidePanel sidePanelGraph
{ mGraph, mMetaData, sideTab } <- GEST.focusedSidePanel sidePanelGraph
R.useEffectOnce' $ do
R.useEffectOnce' $ do
here.log2 "writing graph" graph
T.write_ (Just graph) mGraph
T.write_ (Just graph) mGraph
T.write_ mMetaData' mMetaData
T.write_ mMetaData' mMetaData
...
@@ -208,9 +209,9 @@ explorerCpt = here.component "explorer" cpt
...
@@ -208,9 +209,9 @@ explorerCpt = here.component "explorer" cpt
Types.RightHanded -> "righthanded"
Types.RightHanded -> "righthanded"
type TopBar =
type TopBar =
(
(
boxes :: Boxes
boxes :: Boxes
)
)
topBar :: R2.Component TopBar
topBar :: R2.Component TopBar
topBar = R.createElement topBarCpt
topBar = R.createElement topBarCpt
...
@@ -220,12 +221,11 @@ topBarCpt = here.component "topBar" cpt where
...
@@ -220,12 +221,11 @@ topBarCpt = here.component "topBar" cpt where
cpt { boxes: { showTree
cpt { boxes: { showTree
, sidePanelGraph
, sidePanelGraph
, sidePanelState } } _ = do
, sidePanelState } } _ = do
sidePanelGraph' <- T.useLive T.unequal sidePanelGraph
{ mGraph, multiSelectEnabled, selectedNodeIds, showControls } <- GEST.focusedSidePanel sidePanelGraph
let mGraph = maybe Nothing (_.mGraph) 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
Just graph -> nodeSearchControl { graph
, multiSelectEnabled
, multiSelectEnabled
, selectedNodeIds } []
, selectedNodeIds } []
...
...
src/Gargantext/Components/GraphExplorer/Controls.purs
View file @
f256e891
...
@@ -158,10 +158,9 @@ controlsCpt = here.component "controls" cpt
...
@@ -158,10 +158,9 @@ controlsCpt = here.component "controls" cpt
let nodeSizeMax = maybe 100.0 _.size $ A.last nodesSorted
let nodeSizeMax = maybe 100.0 _.size $ A.last nodesSorted
let nodeSizeRange = Range.Closed { min: nodeSizeMin, max: nodeSizeMax }
let nodeSizeRange = Range.Closed { min: nodeSizeMin, max: nodeSizeMax }
pure $ case showControls' of
let className = "navbar navbar-expand-lg " <> if showControls' then "" else "d-none"
false -> RH.div {} []
-- true -> R2.menu { id: "toolbar" } [
pure $ RH.nav { className }
true -> RH.nav { className: "navbar navbar-expand-lg" }
[ RH.ul { className: "navbar-nav mx-auto" }
[ RH.ul { className: "navbar-nav mx-auto" }
[ -- change type button (?)
[ -- change type button (?)
navItem [ centerButton sigmaRef ]
navItem [ centerButton sigmaRef ]
...
...
src/Gargantext/Components/Router.purs
View file @
f256e891
...
@@ -174,6 +174,24 @@ sidePanel = R.createElement sidePanelCpt
...
@@ -174,6 +174,24 @@ sidePanel = R.createElement sidePanelCpt
sidePanelCpt :: R.Component (WithSessionContext Props)
sidePanelCpt :: R.Component (WithSessionContext Props)
sidePanelCpt = here.component "sidePanel" cpt where
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
cpt props@{ boxes: boxes@{ graphVersion
, reloadForest
, reloadForest
, sidePanelGraph
, sidePanelGraph
...
@@ -183,45 +201,45 @@ sidePanelCpt = here.component "sidePanel" cpt where
...
@@ -183,45 +201,45 @@ sidePanelCpt = here.component "sidePanel" cpt where
, session } _ = do
, session } _ = do
route' <- T.useLive T.unequal boxes.route
route' <- T.useLive T.unequal boxes.route
session' <- R.useContext session
session' <- R.useContext session
sidePanelState' <- T.useLive T.unequal sidePanelState
let className = "side-panel"
let className = "side-panel"
case sidePanelState' of
case route' of
Opened ->
GR.Lists s n -> do
case route' of
pure $ H.div { className }
GR.Lists s n -> do
[ Lists.sidePanel { session: session'
pure $ H.div { className }
, sidePanel: sidePanelLists
[ Lists.sidePanel { session: session'
, sidePanelState } [] ]
, sidePanel: sidePanelLists
GR.PGraphExplorer s g -> do
, sidePanelState } [] ]
{ mGraph, mMetaData, removedNodeIds, selectedNodeIds, sideTab } <- GEST.focusedSidePanel sidePanelGraph
GR.PGraphExplorer s g -> do
mGraph' <- T.useLive T.unequal mGraph
{ mGraph, mMetaData, removedNodeIds, selectedNodeIds, sideTab } <- GEST.focusedSidePanel sidePanelGraph
mGraphMetaData' <- T.useLive T.unequal mMetaData
mGraph' <- T.useLive T.unequal mGraph
mGraphMetaData' <- T.useLive T.unequal mMetaData
R.useEffect' $ do
here.log2 "mGraph" mGraph'
case (mGraph' /\ mGraphMetaData') of
here.log2 "mGraphMetaData" mGraphMetaData'
(Nothing /\ _) -> pure $ H.div {} []
(_ /\ Nothing) -> pure $ H.div {} []
case (mGraph' /\ mGraphMetaData') of
(Just graph /\ Just metaData) -> do
(Nothing /\ _) -> pure $ H.div {} []
pure $ H.div { className }
(_ /\ Nothing) -> pure $ H.div {} []
[ GES.sidebar { frontends: defaultFrontends
(Just graph /\ Just metaData) -> do
, graph
, graphId: g
, graphVersion
, metaData
, reloadForest
, removedNodeIds
, selectedNodeIds
, session: session'
, sideTab
} [] ]
GR.Texts s n -> do
pure $ H.div { className }
pure $ H.div { className }
[ Texts.sidePanel { session: session'
[ GES.sidebar { frontends: defaultFrontends
, sidePanel: sidePanelTexts
, graph
, sidePanelState } [] ]
, graphId: g
_ -> pure $ H.div {} []
, 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 {} []
_ -> pure $ H.div {} []
annuaire :: R2.Component SessionNodeProps
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