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
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 =
...
@@ -94,15 +94,20 @@ sideTab (Opened SideTabSelection) props =
)
)
)
)
]
]
, RH.div { className: "tab-content" }
, RH.div { className: "tab-content
flex-space-between
" }
[ removeButton "
Remove
candidate" CandidateTerm props nodesMap
[ removeButton "
Move as
candidate" CandidateTerm props nodesMap
, removeButton "
Remove
stop" StopTerm props nodesMap
, removeButton "
Move as
stop" StopTerm props nodesMap
]
]
]
]
, RH.div { className: "col-md-12", id: "query" }
, 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" }
, RH.div { className: "tab-content", id: "myTabContent" }
...
@@ -126,9 +131,10 @@ sideTab (Opened SideTabSelection) props =
...
@@ -126,9 +131,10 @@ sideTab (Opened SideTabSelection) props =
if Set.isEmpty $ fst props'.selectedNodeIds then
if Set.isEmpty $ fst props'.selectedNodeIds then
RH.div {} []
RH.div {} []
else
else
RH.button { className: "btn btn-danger"
RH.button { className: "btn btn-info"
, on: { click: onClickRemove rType props' nodesMap' }}
, on: { click: onClickRemove rType props' nodesMap' }
[ RH.text text ]
}
[ RH.text text ]
onClickRemove rType props' nodesMap' e = do
onClickRemove rType props' nodesMap' e = do
let nodes = mapMaybe (\id -> Map.lookup id nodesMap')
let nodes = mapMaybe (\id -> Map.lookup id nodesMap')
...
@@ -221,17 +227,21 @@ query _ _ _ _ (selectedNodeIds /\ _) | Set.isEmpty selectedNodeIds = RH.div {} [
...
@@ -221,17 +227,21 @@ query _ _ _ _ (selectedNodeIds /\ _) | Set.isEmpty selectedNodeIds = RH.div {} [
query frontends (GET.MetaData metaData) session nodesMap (selectedNodeIds /\ _) =
query frontends (GET.MetaData metaData) session nodesMap (selectedNodeIds /\ _) =
query' (head metaData.corpusId)
query' (head metaData.corpusId)
where
where
query' Nothing = RH.div {} []
query' Nothing = RH.div {} []
query' (Just corpusId) =
query' (Just corpusId) = CGT.tabs { frontends
CGT.tabs {frontends, session, query: q <$> Set.toUnfoldable selectedNodeIds, sides: [side corpusId]}
, session
q id = case Map.lookup id nodesMap of
, query: toQuery <$> Set.toUnfoldable selectedNodeIds
, sides: [side corpusId]
}
toQuery id = case Map.lookup id nodesMap of
Nothing -> []
Nothing -> []
Just n -> words n.label
Just n -> words n.label
side corpusId = GET.GraphSideCorpus {
corpusId
side corpusId = GET.GraphSideCorpus {
corpusId
, listId
: metaData.list.listId
, listId
: metaData.list.listId
, corpusLabel: metaData.title
, corpusLabel: metaData.title
}
}
------------------------------------------------------------------------
------------------------------------------------------------------------
...
...
src/Gargantext/Components/Nodes/Corpus/Graph/Tabs.purs
View file @
2ee876fb
...
@@ -11,8 +11,8 @@ import Gargantext.Components.Tab as Tab
...
@@ -11,8 +11,8 @@ import Gargantext.Components.Tab as Tab
import Gargantext.Ends (Frontends)
import Gargantext.Ends (Frontends)
import Gargantext.Sessions (Session)
import Gargantext.Sessions (Session)
type Props =
(
type Props =
frontends :: Frontends
(
frontends :: Frontends
, query :: TextQuery
, query :: TextQuery
, session :: Session
, session :: Session
, sides :: Array GraphSideCorpus
, sides :: Array GraphSideCorpus
...
@@ -35,7 +35,7 @@ tab :: Frontends -> Session -> TextQuery -> GraphSideCorpus -> Tuple String R.El
...
@@ -35,7 +35,7 @@ tab :: Frontends -> Session -> TextQuery -> GraphSideCorpus -> Tuple String R.El
tab frontends session query (GraphSideCorpus {corpusId: nodeId, corpusLabel, listId}) =
tab frontends session query (GraphSideCorpus {corpusId: nodeId, corpusLabel, listId}) =
Tuple corpusLabel (docView dvProps)
Tuple corpusLabel (docView dvProps)
where
where
dvProps = {frontends, session, nodeId, listId, query, chart, totalRecords: 0, container}
dvProps
= {frontends, session, nodeId, listId, query, chart, totalRecords: 0, container}
chart = mempty
chart
= mempty
container = T.graphContainer {title: corpusLabel}
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