Commit 35cc7a87 authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge remote-tracking branch 'origin/arturo-dev-230109-sidebar-closing-rc0.x' into dev

parents fcdd3517 c86d583e
...@@ -9530,6 +9530,11 @@ input[type=range]:-moz-focusring { ...@@ -9530,6 +9530,11 @@ input[type=range]:-moz-focusring {
width: 100%; width: 100%;
display: block; display: block;
} }
.graph-sidebar__close {
position: absolute;
right: 0;
margin-right: 24px;
}
.graph-sidebar__legend-tab { .graph-sidebar__legend-tab {
padding: 16px 20px; padding: 16px 20px;
} }
...@@ -11564,6 +11569,11 @@ select.form-control { ...@@ -11564,6 +11569,11 @@ select.form-control {
width: 100%; width: 100%;
display: block; display: block;
} }
.phylo-sidebar__close {
position: absolute;
right: 0;
margin-right: 24px;
}
.phylo-details-tab__counter { .phylo-details-tab__counter {
margin: 16px 20px; margin: 16px 20px;
......
...@@ -9479,6 +9479,11 @@ input[type=range]:-moz-focusring { ...@@ -9479,6 +9479,11 @@ input[type=range]:-moz-focusring {
width: 100%; width: 100%;
display: block; display: block;
} }
.graph-sidebar__close {
position: absolute;
right: 0;
margin-right: 24px;
}
.graph-sidebar__legend-tab { .graph-sidebar__legend-tab {
padding: 16px 20px; padding: 16px 20px;
} }
...@@ -11510,6 +11515,11 @@ select.form-control { ...@@ -11510,6 +11515,11 @@ select.form-control {
width: 100%; width: 100%;
display: block; display: block;
} }
.phylo-sidebar__close {
position: absolute;
right: 0;
margin-right: 24px;
}
.phylo-details-tab__counter { .phylo-details-tab__counter {
margin: 16px 20px; margin: 16px 20px;
......
...@@ -9239,6 +9239,11 @@ input[type=range]:-moz-focusring { ...@@ -9239,6 +9239,11 @@ input[type=range]:-moz-focusring {
width: 100%; width: 100%;
display: block; display: block;
} }
.graph-sidebar__close {
position: absolute;
right: 0;
margin-right: 24px;
}
.graph-sidebar__legend-tab { .graph-sidebar__legend-tab {
padding: 16px 20px; padding: 16px 20px;
} }
...@@ -11273,6 +11278,11 @@ select.form-control { ...@@ -11273,6 +11278,11 @@ select.form-control {
width: 100%; width: 100%;
display: block; display: block;
} }
.phylo-sidebar__close {
position: absolute;
right: 0;
margin-right: 24px;
}
.phylo-details-tab__counter { .phylo-details-tab__counter {
margin: 16px 20px; margin: 16px 20px;
......
...@@ -9487,6 +9487,11 @@ input[type=range]:-moz-focusring { ...@@ -9487,6 +9487,11 @@ input[type=range]:-moz-focusring {
width: 100%; width: 100%;
display: block; display: block;
} }
.graph-sidebar__close {
position: absolute;
right: 0;
margin-right: 24px;
}
.graph-sidebar__legend-tab { .graph-sidebar__legend-tab {
padding: 16px 20px; padding: 16px 20px;
} }
...@@ -11521,6 +11526,11 @@ select.form-control { ...@@ -11521,6 +11526,11 @@ select.form-control {
width: 100%; width: 100%;
display: block; display: block;
} }
.phylo-sidebar__close {
position: absolute;
right: 0;
margin-right: 24px;
}
.phylo-details-tab__counter { .phylo-details-tab__counter {
margin: 16px 20px; margin: 16px 20px;
......
...@@ -9488,6 +9488,11 @@ input[type=range]:-moz-focusring { ...@@ -9488,6 +9488,11 @@ input[type=range]:-moz-focusring {
width: 100%; width: 100%;
display: block; display: block;
} }
.graph-sidebar__close {
position: absolute;
right: 0;
margin-right: 24px;
}
.graph-sidebar__legend-tab { .graph-sidebar__legend-tab {
padding: 16px 20px; padding: 16px 20px;
} }
...@@ -11522,6 +11527,11 @@ select.form-control { ...@@ -11522,6 +11527,11 @@ select.form-control {
width: 100%; width: 100%;
display: block; display: block;
} }
.phylo-sidebar__close {
position: absolute;
right: 0;
margin-right: 24px;
}
.phylo-details-tab__counter { .phylo-details-tab__counter {
margin: 16px 20px; margin: 16px 20px;
......
...@@ -23,7 +23,7 @@ import Effect.Aff (launchAff_) ...@@ -23,7 +23,7 @@ import Effect.Aff (launchAff_)
import Effect.Class (liftEffect) import Effect.Class (liftEffect)
import Gargantext.Components.App.Store as AppStore import Gargantext.Components.App.Store as AppStore
import Gargantext.Components.Bootstrap as B import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (ButtonVariant(..), Variant(..)) import Gargantext.Components.Bootstrap.Types (ButtonVariant(..), Elevation(..), Variant(..))
import Gargantext.Components.GraphExplorer.Sidebar.ContactList (contactListWrapper) import Gargantext.Components.GraphExplorer.Sidebar.ContactList (contactListWrapper)
import Gargantext.Components.GraphExplorer.Sidebar.DocList (docListWrapper) import Gargantext.Components.GraphExplorer.Sidebar.DocList (docListWrapper)
import Gargantext.Components.GraphExplorer.Sidebar.Legend as Legend import Gargantext.Components.GraphExplorer.Sidebar.Legend as Legend
...@@ -39,7 +39,7 @@ import Gargantext.Ends (Frontends) ...@@ -39,7 +39,7 @@ import Gargantext.Ends (Frontends)
import Gargantext.Hooks.FirstEffect (useFirstEffect') import Gargantext.Hooks.FirstEffect (useFirstEffect')
import Gargantext.Hooks.Sigmax.Types as SigmaxT import Gargantext.Hooks.Sigmax.Types as SigmaxT
import Gargantext.Sessions (Session) import Gargantext.Sessions (Session)
import Gargantext.Types (CTabNgramType, FrontendError(..), NodeID, TabSubType(..), TabType(..), TermList(..), modeTabType) import Gargantext.Types (CTabNgramType, FrontendError(..), NodeID, SidePanelState(..), TabSubType(..), TabType(..), TermList(..), modeTabType)
import Gargantext.Utils (getter, nbsp, setter, (?)) import Gargantext.Utils (getter, nbsp, setter, (?))
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as T2 import Gargantext.Utils.Toestand as T2
...@@ -63,13 +63,16 @@ sidebar = R2.leaf sidebarCpt ...@@ -63,13 +63,16 @@ sidebar = R2.leaf sidebarCpt
sidebarCpt :: R.Component Props sidebarCpt :: R.Component Props
sidebarCpt = here.component "sidebar" cpt where sidebarCpt = here.component "sidebar" cpt where
cpt props _ = do cpt props _ = do
-- States -- | States
-- |
{ sideTab { sideTab
, showSidebar
} <- GraphStore.use } <- GraphStore.use
sideTab' <- R2.useLive' sideTab sideTab' <- R2.useLive' sideTab
-- Computed -- | Computed
-- |
let let
sideTabs = sideTabs =
[ GET.SideTabLegend [ GET.SideTabLegend
...@@ -77,12 +80,27 @@ sidebarCpt = here.component "sidebar" cpt where ...@@ -77,12 +80,27 @@ sidebarCpt = here.component "sidebar" cpt where
, GET.SideTabCommunity , GET.SideTabCommunity
] ]
-- Render -- | Behaviors
-- |
let
closeCallback :: Unit -> Effect Unit
closeCallback _ = T.write_ Closed showSidebar
-- | Render
-- |
pure $ pure $
H.div H.div
{ className: "graph-sidebar" } { className: "graph-sidebar" }
[ [
-- Close CTA
B.iconButton
{ name: "times"
, elevation: Level2
, callback: closeCallback
, className: "graph-sidebar__close"
}
,
-- Menu -- Menu
B.tabs B.tabs
{ value: sideTab' { value: sideTab'
......
...@@ -6,10 +6,12 @@ import Gargantext.Prelude ...@@ -6,10 +6,12 @@ import Gargantext.Prelude
import Effect (Effect) import Effect (Effect)
import Gargantext.Components.Bootstrap as B import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (Elevation(..))
import Gargantext.Components.PhyloExplorer.DetailsTab (detailsTab) import Gargantext.Components.PhyloExplorer.DetailsTab (detailsTab)
import Gargantext.Components.PhyloExplorer.SelectionTab (selectionTab) import Gargantext.Components.PhyloExplorer.SelectionTab (selectionTab)
import Gargantext.Components.PhyloExplorer.Store as PhyloStore import Gargantext.Components.PhyloExplorer.Store as PhyloStore
import Gargantext.Components.PhyloExplorer.Types (TabView(..)) import Gargantext.Components.PhyloExplorer.Types (TabView(..))
import Gargantext.Types (SidePanelState(..))
import Gargantext.Utils.Reactix as R2 import Gargantext.Utils.Reactix as R2
import Reactix as R import Reactix as R
import Reactix.DOM.HTML as H import Reactix.DOM.HTML as H
...@@ -32,6 +34,7 @@ component = R.hooksComponent componentName cpt where ...@@ -32,6 +34,7 @@ component = R.hooksComponent componentName cpt where
-- | -- |
{ sideBarTabView { sideBarTabView
, phyloId , phyloId
, sideBarDisplayed
} <- PhyloStore.use } <- PhyloStore.use
sideBarTabView' <- R2.useLive' sideBarTabView sideBarTabView' <- R2.useLive' sideBarTabView
...@@ -42,6 +45,12 @@ component = R.hooksComponent componentName cpt where ...@@ -42,6 +45,12 @@ component = R.hooksComponent componentName cpt where
let let
tabList = [ DetailsTab, SelectionTab ] tabList = [ DetailsTab, SelectionTab ]
-- | Behaviors
-- |
let
closeCallback :: Unit -> Effect Unit
closeCallback _ = T.write_ Closed sideBarDisplayed
-- | Render -- | Render
-- | -- |
pure $ pure $
...@@ -49,6 +58,14 @@ component = R.hooksComponent componentName cpt where ...@@ -49,6 +58,14 @@ component = R.hooksComponent componentName cpt where
H.div H.div
{ className: "phylo-sidebar" } { className: "phylo-sidebar" }
[ [
-- Close CTA
B.iconButton
{ name: "times"
, elevation: Level2
, callback: closeCallback
, className: "phylo-sidebar__close"
}
,
-- Menu -- Menu
B.tabs B.tabs
{ value: sideBarTabView' { value: sideBarTabView'
......
...@@ -122,6 +122,11 @@ ...@@ -122,6 +122,11 @@
$margin-x: $sidebar-tab-margin-x $margin-x: $sidebar-tab-margin-x
$margin-y: space-x(2) $margin-y: space-x(2)
&__close
position: absolute
right: 0
margin-right: space-x(3)
&__legend-tab &__legend-tab
padding: $margin-y $margin-x padding: $margin-y $margin-x
......
...@@ -549,6 +549,12 @@ $decreasing-color: #11638F; ...@@ -549,6 +549,12 @@ $decreasing-color: #11638F;
.phylo-sidebar { .phylo-sidebar {
@include term-window; @include term-window;
&__close {
position: absolute;
right: 0;
margin-right: space-x(3);
}
} }
.phylo-details-tab { .phylo-details-tab {
......
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