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
37e53658
Commit
37e53658
authored
Jan 26, 2021
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DESIGN]
parent
c4ee2272
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
40 additions
and
27 deletions
+40
-27
FacetsTable.purs
src/Gargantext/Components/FacetsTable.purs
+0
-1
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+28
-20
Tab.purs
src/Gargantext/Components/Tab.purs
+12
-6
No files found.
src/Gargantext/Components/FacetsTable.purs
View file @
37e53658
...
...
@@ -323,7 +323,6 @@ pageCpt = R.hooksComponentWithModule thisModule "page" cpt
where
setParams f = setPath $ \p@{params: ps} -> p {params = f ps}
params = (fst path).params /\ setParams
-- colNames = T.ColumnName <$> [ "", "Date", "Title", "Source", "Authors", "Delete" ]
colNames = case rowsLoaded of
Docs _ -> T.ColumnName <$> [ "", "Date", "Title", "Journal", "", "" ]
Contacts _ -> T.ColumnName <$> [ "", "Contact", "Organization", "", "", "" ]
...
...
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
37e53658
...
...
@@ -133,36 +133,44 @@ sideTab _ _ = H.div {} []
-------------------------------------------
-- TODO
-- selectedNodes :: Record Props -> Map.Map String Nodes -> R.Element
selectedNodes props nodesMap = R2.row [ R2.col 12
[ RH.ul { id: "myTab", className: "nav nav-tabs", role: "tablist"}
[ RH.div { className: "tab-content" }
[ RH.div { className: "", role: "tabpanel" }
( Seq.toUnfoldable
$ ( Seq.map (badge props.selectedNodeIds)
(badges props.graph props.selectedNodeIds)
)
)
]
, RH.div { className: "tab-content flex-space-between" }
[ removeButton "Move as candidate" CandidateTerm props nodesMap
, removeButton "Move as stop" StopTerm props nodesMap
]
]
]
]
selectedNodes props nodesMap =
R2.row [ R2.col 12
[ RH.ul { id: "myTab", className: "nav nav-tabs", role: "tablist"}
[ RH.div { className: "tab-content" }
[ RH.div { className: ""
, role: "tabpanel" }
( Seq.toUnfoldable
$ ( Seq.map (badge props.selectedNodeIds)
(badges props.graph props.selectedNodeIds)
)
)
, H.br {}
]
]
, RH.div { className: "tab-content flex-space-between" }
[ removeButton "primary" "Move as candidate" CandidateTerm props nodesMap
, H.br {}
, removeButton "danger" "Move as stop" StopTerm props nodesMap
]
]
]
neighborhood props = RH.div { className: "tab-content", id: "myTabContent" }
[ RH.div { className: "", id: "home", role: "tabpanel" }
[ RH.div { -- className: "flex-space-around d-flex justify-content-center"
className: "flex-space-around d-flex"
, id: "home"
, role: "tabpanel"
}
(Seq.toUnfoldable $ Seq.map (badge props.selectedNodeIds)
$ neighbourBadges props.graph props.selectedNodeIds
)
]
removeButton text rType props' nodesMap' =
removeButton
btnType
text rType props' nodesMap' =
if Set.isEmpty $ fst props'.selectedNodeIds then
RH.div {} []
else
RH.button { className: "btn btn-
info"
RH.button { className: "btn btn-
" <> btnType
, on: { click: onClickRemove rType props' nodesMap' }
}
[ RH.text text ]
...
...
src/Gargantext/Components/Tab.purs
View file @
37e53658
...
...
@@ -14,7 +14,7 @@ thisModule = "Gargantext.Components.Tab"
type TabsProps = (
selected :: Int
, tabs :: Array (Tuple String R.Element)
, tabs
:: Array (Tuple String R.Element)
)
tabs :: Record TabsProps -> R.Element
...
...
@@ -29,17 +29,23 @@ tabsCpt = R.hooksComponentWithModule thisModule "tabs" cpt
pure $
H.div {}
[ H.nav {}
[ H.div { className: "nav nav-tabs"
, title : "Tab for ngrams"
}
(mapWithIndex (button setActiveTab activeTab) props.tabs) ]
, H.div { className: "tab-content" } $ mapWithIndex (item activeTab) props.tabs ]
[ H.br {}
, H.div { className: "nav nav-tabs"
, title : "Search result"
} [H.text "" ]
-- (mapWithIndex (button setActiveTab activeTab) props.tabs)
]
, H.div { className: "tab-content" }
$ mapWithIndex (item activeTab) props.tabs
]
{-
button setActiveTab selected index (name /\ _) =
H.a { className, on: { click } } [ H.text name ]
where
eq = index == selected
className = "nav-item nav-link" <> (if eq then " active" else "")
click e = setActiveTab (const index)
-}
item selected index (_ /\ cpt') = tab { selected, index } [ cpt' ]
-- TODO: document what these are (selection, item indices)
...
...
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