Commit 09e2e9d6 authored by Alexandre Delanoë's avatar Alexandre Delanoë

[Graph/SideTab] Right types names

parent 2ee876fb
...@@ -116,9 +116,9 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt ...@@ -116,9 +116,9 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt
RH.div RH.div
{ id: "graph-explorer" } { id: "graph-explorer" }
[ rowToggle [ rowToggle
[ col [ pullLeft [ Toggle.treeToggleButton controls.showTree ] ] [ col [ spaces [ Toggle.treeToggleButton controls.showTree ]]
, col [ Toggle.controlsToggleButton controls.showControls ] , col [ spaces [ Toggle.controlsToggleButton controls.showControls ]]
, col [ pullRight [ Toggle.sidebarToggleButton controls.showSidePanel ] ] , col [ spaces [ Toggle.sidebarToggleButton controls.showSidePanel ]]
], R2.row ], R2.row
[ outer [ outer
[ inner [ inner
...@@ -158,8 +158,10 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt ...@@ -158,8 +158,10 @@ explorerCpt = R.hooksComponent "G.C.GraphExplorer.explorer" cpt
rowToggle = RH.div { id: "toggle-container" } rowToggle = RH.div { id: "toggle-container" }
rowControls = RH.div { id: "controls-container" } rowControls = RH.div { id: "controls-container" }
col = RH.div { className: "col-md-4" } col = RH.div { className: "col-md-4" }
pullLeft = RH.div { className: "pull-left" } pullLeft = RH.div { className: "pull-left" }
pullRight = RH.div { className: "pull-right" } pullRight = RH.div { className: "pull-right" }
spaces = RH.div { className: "flex-space-between" }
tree :: Record TreeProps -> R.Element tree :: Record TreeProps -> R.Element
tree { show: false } = RH.div { id: "tree" } [] tree { show: false } = RH.div { id: "tree" } []
......
...@@ -94,7 +94,7 @@ controlsCpt = R.hooksComponent "GraphControls" cpt ...@@ -94,7 +94,7 @@ controlsCpt = R.hooksComponent "GraphControls" cpt
-- Automatic opening of sidebar when a node is selected (but only first time). -- Automatic opening of sidebar when a node is selected (but only first time).
R.useEffect' $ do R.useEffect' $ do
if fst props.showSidePanel == GET.InitialClosed && (not Set.isEmpty $ fst props.selectedNodeIds) then if fst props.showSidePanel == GET.InitialClosed && (not Set.isEmpty $ fst props.selectedNodeIds) then
snd props.showSidePanel $ \_ -> GET.Opened GET.SideTabSelection snd props.showSidePanel $ \_ -> GET.Opened GET.SideTabData
else else
pure unit pure unit
......
...@@ -57,7 +57,7 @@ sidebarCpt = R.hooksComponent "Sidebar" cpt ...@@ -57,7 +57,7 @@ sidebarCpt = R.hooksComponent "Sidebar" cpt
pure $ RH.div {} [] pure $ RH.div {} []
cpt props@{metaData, showSidePanel} _children = do cpt props@{metaData, showSidePanel} _children = do
pure $ RH.div { id: "sp-container" } pure $ RH.div { id: "sp-container" }
[ sideTabNav showSidePanel [SideTabLegend, SideTabSelection, SideTabPairing] [ sideTabNav showSidePanel [SideTabLegend, SideTabData, SideTabCommunity]
, sideTab (fst showSidePanel) props , sideTab (fst showSidePanel) props
] ]
...@@ -83,7 +83,7 @@ sideTab (Opened SideTabLegend) props@{metaData} = ...@@ -83,7 +83,7 @@ sideTab (Opened SideTabLegend) props@{metaData} =
let (GET.MetaData {legend}) = metaData let (GET.MetaData {legend}) = metaData
in Legend.legend { items: Seq.fromFoldable legend} in Legend.legend { items: Seq.fromFoldable legend}
sideTab (Opened SideTabSelection) props = sideTab (Opened SideTabData) props =
RH.div {} [ R2.row [ R2.col 12 RH.div {} [ R2.row [ R2.col 12
[ RH.ul { id: "myTab", className: "nav nav-tabs", role: "tablist"} [ RH.ul { id: "myTab", className: "nav nav-tabs", role: "tablist"}
[ RH.div { className: "tab-content" } [ RH.div { className: "tab-content" }
...@@ -99,7 +99,7 @@ sideTab (Opened SideTabSelection) props = ...@@ -99,7 +99,7 @@ sideTab (Opened SideTabSelection) props =
, removeButton "Move as 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 [ query props.frontends
......
...@@ -192,13 +192,13 @@ intColor i = unsafePartial $ fromJust $ defaultPalette !! (i `mod` length defaul ...@@ -192,13 +192,13 @@ intColor i = unsafePartial $ fromJust $ defaultPalette !! (i `mod` length defaul
data SidePanelState = InitialClosed | Opened SideTab | Closed data SidePanelState = InitialClosed | Opened SideTab | Closed
derive instance eqSidePanelState :: Eq SidePanelState derive instance eqSidePanelState :: Eq SidePanelState
data SideTab = SideTabLegend | SideTabSelection | SideTabPairing data SideTab = SideTabLegend | SideTabData | SideTabCommunity
derive instance eqSideTab :: Eq SideTab derive instance eqSideTab :: Eq SideTab
instance showSideTab :: Show SideTab where instance showSideTab :: Show SideTab where
show SideTabLegend = "Legend" show SideTabLegend = "Legend"
show SideTabSelection = "Navigation" show SideTabData = "Data"
show SideTabPairing = "Pairing" show SideTabCommunity = "Community"
......
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