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
136
Issues
136
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
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
2ee876fb
Commit
2ee876fb
authored
Jul 18, 2020
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[CLEAN] Sidebar (needs more love)
parent
b4764a1a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
20 deletions
+30
-20
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+26
-16
Tabs.purs
src/Gargantext/Components/Nodes/Corpus/Graph/Tabs.purs
+4
-4
No files found.
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
2ee876fb
...
...
@@ -94,15 +94,20 @@ sideTab (Opened SideTabSelection) props =
)
)
]
, RH.div { className: "tab-content" }
[ removeButton "
Remove
candidate" CandidateTerm props nodesMap
, removeButton "
Remove
stop" StopTerm props nodesMap
, RH.div { className: "tab-content
flex-space-between
" }
[ removeButton "
Move as
candidate" CandidateTerm props nodesMap
, removeButton "
Move as
stop" StopTerm props nodesMap
]
]
, RH.div { className: "col-md-12", id: "query" }
[ query props.frontends props.metaData props.session nodesMap props.selectedNodeIds]
[ query props.frontends
props.metaData
props.session
nodesMap
props.selectedNodeIds
]
]
]
, RH.div { className: "tab-content", id: "myTabContent" }
...
...
@@ -126,9 +131,10 @@ sideTab (Opened SideTabSelection) props =
if Set.isEmpty $ fst props'.selectedNodeIds then
RH.div {} []
else
RH.button { className: "btn btn-danger"
, on: { click: onClickRemove rType props' nodesMap' }}
[ RH.text text ]
RH.button { className: "btn btn-info"
, on: { click: onClickRemove rType props' nodesMap' }
}
[ RH.text text ]
onClickRemove rType props' nodesMap' e = do
let nodes = mapMaybe (\id -> Map.lookup id nodesMap')
...
...
@@ -221,17 +227,21 @@ query _ _ _ _ (selectedNodeIds /\ _) | Set.isEmpty selectedNodeIds = RH.div {} [
query frontends (GET.MetaData metaData) session nodesMap (selectedNodeIds /\ _) =
query' (head metaData.corpusId)
where
query' Nothing = RH.div {} []
query' (Just corpusId) =
CGT.tabs {frontends, session, query: q <$> Set.toUnfoldable selectedNodeIds, sides: [side corpusId]}
q id = case Map.lookup id nodesMap of
query' Nothing = RH.div {} []
query' (Just corpusId) = CGT.tabs { frontends
, session
, query: toQuery <$> Set.toUnfoldable selectedNodeIds
, sides: [side corpusId]
}
toQuery id = case Map.lookup id nodesMap of
Nothing -> []
Just n -> words n.label
side corpusId = GET.GraphSideCorpus {
corpusId
, listId
: metaData.list.listId
, corpusLabel: metaData.title
}
side corpusId = GET.GraphSideCorpus {
corpusId
, listId
: metaData.list.listId
, corpusLabel: metaData.title
}
------------------------------------------------------------------------
...
...
src/Gargantext/Components/Nodes/Corpus/Graph/Tabs.purs
View file @
2ee876fb
...
...
@@ -11,8 +11,8 @@ import Gargantext.Components.Tab as Tab
import Gargantext.Ends (Frontends)
import Gargantext.Sessions (Session)
type Props =
(
frontends :: Frontends
type Props =
(
frontends :: Frontends
, query :: TextQuery
, session :: Session
, sides :: Array GraphSideCorpus
...
...
@@ -35,7 +35,7 @@ tab :: Frontends -> Session -> TextQuery -> GraphSideCorpus -> Tuple String R.El
tab frontends session query (GraphSideCorpus {corpusId: nodeId, corpusLabel, listId}) =
Tuple corpusLabel (docView dvProps)
where
dvProps = {frontends, session, nodeId, listId, query, chart, totalRecords: 0, container}
chart = mempty
dvProps
= {frontends, session, nodeId, listId, query, chart, totalRecords: 0, container}
chart
= mempty
container = T.graphContainer {title: corpusLabel}
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