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
95861d14
Commit
95861d14
authored
Sep 23, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ERGO] click on name open or close it
parent
dd5c6f02
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
21 deletions
+26
-21
Node.purs
src/Gargantext/Components/Forest/Tree/Node.purs
+1
-0
Tools.purs
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
+25
-21
No files found.
src/Gargantext/Components/Forest/Tree/Node.purs
View file @
95861d14
...
@@ -75,6 +75,7 @@ nodeMainSpan isLeaf p@{ dispatch, folderOpen, frontends, handed, session } = R.c
...
@@ -75,6 +75,7 @@ nodeMainSpan isLeaf p@{ dispatch, folderOpen, frontends, handed, session } = R.c
, chevronIcon isLeaf handed nodeType folderOpen
, chevronIcon isLeaf handed nodeType folderOpen
, nodeLink { frontends
, nodeLink { frontends
, id
, id
, folderOpen
, isSelected: mCurrentRoute
, isSelected: mCurrentRoute
== Routes.nodeTypeAppRoute
== Routes.nodeTypeAppRoute
nodeType
nodeType
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
View file @
95861d14
...
@@ -266,13 +266,14 @@ prettyNodeType nt = S.replace (S.Pattern "Node") (S.Replacement " ")
...
@@ -266,13 +266,14 @@ prettyNodeType nt = S.replace (S.Pattern "Node") (S.Replacement " ")
-- START node link
-- START node link
type NodeLinkProps = (
type NodeLinkProps = (
frontends :: Frontends
frontends :: Frontends
, id :: Int
, id :: Int
, folderOpen :: R.State Boolean
, isSelected :: Boolean
, isSelected :: Boolean
, name :: Name
, name
:: Name
, nodeType :: GT.NodeType
, nodeType
:: GT.NodeType
, session :: Session
, session
:: Session
, handed :: GT.Handed
, handed
:: GT.Handed
)
)
nodeLink :: Record NodeLinkProps -> R.Element
nodeLink :: Record NodeLinkProps -> R.Element
...
@@ -281,24 +282,27 @@ nodeLink p = R.createElement nodeLinkCpt p []
...
@@ -281,24 +282,27 @@ nodeLink p = R.createElement nodeLinkCpt p []
nodeLinkCpt :: R.Component NodeLinkProps
nodeLinkCpt :: R.Component NodeLinkProps
nodeLinkCpt = R2.hooksComponent thisModule "nodeLink" cpt
nodeLinkCpt = R2.hooksComponent thisModule "nodeLink" cpt
where
where
cpt { frontends, id, isSelected, name, nodeType, session, handed} _ = do
cpt { frontends, id, isSelected, name, nodeType, session, handed
, folderOpen
} _ = do
popoverRef <- R.useRef null
popoverRef <- R.useRef null
pure $
pure $
H.div {} [ H.a { data: { for: tooltipId, tip: true }
H.div { onClick: R2.effToggler folderOpen }
, href: url frontends $ GT.NodePath (sessionId session) nodeType (Just id) }
[ H.a { data: { for: tooltipId
[ nodeText { isSelected
, tip: true
, name
}
, handed
, href: url frontends $ GT.NodePath (sessionId session) nodeType (Just id) }
}
[ nodeText { isSelected
]
, name
, ReactTooltip.reactTooltip { id: tooltipId }
, handed
[ R2.row [ H.h4 {className: GT.fldr nodeType true}
}
[ H.text $ prettyNodeType nodeType ]
]
]
, ReactTooltip.reactTooltip { id: tooltipId }
, R2.row [ H.span {} [ H.text $ name ]]
[ R2.row [ H.h4 {className: GT.fldr nodeType true}
]
[ H.text $ prettyNodeType nodeType ]
]
]
, R2.row [ H.span {} [ H.text $ name ]]
]
]
where
where
tooltipId = "node-link-" <> show id
tooltipId = "node-link-" <> show id
...
...
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