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
fd95f968
Commit
fd95f968
authored
Jul 24, 2019
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Tabs] MoreLikeFav/MoreLikeTrash tabs working now
parent
df8f7022
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
46 deletions
+23
-46
Specs.purs
src/Gargantext/Pages/Texts/Tabs/Specs.purs
+23
-46
No files found.
src/Gargantext/Pages/Texts/Tabs/Specs.purs
View file @
fd95f968
...
...
@@ -52,14 +52,9 @@ statefulTabs :: Spec Tab.State Props Tab.Action
statefulTabs =
Tab.tabs identity identity $ fromFoldable
[ Tuple "Documents" $ docs
--, Tuple "Sources" $ ngramsViewSpec {mode: Sources }
--, Tuple "Authors" $ ngramsViewSpec {mode: Authors }
--, Tuple "Institutes" $ ngramsViewSpec {mode: Institutes}
--, Tuple "Terms" $ ngramsViewSpec {mode: Terms }
--, Tuple "" $ trash -- TODO empty here
, Tuple "Trash" $ trash
, Tuple "More like fav" $
docs -- TODO
, Tuple "More like trash" $
docs -- TODO
, Tuple "More like fav" $
moreLikeFav
, Tuple "More like trash" $
moreLikeTrash
]
where
-- TODO totalRecords
...
...
@@ -76,6 +71,27 @@ statefulTabs =
, corpusId: Just corpusId}) $ noState DT.docViewSpec
)
)
moreLikeFav = noState (cmapProps (\{corpusId, corpusData: {defaultListId}} ->
{ nodeId: corpusId
-- ^ TODO merge nodeId and corpusId in DT
, chart : div [][]
, tabType: TabCorpus TabMoreLikeFav
, totalRecords: 4737
, listId: defaultListId
, corpusId: Just corpusId}) $ noState DT.docViewSpec
)
moreLikeTrash = noState (cmapProps (\{corpusId, corpusData: {defaultListId}} ->
{ nodeId: corpusId
-- ^ TODO merge nodeId and corpusId in DT
, chart : div [][]
, tabType: TabCorpus TabMoreLikeTrash
, totalRecords: 4737
, listId: defaultListId
, corpusId: Just corpusId}) $ noState DT.docViewSpec
)
trash = cmapProps (\{corpusId, corpusData: {defaultListId}} ->
{ nodeId: corpusId
, chart: div [][]
...
...
@@ -83,42 +99,3 @@ statefulTabs =
, totalRecords: 4736
, listId: defaultListId
, corpusId: Nothing}) $ noState DT.docViewSpec
-- data Mode = Authors | Sources | Institutes | Terms
-- derive instance genericMode :: Generic Mode _
-- instance showMode :: Show Mode where
-- show = genericShow
-- derive instance eqMode :: Eq Mode
-- modeTabType :: Mode -> CTabNgramType
-- modeTabType Authors = CTabAuthors
-- modeTabType Sources = CTabSources
-- modeTabType Institutes = CTabInstitutes
-- modeTabType Terms = CTabTerms
-- ngramsViewSpec :: {mode :: Mode} -> Spec Tab.State Props Tab.Action
-- ngramsViewSpec {mode} =
-- noState $ chart mode <>
-- cmapProps (\{corpusData: {defaultListId}, corpusId: nodeId} ->
-- {defaultListId, nodeId, tabType})
-- (NT.mainNgramsTableSpec (modeTabType mode))
-- where
-- tabType = TabCorpus $ TabNgramType $ modeTabType mode
-- chart Authors = cmapProps (\{corpusId} -> {corpusId, tabType}) pieSpec
-- chart Sources = cmapProps (\{corpusId} -> {corpusId, tabType}) barSpec
-- chart Institutes = cmapProps (\{corpusData: {defaultListId}, corpusId} ->
-- {corpusId, listId: defaultListId, tabType, limit: (Just 1000)})
-- treeSpec
-- chart Terms = cmapProps (\{corpusData: {defaultListId}, corpusId} ->
-- {corpusId, listId: defaultListId, tabType, limit: (Just 1000)})
-- -- TODO limit should be select in the chart by default it is 1000
-- metricsSpec
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