Commit 9ad574b2 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

[graph explorer] move search to top bar

parent 1de56035
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
max-height: 300px; max-height: 300px;
overflow-y: scroll; overflow-y: scroll;
width: 300px; width: 300px;
top: 100px; top: 50px;
} }
#dafixedtop { #dafixedtop {
......
...@@ -24,6 +24,7 @@ import Gargantext.AsyncTasks as GAT ...@@ -24,6 +24,7 @@ import Gargantext.AsyncTasks as GAT
import Gargantext.Components.Forest (forest) import Gargantext.Components.Forest (forest)
import Gargantext.Components.Graph as Graph import Gargantext.Components.Graph as Graph
import Gargantext.Components.GraphExplorer.Controls as Controls import Gargantext.Components.GraphExplorer.Controls as Controls
import Gargantext.Components.GraphExplorer.Search (nodeSearchControl)
import Gargantext.Components.GraphExplorer.Sidebar as Sidebar import Gargantext.Components.GraphExplorer.Sidebar as Sidebar
import Gargantext.Components.GraphExplorer.ToggleButton as Toggle import Gargantext.Components.GraphExplorer.ToggleButton as Toggle
import Gargantext.Components.GraphExplorer.Types as GET import Gargantext.Components.GraphExplorer.Types as GET
...@@ -154,6 +155,9 @@ explorerCpt = R.hooksComponentWithModule thisModule "explorer" cpt ...@@ -154,6 +155,9 @@ explorerCpt = R.hooksComponentWithModule thisModule "explorer" cpt
[ rowToggle [ rowToggle
[ col [ spaces [ Toggle.treeToggleButton controls.showTree ]] [ col [ spaces [ Toggle.treeToggleButton controls.showTree ]]
, col [ spaces [ Toggle.controlsToggleButton controls.showControls ]] , col [ spaces [ Toggle.controlsToggleButton controls.showControls ]]
, col [ spaces [ nodeSearchControl { graph
, multiSelectEnabled: controls.multiSelectEnabled
, selectedNodeIds: controls.selectedNodeIds } [] ] ]
, col [ spaces [ Toggle.sidebarToggleButton controls.showSidePanel ]] , col [ spaces [ Toggle.sidebarToggleButton controls.showSidePanel ]]
] ]
] ]
......
...@@ -23,7 +23,6 @@ import Reactix.DOM.HTML as RH ...@@ -23,7 +23,6 @@ import Reactix.DOM.HTML as RH
import Gargantext.Components.Graph as Graph import Gargantext.Components.Graph as Graph
import Gargantext.Components.GraphExplorer.Button (centerButton, cameraButton) import Gargantext.Components.GraphExplorer.Button (centerButton, cameraButton)
import Gargantext.Components.GraphExplorer.RangeControl (edgeConfluenceControl, edgeWeightControl, nodeSizeControl) import Gargantext.Components.GraphExplorer.RangeControl (edgeConfluenceControl, edgeWeightControl, nodeSizeControl)
import Gargantext.Components.GraphExplorer.Search (nodeSearchControl)
import Gargantext.Components.GraphExplorer.SlideButton (labelSizeButton, mouseSelectorSizeButton) import Gargantext.Components.GraphExplorer.SlideButton (labelSizeButton, mouseSelectorSizeButton)
import Gargantext.Components.GraphExplorer.ToggleButton (multiSelectEnabledButton, edgesToggleButton, louvainToggleButton, pauseForceAtlasButton) import Gargantext.Components.GraphExplorer.ToggleButton (multiSelectEnabledButton, edgesToggleButton, louvainToggleButton, pauseForceAtlasButton)
import Gargantext.Components.GraphExplorer.Types as GET import Gargantext.Components.GraphExplorer.Types as GET
...@@ -31,8 +30,8 @@ import Gargantext.Hooks.Sigmax as Sigmax ...@@ -31,8 +30,8 @@ import Gargantext.Hooks.Sigmax as Sigmax
import Gargantext.Hooks.Sigmax.Types as SigmaxT import Gargantext.Hooks.Sigmax.Types as SigmaxT
import Gargantext.Sessions (Session) import Gargantext.Sessions (Session)
import Gargantext.Utils.Range as Range import Gargantext.Utils.Range as Range
import Gargantext.Utils.Reactix as R2
thisModule :: String
thisModule = "Gargantext.Components.GraphExplorer.Controls" thisModule = "Gargantext.Components.GraphExplorer.Controls"
type Controls = type Controls =
...@@ -160,9 +159,6 @@ controlsCpt = R.hooksComponentWithModule thisModule "controls" cpt ...@@ -160,9 +159,6 @@ controlsCpt = R.hooksComponentWithModule thisModule "controls" cpt
-- zoom: 0 -100 - calculate ratio -- zoom: 0 -100 - calculate ratio
, RH.li { className: "nav-item" } [ multiSelectEnabledButton props.multiSelectEnabled ] -- toggle multi node selection , RH.li { className: "nav-item" } [ multiSelectEnabledButton props.multiSelectEnabled ] -- toggle multi node selection
-- save button -- save button
, RH.li { className: "nav-item" } [ nodeSearchControl { graph: props.graph
, multiSelectEnabled: props.multiSelectEnabled
, selectedNodeIds: props.selectedNodeIds } ]
, RH.li { className: "nav-item" } [ mouseSelectorSizeButton props.sigmaRef localControls.mouseSelectorSize ] , RH.li { className: "nav-item" } [ mouseSelectorSizeButton props.sigmaRef localControls.mouseSelectorSize ]
, RH.li { className: "nav-item" } [ cameraButton { id: props.graphId , RH.li { className: "nav-item" } [ cameraButton { id: props.graphId
, hyperdataGraph: props.hyperdataGraph , hyperdataGraph: props.hyperdataGraph
......
...@@ -17,6 +17,7 @@ import Gargantext.Hooks.Sigmax.Types as SigmaxT ...@@ -17,6 +17,7 @@ import Gargantext.Hooks.Sigmax.Types as SigmaxT
import Gargantext.Utils (queryMatchesLabel) import Gargantext.Utils (queryMatchesLabel)
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
thisModule :: String
thisModule = "Gargantext.Components.GraphExplorer.Search" thisModule = "Gargantext.Components.GraphExplorer.Search"
type Props = ( type Props = (
...@@ -33,8 +34,8 @@ searchNodes :: String -> Seq.Seq (Record SigmaxT.Node) -> Seq.Seq (Record Sigmax ...@@ -33,8 +34,8 @@ searchNodes :: String -> Seq.Seq (Record SigmaxT.Node) -> Seq.Seq (Record Sigmax
searchNodes "" _ = Seq.empty searchNodes "" _ = Seq.empty
searchNodes s nodes = Seq.filter (nodeMatchesSearch s) nodes searchNodes s nodes = Seq.filter (nodeMatchesSearch s) nodes
nodeSearchControl :: Record Props -> R.Element nodeSearchControl :: R2.Component Props
nodeSearchControl props = R.createElement sizeButtonCpt props [] nodeSearchControl = R.createElement sizeButtonCpt
sizeButtonCpt :: R.Component Props sizeButtonCpt :: R.Component Props
sizeButtonCpt = R.hooksComponentWithModule thisModule "nodeSearchControl" cpt sizeButtonCpt = R.hooksComponentWithModule thisModule "nodeSearchControl" cpt
......
...@@ -82,4 +82,4 @@ ...@@ -82,4 +82,4 @@
max-height: 300px max-height: 300px
overflow-y: scroll overflow-y: scroll
width: 300px width: 300px
top: 100px top: 50px
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