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
e3c71d1e
Commit
e3c71d1e
authored
Apr 19, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[graph] fixed sidebar
Error is still shown because of some docView issues.
parent
55442dc4
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
188 additions
and
153 deletions
+188
-153
sass.css
dist/styles/sass.css
+6
-5
sass.css.map
dist/styles/sass.css.map
+1
-1
App.purs
src/Gargantext/Components/App.purs
+0
-1
GraphExplorer.purs
src/Gargantext/Components/GraphExplorer.purs
+46
-25
Controls.purs
src/Gargantext/Components/GraphExplorer/Controls.purs
+0
-3
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+73
-51
Tabs.purs
src/Gargantext/Components/Nodes/Corpus/Graph/Tabs.purs
+5
-6
Router.purs
src/Gargantext/Components/Router.purs
+36
-39
_styles.sass
src/sass/_styles.sass
+21
-22
No files found.
dist/styles/sass.css
View file @
e3c71d1e
...
@@ -642,10 +642,11 @@ li .leaf:hover a.settings {
...
@@ -642,10 +642,11 @@ li .leaf:hover a.settings {
list-style
:
decimal
!important
;
list-style
:
decimal
!important
;
}
}
#page-wrapper
.cache-toggle
{
.cache-toggle
{
cursor
:
pointer
;
cursor
:
pointer
;
}
}
#page-wrapper
.side-panel
{
.side-panel
{
left
:
70%
;
left
:
70%
;
padding
:
5px
;
padding
:
5px
;
position
:
fixed
;
position
:
fixed
;
...
@@ -653,14 +654,14 @@ li .leaf:hover a.settings {
...
@@ -653,14 +654,14 @@ li .leaf:hover a.settings {
background-color
:
#fff
;
background-color
:
#fff
;
width
:
28%
;
width
:
28%
;
}
}
#page-wrapper
.side-panel
.header
{
.side-panel
.header
{
float
:
right
;
float
:
right
;
}
}
#page-wrapper
.side-panel
.corpus-doc-view
.annotated-field-wrapper
.annotated-field-runs
{
.side-panel
.corpus-doc-view
.annotated-field-wrapper
.annotated-field-runs
{
max-height
:
200px
;
max-height
:
200px
;
overflow-y
:
scroll
;
overflow-y
:
scroll
;
}
}
#page-wrapper
.side-panel
.corpus-doc-view
.list-group
.list-group-item-heading
{
.side-panel
.corpus-doc-view
.list-group
.list-group-item-heading
{
display
:
inline-block
;
display
:
inline-block
;
width
:
60px
;
width
:
60px
;
}
}
...
...
dist/styles/sass.css.map
View file @
e3c71d1e
{"version":3,"sourceRoot":"","sources":["../../src/sass/_menu.sass","../../src/sass/_context_menu.sass","../../src/sass/_graph.sass","../../src/sass/_login.sass","../../src/sass/_tree.sass","../../src/sass/_code_editor.sass","../../src/sass/_styles.sass","../../src/sass/_range_slider.sass","../../src/sass/_annotation.sass","../../src/sass/_folder_view.sass"],"names":[],"mappings":"AAAA;AAEA;AACA;AACA;AACA;AACA;AAEA;EACI;EACA;;;AAEJ;EACI;EACA;EACA;EACA;;;AAEJ;EACE;;;AAEF;AACI;EACA;;;AAEJ;AACI;EACA;;;AAGJ;AACA;EACI;;;AAEJ;EACI;EACA;EACA;EACA;;;AAEJ;EACE;EACA;;;AAEF;EACE;;;AC7CF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;AClBF;EACE;EACA;EACA;;;AAEF;AAkCE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAxCA;EAZA;EACA;EAEA;EAWE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEF;EACE;EACA;;AAGA;EACE;EACA;;AACN;EACE;;AACF;EACE;;AAEF;EApCA;EACA;EAEA;EAmCE;EACA;;AACF;EACE;;AACF;EACE;;AAWF;EAEE;EACA;EACA;EACA;EAEA;EACA;EACA;;AAEA;EACE;;AAEJ;EACE;;AAEA;EACE;;AAEJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;ACrFJ;EACE;;;AAOF;EACE;;AACA;EACE;EACA;;;AAEJ;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;AAEE;EACE;EACA;;AACA;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAKJ;EACE;EACA;EACA;;;AAGJ;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AACF;EACE;EACA;;AACA;EACE;EACA;EACA;EACA;;AACA;EACE;;AACF;EACE;EACA;EACA;EACA;;AACA;EACE;;AACN;EACE;EACA;EACA;EACA;;;AAGN;EACE;EACA;EACA;EACA;EACA;;AAGE;EACE;;;AAEN;EACE;EACA;EACA;EACA;EACA;;AAGE;EACE;;;AAEN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;;AAEJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;;;AAGF;EACE;;;AAEJ;EACI;EACA;;;AAGF;EACE;;;AAEJ;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;ACvKF;EACE;;;AAGA;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGA;EACE;;AACF;EACE;;AAEJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAGN;EACE;;;AAIA;EACE;;AACA;EACE;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;EACA;EACA;;AACF;EACE;;AACF;EACE;EACA;EACA;EAEA;EACA;EACA;;AAEA;EACE;;AACF;EACE;;AAGN;EACE;;AACF;EACE;;AACA;EACE;EACA;;AAEE;EACE;EACA;;AACF;EACE;EACA;;AAIR;EACE;;AACF;EACE;;AACA;EACE;EACA;;AAEE;EACE;EACA;;AACF;EACE;EACA;;AACF;EACE;EACA;;AAEV;EACE;;AACF;EACE;;AAEE;EACE;;AACF;EACE;;AACN;EACE;;AAEE;EACE;;;AAGR;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAEF;EACE;;;AAIF;EACE;;AAEA;EACE;;;AAGN;EACE;;AACF;EACE;;AACF;EACE;;;AAEJ;EACE;;;ACpJE;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EApCR;EACA;EACA;EACA;EACA;EACA;EACA;EAlBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AA0CM;EACE;EACA;EACA;EACA;EACA;EA5CR;EACA;EACA;EACA;EACA;EACA;EACA;EAlBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAkDE;EACE;EACA;EACA;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;;AACA;EACE;EACA;;AACF;EACE;EACA;;AACF;EACE;EACA;;AAGE;EACE;;AAEF;EACE;;;ACrFV;EACE;;AACF;EAEE;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAGE;EACE;EACA;;AAEF;EACE;EACA;;;AAEV;EACE;;AACA;EACE;;AACF;EACE;EACA;EACA;;;AAIA;EACE;;AACA;EACE;EACA;;AACF;EACE;;AACA;EACE;;AACJ;EACE;;;AAER;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;AAGI;EACE;;AACF;EACE;;;AAEN;EACE;EACA;EACA;;;AAIA;EACE;;AACF;EACE;;;AAEJ;EACE;;AACA;EACE;;;AAEJ;EACE;EACA;;;AClFF;EACE;AACA;EACA;;AAEA;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EAEA;EAEA;;AAEA;EACE;EAEA;EACA;EACA;;;AAGN;EACE;;;ACxBJ;EACE;;AAEA;EANE;EACA;;AAQF;EAbE;EACA;;AAeF;EAhBE;EACA;;AAkBF;EAnBE;EACA;;AAqBF;EA1BE;EACA,kBANyB;;AAkC3B;EA7BE;EACA,kBAPqB;;AAsCvB;EAhCE;EACA,kBAJoB;;;AAuCtB;EApCE;EACA,kBANyB;;AA4C3B;EAvCE;EACA,kBAPqB;;AAgDvB;EA1CE;EACA,kBAJoB;;;ACRxB;EACE;EACA;EACA;EACA","file":"sass.css"}
{"version":3,"sourceRoot":"","sources":["../../src/sass/_menu.sass","../../src/sass/_context_menu.sass","../../src/sass/_graph.sass","../../src/sass/_login.sass","../../src/sass/_tree.sass","../../src/sass/_code_editor.sass","../../src/sass/_styles.sass","../../src/sass/_range_slider.sass","../../src/sass/_annotation.sass","../../src/sass/_folder_view.sass"],"names":[],"mappings":"AAAA;AAEA;AACA;AACA;AACA;AACA;AAEA;EACI;EACA;;;AAEJ;EACI;EACA;EACA;EACA;;;AAEJ;EACE;;;AAEF;AACI;EACA;;;AAEJ;AACI;EACA;;;AAGJ;AACA;EACI;;;AAEJ;EACI;EACA;EACA;EACA;;;AAEJ;EACE;EACA;;;AAEF;EACE;;;AC7CF;EACE;EACA;EACA;EACA;EACA;;;AAEF;EACE;;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;;;AClBF;EACE;EACA;EACA;;;AAEF;AAkCE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAxCA;EAZA;EACA;EAEA;EAWE;EACA;EACA;EACA;;AAEA;EACE;EACA;;AAEF;EACE;EACA;;AAGA;EACE;EACA;;AACN;EACE;;AACF;EACE;;AAEF;EApCA;EACA;EAEA;EAmCE;EACA;;AACF;EACE;;AACF;EACE;;AAWF;EAEE;EACA;EACA;EACA;EAEA;EACA;EACA;;AAEA;EACE;;AAEJ;EACE;;AAEA;EACE;;AAEJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;EACA;;;ACrFJ;EACE;;;AAOF;EACE;;AACA;EACE;EACA;;;AAEJ;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAGF;EACE;;AAEE;EACE;EACA;;AACA;EACE;;;AAIJ;EACE;EACA;EACA;EACA;;;AAKJ;EACE;EACA;EACA;;;AAGJ;EACE;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;;AACF;EACE;EACA;;AACA;EACE;EACA;EACA;EACA;;AACA;EACE;;AACF;EACE;EACA;EACA;EACA;;AACA;EACE;;AACN;EACE;EACA;EACA;EACA;;;AAGN;EACE;EACA;EACA;EACA;EACA;;AAGE;EACE;;;AAEN;EACE;EACA;EACA;EACA;EACA;;AAGE;EACE;;;AAEN;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;;;AAEJ;EACE;EACA;;;AAGF;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;;;AAGF;EACE;;;AAEJ;EACI;EACA;;;AAGF;EACE;;;AAEJ;EACE;;;AAEF;EACE;EACA;;;AAEF;EACE;EACA;EACA;;;AAEF;EACE;EACA;;;AAEF;EACE;;;ACvKF;EACE;;;AAGA;EACE;EACA;EACA;;AAEA;EACE;EACA;;AAGA;EACE;;AACF;EACE;;AAEJ;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;;;AAGN;EACE;;;AAIA;EACE;;AACA;EACE;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;EACA;EACA;;AACF;EACE;;AACF;EACE;EACA;EACA;EAEA;EACA;EACA;;AAEA;EACE;;AACF;EACE;;AAGN;EACE;;AACF;EACE;;AACA;EACE;EACA;;AAEE;EACE;EACA;;AACF;EACE;EACA;;AAIR;EACE;;AACF;EACE;;AACA;EACE;EACA;;AAEE;EACE;EACA;;AACF;EACE;EACA;;AACF;EACE;EACA;;AAEV;EACE;;AACF;EACE;;AAEE;EACE;;AACF;EACE;;AACN;EACE;;AAEE;EACE;;;AAGR;EACE;EACA;EACA;EACA;EACA;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAEA;EAEE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;;AAEF;EACE;;;AAIF;EACE;;AAEA;EACE;;;AAGN;EACE;;AACF;EACE;;AACF;EACE;;;AAEJ;EACE;;;ACpJE;EACE;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EApCR;EACA;EACA;EACA;EACA;EACA;EACA;EAlBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AA0CM;EACE;EACA;EACA;EACA;EACA;EA5CR;EACA;EACA;EACA;EACA;EACA;EACA;EAlBA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;;AAkDE;EACE;EACA;EACA;EACA;EACA;EACA;;AACF;EACE;EACA;EACA;;AACA;EACE;EACA;;AACF;EACE;EACA;;AACF;EACE;EACA;;AAGE;EACE;;AAEF;EACE;;;ACtFZ;EACE;;;AACF;EAEE;EACA;EACA;EACA;EACA;EACA;;AACA;EACE;;AAGE;EACE;EACA;;AAEF;EACE;EACA;;;AAER;EACE;;AACA;EACE;;AACF;EACE;EACA;EACA;;;AAIA;EACE;;AACA;EACE;EACA;;AACF;EACE;;AACA;EACE;;AACJ;EACE;;;AAER;EACE;;;AAEF;EACE;;;AAEF;EACE;;;AAEF;AAGI;EACE;;AACF;EACE;;;AAEN;EACE;EACA;EACA;;;AAIA;EACE;;AACF;EACE;;;AAEJ;EACE;;AACA;EACE;;;AAEJ;EACE;EACA;;;ACjFF;EACE;AACA;EACA;;AAEA;EACE;EACA;;AAEA;EACE;EACA;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;;AAEF;EACE;EACA;EACA;EACA;EACA;EACA;EACA;EAEA;EAEA;EAEA;;AAEA;EACE;EAEA;EACA;EACA;;;AAGN;EACE;;;ACxBJ;EACE;;AAEA;EANE;EACA;;AAQF;EAbE;EACA;;AAeF;EAhBE;EACA;;AAkBF;EAnBE;EACA;;AAqBF;EA1BE;EACA,kBANyB;;AAkC3B;EA7BE;EACA,kBAPqB;;AAsCvB;EAhCE;EACA,kBAJoB;;;AAuCtB;EApCE;EACA,kBANyB;;AA4C3B;EAvCE;EACA,kBAPqB;;AAgDvB;EA1CE;EACA,kBAJoB;;;ACRxB;EACE;EACA;EACA;EACA","file":"sass.css"}
\ No newline at end of file
\ No newline at end of file
src/Gargantext/Components/App.purs
View file @
e3c71d1e
...
@@ -2,7 +2,6 @@ module Gargantext.Components.App (app) where
...
@@ -2,7 +2,6 @@ module Gargantext.Components.App (app) where
import Gargantext.Prelude
import Gargantext.Prelude
import Data.Maybe (Maybe(..))
import Gargantext.AsyncTasks as GAT
import Gargantext.AsyncTasks as GAT
import Gargantext.Components.App.Data (emptyApp)
import Gargantext.Components.App.Data (emptyApp)
import Gargantext.Components.Router (router)
import Gargantext.Components.Router (router)
...
...
src/Gargantext/Components/GraphExplorer.purs
View file @
e3c71d1e
...
@@ -12,23 +12,12 @@ import Data.Nullable (null, Nullable)
...
@@ -12,23 +12,12 @@ import Data.Nullable (null, Nullable)
import Data.Sequence as Seq
import Data.Sequence as Seq
import Data.Set as Set
import Data.Set as Set
import Data.Tuple (Tuple(..))
import Data.Tuple (Tuple(..))
import Data.Tuple.Nested ((/\))
import Effect.Aff (Aff)
import Effect.Aff (Aff)
import Math (log)
import Partial.Unsafe (unsafePartial)
import Reactix as R
import Reactix.DOM.HTML as RH
import Record as Record
import Record.Extra as RX
import Toestand as T
import Gargantext.AsyncTasks as GAT
import Gargantext.AsyncTasks as GAT
import Gargantext.Components.App.Data (Boxes)
import Gargantext.Components.App.Data (Boxes)
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.Search (nodeSearchControl)
import Gargantext.Components.GraphExplorer.Sidebar as Sidebar
import Gargantext.Components.GraphExplorer.Sidebar.Types as GEST
import Gargantext.Components.GraphExplorer.Sidebar.Types as GEST
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
...
@@ -43,6 +32,13 @@ import Gargantext.Types as Types
...
@@ -43,6 +32,13 @@ import Gargantext.Types as Types
import Gargantext.Utils.Range as Range
import Gargantext.Utils.Range as Range
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as T2
import Gargantext.Utils.Toestand as T2
import Math as Math
import Partial.Unsafe (unsafePartial)
import Reactix as R
import Reactix.DOM.HTML as RH
import Record as Record
import Record.Extra as RX
import Toestand as T
here :: R2.Here
here :: R2.Here
here = R2.here "Gargantext.Components.GraphExplorer"
here = R2.here "Gargantext.Components.GraphExplorer"
...
@@ -53,11 +49,9 @@ type BaseProps =
...
@@ -53,11 +49,9 @@ type BaseProps =
, frontends :: Frontends
, frontends :: Frontends
, graphId :: GET.GraphId
, graphId :: GET.GraphId
, handed :: T.Box Types.Handed
, handed :: T.Box Types.Handed
, mMetaData' :: Maybe GET.MetaData
, route :: T.Box AppRoute
, route :: T.Box AppRoute
, sessions :: T.Box Sessions
, sessions :: T.Box Sessions
, showLogin :: T.Box Boolean
, showLogin :: T.Box Boolean
, sidePanelState :: T.Box Types.SidePanelState
, tasks :: T.Box GAT.Storage
, tasks :: T.Box GAT.Storage
)
)
...
@@ -67,6 +61,13 @@ type LayoutProps =
...
@@ -67,6 +61,13 @@ type LayoutProps =
( session :: Session
( session :: Session
| BaseProps )
| BaseProps )
type GraphWriteProps =
( graph :: SigmaxT.SGraph
, hyperdataGraph :: GET.HyperdataGraph
, mMetaData' :: Maybe GET.MetaData
| LayoutProps
)
type Props =
type Props =
( graph :: SigmaxT.SGraph
( graph :: SigmaxT.SGraph
, hyperdataGraph :: GET.HyperdataGraph
, hyperdataGraph :: GET.HyperdataGraph
...
@@ -95,12 +96,39 @@ explorerLayoutCpt = here.component "explorerLayout" cpt where
...
@@ -95,12 +96,39 @@ explorerLayoutCpt = here.component "explorerLayout" cpt where
useLoader graphId (getNodes session graphVersion') handler
useLoader graphId (getNodes session graphVersion') handler
where
where
handler loaded = explorer (Record.merge props { graph, hyperdataGraph: loaded, mMetaData' }) []
handler loaded = explorer
WriteGraph
(Record.merge props { graph, hyperdataGraph: loaded, mMetaData' }) []
-- explorer (Record.merge props { graph, graphVersion, hyperdataGraph: loaded, mMetaData })
-- explorer (Record.merge props { graph, graphVersion, hyperdataGraph: loaded, mMetaData })
where
where
GET.HyperdataGraph { graph: hyperdataGraph } = loaded
GET.HyperdataGraph { graph: hyperdataGraph } = loaded
Tuple mMetaData' graph = convert hyperdataGraph
Tuple mMetaData' graph = convert hyperdataGraph
explorerWriteGraph :: R2.Component GraphWriteProps
explorerWriteGraph = R.createElement explorerWriteGraphCpt
explorerWriteGraphCpt :: R.Component GraphWriteProps
explorerWriteGraphCpt = here.component "explorerWriteGraph" cpt where
cpt props@{ boxes: { sidePanelGraph, sidePanelState }
, graph
, hyperdataGraph
, mMetaData' } _ = do
R.useEffectOnce' $ do
T.write_ (Just { mGraph: Just graph
, mMetaData: mMetaData'
, multiSelectEnabled: false
, removedNodeIds: Set.empty
, selectedNodeIds: Set.empty
, showControls: false
, sideTab: GET.SideTabLegend }) sidePanelGraph
-- { mGraph, mMetaData, sideTab } <- GEST.focusedSidePanel sidePanelGraph
-- R.useEffect' $ do
-- here.log2 "writing graph" graph
-- T.write_ (Just graph) mGraph
-- T.write_ mMetaData' mMetaData
pure $ explorer (RX.pick props :: Record Props) []
--------------------------------------------------------------
--------------------------------------------------------------
explorer :: R2.Component Props
explorer :: R2.Component Props
explorer = R.createElement explorerCpt
explorer = R.createElement explorerCpt
...
@@ -109,24 +137,23 @@ explorerCpt :: R.Component Props
...
@@ -109,24 +137,23 @@ explorerCpt :: R.Component Props
explorerCpt = here.component "explorer" cpt
explorerCpt = here.component "explorer" cpt
where
where
cpt props@{ backend
cpt props@{ backend
, boxes: boxes@{ graphVersion, showTree, sidePanelGraph }
, boxes: boxes@{ graphVersion, showTree, sidePanelGraph
, sidePanelState
}
, frontends
, frontends
, graph
, graph
, graphId
, graphId
, handed
, handed
, hyperdataGraph
, hyperdataGraph
, mMetaData'
, route
, route
, session
, session
, sessions
, sessions
, showLogin
, showLogin
, sidePanelState
, tasks
, tasks
} _ = do
} _ = do
{ mMetaData, sideTab } <- GEST.focusedSidePanel sidePanelGraph
handed' <- T.useLive T.unequal handed
handed' <- T.useLive T.unequal handed
graphVersion' <- T.useLive T.unequal graphVersion
graphVersion' <- T.useLive T.unequal graphVersion
graphVersionRef <- R.useRef graphVersion'
graphVersionRef <- R.useRef graphVersion'
sidePanel <- T.useLive T.unequal sidePanelGraph
mMetaData' <- T.useLive T.unequal mMetaData
-- sideTab <- T.useBox GET.SideTabLegend
-- sideTab <- T.useBox GET.SideTabLegend
let startForceAtlas = maybe true (\(GET.MetaData { startForceAtlas: sfa }) -> sfa) mMetaData'
let startForceAtlas = maybe true (\(GET.MetaData { startForceAtlas: sfa }) -> sfa) mMetaData'
...
@@ -151,12 +178,6 @@ explorerCpt = here.component "explorer" cpt
...
@@ -151,12 +178,6 @@ explorerCpt = here.component "explorer" cpt
multiSelectEnabled' <- T.useLive T.unequal controls.multiSelectEnabled
multiSelectEnabled' <- T.useLive T.unequal controls.multiSelectEnabled
showTree' <- T.useLive T.unequal controls.showTree
showTree' <- T.useLive T.unequal controls.showTree
multiSelectEnabledRef <- R.useRef multiSelectEnabled'
multiSelectEnabledRef <- R.useRef multiSelectEnabled'
{ mGraph, mMetaData, sideTab } <- GEST.focusedSidePanel sidePanelGraph
R.useEffectOnce' $ do
here.log2 "writing graph" graph
T.write_ (Just graph) mGraph
T.write_ mMetaData' mMetaData
forestOpen <- T.useBox $ (Set.empty :: OpenNodes)
forestOpen <- T.useBox $ (Set.empty :: OpenNodes)
R.useEffectOnce' $ do
R.useEffectOnce' $ do
...
@@ -325,7 +346,7 @@ convert (GET.GraphData r) = Tuple r.metaData $ SigmaxT.Graph {nodes, edges}
...
@@ -325,7 +346,7 @@ convert (GET.GraphData r) = Tuple r.metaData $ SigmaxT.Graph {nodes, edges}
, hidden : false
, hidden : false
, id : n.id_
, id : n.id_
, label : n.label
, label : n.label
, size : log (toNumber n.size + 1.0)
, size :
Math.
log (toNumber n.size + 1.0)
, type : modeGraphType gargType
, type : modeGraphType gargType
, x : n.x -- cos (toNumber i)
, x : n.x -- cos (toNumber i)
, y : n.y -- sin (toNumber i)
, y : n.y -- sin (toNumber i)
...
...
src/Gargantext/Components/GraphExplorer/Controls.purs
View file @
e3c71d1e
...
@@ -95,9 +95,6 @@ controlsCpt = here.component "controls" cpt
...
@@ -95,9 +95,6 @@ controlsCpt = here.component "controls" cpt
showControls' <- T.useLive T.unequal showControls
showControls' <- T.useLive T.unequal showControls
sidePanelState' <- T.useLive T.unequal sidePanelState
sidePanelState' <- T.useLive T.unequal sidePanelState
R.useEffect' $ do
here.log2 "showControls" showControls'
localControls <- initialLocalControls
localControls <- initialLocalControls
-- ref to track automatic FA pausing
-- ref to track automatic FA pausing
-- If user pauses FA before auto is triggered, clear the timeoutId
-- If user pauses FA before auto is triggered, clear the timeoutId
...
...
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
e3c71d1e
...
@@ -63,24 +63,23 @@ sidebar = R.createElement sidebarCpt
...
@@ -63,24 +63,23 @@ sidebar = R.createElement sidebarCpt
sidebarCpt :: R.Component Props
sidebarCpt :: R.Component Props
sidebarCpt = here.component "sidebar" cpt
sidebarCpt = here.component "sidebar" cpt
where
where
cpt props@{
metaData,
sideTab } _ = do
cpt props@{ sideTab } _ = do
sideTab' <- T.useLive T.unequal sideTab
sideTab' <- T.useLive T.unequal sideTab
let sideTabLegend' = case sideTab' of
GET.SideTabLegend -> sideTabLegend sideTabProps []
GET.SideTabData -> sideTabData sideTabProps []
GET.SideTabCommunity -> sideTabCommunity sideTabProps []
pure $ RH.div { id: "sp-container" }
pure $ RH.div { id: "sp-container" }
[ sideTabNav { sideTab
[ sideTabNav { sideTab
, sideTabs: [GET.SideTabLegend, GET.SideTabData, GET.SideTabCommunity] } []
, sideTabs: [GET.SideTabLegend, GET.SideTabData, GET.SideTabCommunity] } []
, sideTabLegend'
, case sideTab' of
GET.SideTabLegend -> sideTabLegend sideTabProps []
GET.SideTabData -> sideTabData sideTabProps []
GET.SideTabCommunity -> sideTabCommunity sideTabProps []
]
]
where
where
sideTabProps = RX.pick props :: Record SideTabProps
sideTabProps = RX.pick props :: Record SideTabProps
type SideTabNavProps = (
type SideTabNavProps = (
sideTab
:: T.Box GET.SideTab
sideTab :: T.Box GET.SideTab
, sideTabs
:: Array GET.SideTab
, sideTabs :: Array GET.SideTab
)
)
sideTabNav :: R2.Component SideTabNavProps
sideTabNav :: R2.Component SideTabNavProps
...
@@ -103,8 +102,8 @@ sideTabNavCpt = here.component "sideTabNav" cpt
...
@@ -103,8 +102,8 @@ sideTabNavCpt = here.component "sideTabNav" cpt
<> if tab == sideTab'
<> if tab == sideTab'
then " active"
then " active"
else ""
else ""
, on: { click: \_ -> T.write_ tab sideTab }
, on: { click: \_ -> T.write_ tab sideTab }
} [ H.text $ show tab ]
} [ H.text $ show tab ]
type SideTabProps = Props
type SideTabProps = Props
...
@@ -133,12 +132,13 @@ sideTabDataCpt = here.component "sideTabData" cpt
...
@@ -133,12 +132,13 @@ sideTabDataCpt = here.component "sideTabData" cpt
[ selectedNodes (Record.merge { nodesMap: SigmaxT.nodesGraphMap props.graph } props) []
[ selectedNodes (Record.merge { nodesMap: SigmaxT.nodesGraphMap props.graph } props) []
, neighborhood props []
, neighborhood props []
, RH.div { className: "col-md-12", id: "query" }
, RH.div { className: "col-md-12", id: "query" }
[ query SearchDoc
[ query { frontends: props.frontends
props.frontends
, metaData: props.metaData
props.metaData
, nodesMap: SigmaxT.nodesGraphMap props.graph
props.session
, searchType: SearchDoc
(SigmaxT.nodesGraphMap props.graph)
, selectedNodeIds: selectedNodeIds'
selectedNodeIds'
, session: props.session
} []
]
]
]
]
where
where
...
@@ -162,12 +162,13 @@ sideTabCommunityCpt = here.component "sideTabCommunity" cpt
...
@@ -162,12 +162,13 @@ sideTabCommunityCpt = here.component "sideTabCommunity" cpt
pure $ RH.div { className: "col-md-12", id: "query" }
pure $ RH.div { className: "col-md-12", id: "query" }
[ selectedNodes (Record.merge { nodesMap: SigmaxT.nodesGraphMap props.graph } props) []
[ selectedNodes (Record.merge { nodesMap: SigmaxT.nodesGraphMap props.graph } props) []
, neighborhood props []
, neighborhood props []
, query SearchContact
, query { frontends: props.frontends
props.frontends
, metaData: props.metaData
props.metaData
, nodesMap: SigmaxT.nodesGraphMap props.graph
props.session
, searchType: SearchContact
(SigmaxT.nodesGraphMap props.graph)
, selectedNodeIds: selectedNodeIds'
selectedNodeIds'
, session: props.session
} []
]
]
...
@@ -365,35 +366,56 @@ deleteNode termList session (GET.MetaData metaData) node = do
...
@@ -365,35 +366,56 @@ deleteNode termList session (GET.MetaData metaData) node = do
patch_list :: NTC.Replace TermList
patch_list :: NTC.Replace TermList
patch_list = NTC.Replace { new: termList, old: MapTerm }
patch_list = NTC.Replace { new: termList, old: MapTerm }
query :: SearchType
type Query =
-> Frontends
( frontends :: Frontends
-> GET.MetaData
, metaData :: GET.MetaData
-> Session
, nodesMap :: SigmaxT.NodesMap
-> SigmaxT.NodesMap
, searchType :: SearchType
-> SigmaxT.NodeIds
, selectedNodeIds :: SigmaxT.NodeIds
-> R.Element
, session :: Session )
query _ _ _ _ _ selectedNodeIds | Set.isEmpty selectedNodeIds = RH.div {} []
query searchType frontends (GET.MetaData metaData) session nodesMap selectedNodeIds =
query :: R2.Component Query
query' (head metaData.corpusId)
query = R.createElement queryCpt
where
query' Nothing = RH.div {} []
queryCpt :: R.Component Query
query' (Just corpusId) =
queryCpt = here.component "query" cpt where
CGT.tabs { frontends
cpt props@{ selectedNodeIds } _ = do
, session
, query: SearchQuery { query : concat $ toQuery <$> Set.toUnfoldable selectedNodeIds
pure $ if Set.isEmpty selectedNodeIds
, expected: searchType
then RH.div {} []
}
else query' props []
, sides: [side corpusId]
}
query' :: R2.Component Query
query' = R.createElement queryCpt'
toQuery id = case Map.lookup id nodesMap of
Nothing -> []
queryCpt' :: R.Component Query
Just n -> words n.label
queryCpt' = here.component "query'" cpt where
cpt { frontends
side corpusId = GET.GraphSideCorpus { corpusId
, metaData: GET.MetaData metaData
, listId : metaData.list.listId
, nodesMap
, corpusLabel: metaData.title
, searchType
}
, selectedNodeIds
, session } _ = do
pure $ case (head metaData.corpusId) of
Nothing -> RH.div {} []
Just corpusId ->
CGT.tabs { frontends
, query: SearchQuery { expected: searchType
, query : concat $ toQuery <$> Set.toUnfoldable selectedNodeIds
}
, session
, sides: [side corpusId]
}
where
toQuery id = case Map.lookup id nodesMap of
Nothing -> []
Just n -> words n.label
side corpusId = GET.GraphSideCorpus { corpusId
, corpusLabel: metaData.title
, listId : metaData.list.listId
}
------------------------------------------------------------------------
------------------------------------------------------------------------
...
...
src/Gargantext/Components/Nodes/Corpus/Graph/Tabs.purs
View file @
e3c71d1e
...
@@ -2,12 +2,13 @@ module Gargantext.Components.Nodes.Corpus.Graph.Tabs where
...
@@ -2,12 +2,13 @@ module Gargantext.Components.Nodes.Corpus.Graph.Tabs where
import Prelude hiding (div)
import Prelude hiding (div)
import Data.Array (fromFoldable)
import Data.Array (fromFoldable)
import Data.Tuple (Tuple(..)
, fst
)
import Data.Tuple (Tuple(..))
import Reactix as R
import Reactix as R
import Gargantext.Components.GraphExplorer.Types (GraphSideCorpus(..))
import Gargantext.Components.GraphExplorer.Types (GraphSideCorpus(..))
import Gargantext.Components.FacetsTable (docView)
import Gargantext.Components.FacetsTable (docView)
import Gargantext.Components.Search (SearchQuery)
import Gargantext.Components.Search (SearchQuery)
import Gargantext.Components.Table as T
import Gargantext.Components.Table as T
able
import Gargantext.Components.Tab as Tab
import Gargantext.Components.Tab as Tab
import Gargantext.Ends (Frontends)
import Gargantext.Ends (Frontends)
import Gargantext.Sessions (Session)
import Gargantext.Sessions (Session)
...
@@ -31,8 +32,7 @@ tabsCpt :: R.Component Props
...
@@ -31,8 +32,7 @@ tabsCpt :: R.Component Props
tabsCpt = here.component "tabs" cpt
tabsCpt = here.component "tabs" cpt
where
where
cpt {frontends, query, session, sides} _ = do
cpt {frontends, query, session, sides} _ = do
active <- R.useState' 0
pure $ Tab.tabs { selected: 0, tabs: tabs' }
pure $ Tab.tabs {tabs: tabs', selected: fst active}
where
where
tabs' = fromFoldable $ tab frontends session query <$> sides
tabs' = fromFoldable $ tab frontends session query <$> sides
...
@@ -42,5 +42,4 @@ tab frontends session query (GraphSideCorpus {corpusId: nodeId, corpusLabel, lis
...
@@ -42,5 +42,4 @@ tab frontends session query (GraphSideCorpus {corpusId: nodeId, corpusLabel, lis
where
where
dvProps = {frontends, session, nodeId, listId, query, chart, totalRecords: 0, container}
dvProps = {frontends, session, nodeId, listId, query, chart, totalRecords: 0, container}
chart = mempty
chart = mempty
container = T.graphContainer {title: corpusLabel}
container = Table.graphContainer {title: corpusLabel}
src/Gargantext/Components/Router.purs
View file @
e3c71d1e
...
@@ -207,10 +207,11 @@ openedSidePanelCpt = here.component "openedSidePanel" cpt where
...
@@ -207,10 +207,11 @@ openedSidePanelCpt = here.component "openedSidePanel" cpt where
mGraphMetaData' <- T.useLive T.unequal mMetaData
mGraphMetaData' <- T.useLive T.unequal mMetaData
let className = "side-panel"
let className = "side-panel"
let wrapper = H.div { className }
case route' of
case route' of
GR.Lists s n -> do
GR.Lists s n -> do
pure $
H.div { className }
pure $
wrapper
[ Lists.sidePanel { session: session'
[ Lists.sidePanel { session: session'
, sidePanel: sidePanelLists
, sidePanel: sidePanelLists
, sidePanelState } [] ]
, sidePanelState } [] ]
...
@@ -220,10 +221,10 @@ openedSidePanelCpt = here.component "openedSidePanel" cpt where
...
@@ -220,10 +221,10 @@ openedSidePanelCpt = here.component "openedSidePanel" cpt where
here.log2 "mGraphMetaData" mGraphMetaData'
here.log2 "mGraphMetaData" mGraphMetaData'
case (mGraph' /\ mGraphMetaData') of
case (mGraph' /\ mGraphMetaData') of
(Nothing /\ _) -> pure $
H.div {}
[]
(Nothing /\ _) -> pure $
wrapper
[]
(_ /\ Nothing) -> pure $
H.div {}
[]
(_ /\ Nothing) -> pure $
wrapper
[]
(Just graph /\ Just metaData) -> do
(Just graph /\ Just metaData) -> do
pure $
H.div { className }
pure $
wrapper
[ GES.sidebar { frontends: defaultFrontends
[ GES.sidebar { frontends: defaultFrontends
, graph
, graph
, graphId: g
, graphId: g
...
@@ -236,11 +237,11 @@ openedSidePanelCpt = here.component "openedSidePanel" cpt where
...
@@ -236,11 +237,11 @@ openedSidePanelCpt = here.component "openedSidePanel" cpt where
, sideTab
, sideTab
} [] ]
} [] ]
GR.Texts s n -> do
GR.Texts s n -> do
pure $
H.div { className }
pure $
wrapper
[ Texts.sidePanel { session: session'
[ Texts.sidePanel { session: session'
, sidePanel: sidePanelTexts
, sidePanel: sidePanelTexts
, sidePanelState } [] ]
, sidePanelState } [] ]
_ -> pure $
H.div {}
[]
_ -> pure $
wrapper
[]
annuaire :: R2.Component SessionNodeProps
annuaire :: R2.Component SessionNodeProps
annuaire = R.createElement annuaireCpt
annuaire = R.createElement annuaireCpt
...
@@ -303,6 +304,35 @@ documentCpt = here.component "document" cpt where
...
@@ -303,6 +304,35 @@ documentCpt = here.component "document" cpt where
documentMainLayout { listId, nodeId, mCorpusId, session } []
documentMainLayout { listId, nodeId, mCorpusId, session } []
where mCorpusId = Nothing
where mCorpusId = Nothing
graphExplorer :: R2.Component SessionNodeProps
graphExplorer = R.createElement graphExplorerCpt
graphExplorerCpt :: R.Component SessionNodeProps
graphExplorerCpt = here.component "graphExplorer" cpt where
cpt props@{ boxes: boxes@{ backend
, handed
, route
, sessions
, showLogin
, sidePanelGraph
, sidePanelState
, tasks }
, nodeId
, session } _ = do
let sessionProps = RE.pick props :: Record SessionProps
pure $ authed sessionProps $
-- simpleLayout { handed }
GraphExplorer.explorerLayoutLoader { backend
, boxes
, frontends: defaultFrontends
, graphId: nodeId
, handed
, route
, session
, sessions
, showLogin
, tasks } []
home :: R2.Component Props
home :: R2.Component Props
home = R.createElement homeCpt
home = R.createElement homeCpt
...
@@ -348,39 +378,6 @@ login' { backend, sessions, showLogin: visible } =
...
@@ -348,39 +378,6 @@ login' { backend, sessions, showLogin: visible } =
, sessions
, sessions
, visible }
, visible }
graphExplorer :: R2.Component SessionNodeProps
graphExplorer = R.createElement graphExplorerCpt
graphExplorerCpt :: R.Component SessionNodeProps
graphExplorerCpt = here.component "graphExplorer" cpt where
cpt props@{ boxes: boxes@{ backend
, handed
, route
, sessions
, showLogin
, sidePanelGraph
, sidePanelState
, tasks }
, nodeId
, session } _ = do
{ mMetaData } <- GEST.focusedSidePanel sidePanelGraph
mMetaData' <- T.useLive T.unequal mMetaData
let sessionProps = RE.pick props :: Record SessionProps
pure $ authed sessionProps $
-- simpleLayout { handed }
GraphExplorer.explorerLayoutLoader { backend
, boxes
, frontends: defaultFrontends
, graphId: nodeId
, handed
, mMetaData'
, route
, session
, sessions
, showLogin
, sidePanelState
, tasks } []
routeFile :: R2.Component SessionNodeProps
routeFile :: R2.Component SessionNodeProps
routeFile = R.createElement routeFileCpt
routeFile = R.createElement routeFileCpt
...
...
src/sass/_styles.sass
View file @
e3c71d1e
#page-wrapper
.cache-toggle
.cache-toggle
cursor
:
pointer
cursor
:
pointer
.side-panel
.side-panel
//background-color: $dark
//background-color: $dark
left
:
70%
left
:
70%
padding
:
5px
padding
:
5px
position
:
fixed
position
:
fixed
top
:
60px
top
:
60px
background-color
:
#fff
background-color
:
#fff
width
:
28%
width
:
28%
.header
.header
float
:
right
float
:
right
.corpus-doc-view
.corpus-doc-view
.annotated-field-wrapper
.annotated-field-wrapper
.annotated-field-runs
.annotated-field-runs
max-height
:
200px
max-height
:
200px
overflow-y
:
scroll
overflow-y
:
scroll
.list-group
.list-group
.list-group-item-heading
.list-group-item-heading
display
:
inline-block
display
:
inline-block
width
:
60px
width
:
60px
.simple-layout
.simple-layout
height
:
100%
height
:
100%
...
...
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