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
5c915a86
Verified
Commit
5c915a86
authored
May 25, 2023
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ngrams] add missing SidePanel.purs, the panel renders ngrams now
parent
d05d7b2e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
12 deletions
+27
-12
Lists.purs
src/Gargantext/Components/Nodes/Lists.purs
+12
-11
SidePanel.purs
src/Gargantext/Components/Nodes/Lists/SidePanel.purs
+13
-0
Router.purs
src/Gargantext/Components/Router.purs
+2
-1
No files found.
src/Gargantext/Components/Nodes/Lists.purs
View file @
5c915a86
...
...
@@ -102,8 +102,8 @@ listsLayoutWithKeyCpt = here.component "listsLayoutWithKey" cpt where
sessionUpdate $ setCacheState session nodeId cacheState
type SidePanelProps =
( se
lectedNgrams :: T.Box (Maybe NgramsTerm)
, s
ession :: Session
( se
ssion :: Session
, s
idePanel :: T.Box (Maybe (Record SidePanel))
, sidePanelState :: T.Box GT.SidePanelState
)
...
...
@@ -113,7 +113,7 @@ sidePanelCpt :: R.Component SidePanelProps
sidePanelCpt = here.component "sidePanel" cpt
where
cpt { session
, s
electedNgrams
, s
idePanel
, sidePanelState } _ = do
sidePanelState' <- T.useLive T.unequal sidePanelState
...
...
@@ -131,19 +131,20 @@ sidePanelCpt = here.component "sidePanel" cpt
H.span { className: "fa fa-times" } []
]
]
, sidePanelNgramsContextView { se
lectedNgrams
, s
ession
} []
, sidePanelNgramsContextView { se
ssion
, s
idePanel
} []
]
type SidePanelNgramsContextView =
( se
lectedNgrams :: T.Box (Maybe NgramsTerm)
, s
ession :: Session
)
( se
ssion :: Session
, s
idePanel :: T.Box (Maybe (Record SidePanel))
)
sidePanelNgramsContextView :: R2.Component SidePanelNgramsContextView
sidePanelNgramsContextView = R.createElement sidePanelNgramsContextViewCpt
sidePanelNgramsContextViewCpt :: R.Component SidePanelNgramsContextView
sidePanelNgramsContextViewCpt = here.component "sidePanelNgramsContextView" cpt where
cpt { selectedNgrams
, session } _ = do
-- pure $ H.h4 {} [ H.text txt ]
pure $ H.div {} [ H.text "Hello ngrams" ]
cpt { session
, sidePanel } _ = do
sidePanel' <- T.useLive T.unequal sidePanel
pure $ H.div {} [ H.text $ show sidePanel' ]
src/Gargantext/Components/Nodes/Lists/SidePanel.purs
0 → 100644
View file @
5c915a86
module Gargantext.Components.Nodes.Lists.SidePanel where
import Data.Maybe (Maybe(..))
import Gargantext.Core.NgramsTable.Types (NgramsTerm)
-- type SidePanel :: forall k. Row k
type SidePanel = (
mCurrentNgrams :: Maybe NgramsTerm
)
initialSidePanel :: Maybe (Record SidePanel)
initialSidePanel = Nothing
src/Gargantext/Components/Router.purs
View file @
5c915a86
...
...
@@ -365,6 +365,7 @@ openedSidePanelCpt :: R.Component Props
openedSidePanelCpt = here.component "openedSidePanel" cpt where
cpt { boxes:
{ route
, sidePanelLists
, sidePanelState
}
} _ = do
...
...
@@ -380,7 +381,7 @@ openedSidePanelCpt = here.component "openedSidePanel" cpt where
GR.Lists _s _n -> do
pure $ wrapper
[ Lists.sidePanel { session
, s
electedNgram
s
, s
idePanel: sidePanelList
s
, sidePanelState } [] ]
GR.NodeTexts _s _n ->
pure $ wrapper [ Texts.textsSidePanel {} ]
...
...
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