Commit 49b073c0 authored by Karen Konou's avatar Karen Konou

[Graph legend] Display first five nodes only

parent efe681cb
Pipeline #6926 passed with stages
in 15 minutes and 29 seconds
...@@ -5,16 +5,14 @@ module Gargantext.Components.GraphExplorer.Sidebar.Legend ...@@ -5,16 +5,14 @@ module Gargantext.Components.GraphExplorer.Sidebar.Legend
import Prelude hiding (map) import Prelude hiding (map)
import Control.Applicative (map) import Control.Applicative (map)
import Data.Array (fromFoldable, snoc) import Data.Array (fromFoldable)
import Data.Array as A import Data.Array as A
import Data.Foldable (length)
import Data.Maybe (isJust, maybe) import Data.Maybe (isJust, maybe)
import Data.Sequence (Seq, replace) import Data.Sequence (Seq, replace)
import Data.Set as Set import Data.Set as Set
import Data.Traversable (foldMap, intercalate) import Data.Traversable (foldMap, intercalate)
import Effect (Effect) import Effect (Effect)
import Effect.Aff (launchAff_) import Effect.Aff (launchAff_)
import Effect.Class (liftEffect)
import Gargantext.Components.Bootstrap as B import Gargantext.Components.Bootstrap as B
import Gargantext.Components.GraphExplorer.API (updateLegend) import Gargantext.Components.GraphExplorer.API (updateLegend)
import Gargantext.Components.GraphExplorer.GraphTypes as GEGT import Gargantext.Components.GraphExplorer.GraphTypes as GEGT
...@@ -51,7 +49,6 @@ legendCpt = here.component "legend" cpt where ...@@ -51,7 +49,6 @@ legendCpt = here.component "legend" cpt where
, selectedNodeIds , selectedNodeIds
, session , session
, graphId , graphId
, legendBox
} _ = do } _ = do
-- | Hooks -- | Hooks
-- | -- |
...@@ -169,7 +166,7 @@ selectedNodesCpt = here.component "selectedNodes" cpt where ...@@ -169,7 +166,7 @@ selectedNodesCpt = here.component "selectedNodes" cpt where
H.ul H.ul
{ className: "graph-legend-nodes" } { className: "graph-legend-nodes" }
[ [
flip foldMap (filterByCluster clusterId extractedNodeList) flip foldMap (A.take 5 (filterByCluster clusterId extractedNodeList))
\(GEGT.Node { label: nodeLabel, id_: nodeId }) -> \(GEGT.Node { label: nodeLabel, id_: nodeId }) ->
H.li H.li
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment