Commit 314170b4 authored by Przemyslaw Kaminski's avatar Przemyslaw Kaminski

Merge branch 'dev' into dev-right-panel-in-docs

parents 4a29c949 df7efe0a
{ {
"name": "Gargantext", "name": "Gargantext",
"version": "0.0.1.91.7", "version": "0.0.1.94.1",
"scripts": { "scripts": {
"rebase-set": "spago package-set-upgrade && spago psc-package-insdhall", "rebase-set": "spago package-set-upgrade && spago psc-package-insdhall",
"rebuild-set": "spago psc-package-insdhall", "rebuild-set": "spago psc-package-insdhall",
......
...@@ -3,7 +3,6 @@ module Gargantext.Components.App where ...@@ -3,7 +3,6 @@ module Gargantext.Components.App where
import Data.Array (fromFoldable) import Data.Array (fromFoldable)
import Data.Maybe (Maybe(..), maybe') import Data.Maybe (Maybe(..), maybe')
import Data.Tuple (fst, snd) import Data.Tuple (fst, snd)
import Data.Tuple.Nested ((/\))
import Reactix as R import Reactix as R
import Gargantext.Prelude import Gargantext.Prelude
...@@ -31,7 +30,6 @@ import Gargantext.Routes (AppRoute(..)) ...@@ -31,7 +30,6 @@ import Gargantext.Routes (AppRoute(..))
import Gargantext.Sessions (useSessions) import Gargantext.Sessions (useSessions)
import Gargantext.Sessions as Sessions import Gargantext.Sessions as Sessions
import Gargantext.Types as GT import Gargantext.Types as GT
import Gargantext.Utils.Reactix as R2
thisModule :: String thisModule :: String
thisModule = "Gargantext.Components.App" thisModule = "Gargantext.Components.App"
...@@ -204,4 +202,4 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where ...@@ -204,4 +202,4 @@ appCpt = R.hooksComponentWithModule thisModule "app" cpt where
, session , session
, treeReloadRef , treeReloadRef
} }
] ]
...@@ -6,6 +6,7 @@ import Data.Set (Set) ...@@ -6,6 +6,7 @@ import Data.Set (Set)
import Data.Set as Set import Data.Set as Set
import Data.String as S import Data.String as S
import Data.String.CodeUnits as DSCU import Data.String.CodeUnits as DSCU
import Data.Tuple (snd)
import Data.Tuple.Nested ((/\)) import Data.Tuple.Nested ((/\))
import Effect (Effect) import Effect (Effect)
import Effect.Aff (Aff, launchAff, launchAff_) import Effect.Aff (Aff, launchAff, launchAff_)
...@@ -297,7 +298,7 @@ nodeLinkCpt = R.hooksComponentWithModule thisModule "nodeLink" cpt ...@@ -297,7 +298,7 @@ nodeLinkCpt = R.hooksComponentWithModule thisModule "nodeLink" cpt
popoverRef <- R.useRef null popoverRef <- R.useRef null
pure $ pure $
H.div { on: { click: \_ -> setFolderOpen $ not } } H.div { on: { click: onClick } }
[ H.a { data: { for: tooltipId [ H.a { data: { for: tooltipId
, tip: true , tip: true
} }
...@@ -316,6 +317,12 @@ nodeLinkCpt = R.hooksComponentWithModule thisModule "nodeLink" cpt ...@@ -316,6 +317,12 @@ nodeLinkCpt = R.hooksComponentWithModule thisModule "nodeLink" cpt
] ]
where where
-- NOTE Don't toggle tree if it is not selected
-- This prevents some irritating behaviour
onClick _ = if isSelected then
setFolderOpen not
else
pure unit
tooltipId = "node-link-" <> show id tooltipId = "node-link-" <> show id
-- END node link -- END node link
......
...@@ -10,27 +10,27 @@ import Gargantext.Types (ChartOpts, ChartType, CorpusMetricOpts, CTabNgramType, ...@@ -10,27 +10,27 @@ import Gargantext.Types (ChartOpts, ChartType, CorpusMetricOpts, CTabNgramType,
import Gargantext.Types as GT import Gargantext.Types as GT
data AppRoute data AppRoute
= Home = Annuaire SessionId Int
| Login | ContactPage SessionId Int Int
| Corpus SessionId Int
| CorpusDocument SessionId Int Int Int
| Dashboard SessionId Int
| Document SessionId Int Int
| Folder SessionId Int | Folder SessionId Int
| FolderPrivate SessionId Int | FolderPrivate SessionId Int
| FolderPublic SessionId Int | FolderPublic SessionId Int
| FolderShared SessionId Int | FolderShared SessionId Int
| Team SessionId Int | Home
| Corpus SessionId Int | Lists SessionId Int
| Document SessionId Int Int | Login
| CorpusDocument SessionId Int Int Int | PGraphExplorer SessionId Int
| PGraphExplorer SessionId Int | RouteFile SessionId Int
| Dashboard SessionId Int
| Texts SessionId Int
| Lists SessionId Int
| Annuaire SessionId Int
| UserPage SessionId Int
| ContactPage SessionId Int Int
| RouteFrameWrite SessionId Int
| RouteFrameCalc SessionId Int | RouteFrameCalc SessionId Int
| RouteFrameCode SessionId Int | RouteFrameCode SessionId Int
| RouteFile SessionId Int | RouteFrameWrite SessionId Int
| Team SessionId Int
| Texts SessionId Int
| UserPage SessionId Int
derive instance eqAppRoute :: Eq AppRoute derive instance eqAppRoute :: Eq AppRoute
...@@ -108,14 +108,17 @@ appPath (RouteFile s i) = "file/" <> show s <> "/" <> show i ...@@ -108,14 +108,17 @@ appPath (RouteFile s i) = "file/" <> show s <> "/" <> show i
nodeTypeAppRoute :: NodeType -> SessionId -> Int -> Maybe AppRoute nodeTypeAppRoute :: NodeType -> SessionId -> Int -> Maybe AppRoute
nodeTypeAppRoute GT.Annuaire s i = Just $ Annuaire s i nodeTypeAppRoute GT.Annuaire s i = Just $ Annuaire s i
nodeTypeAppRoute GT.NodeContact s i = Just $ Annuaire s i
nodeTypeAppRoute GT.Corpus s i = Just $ Corpus s i nodeTypeAppRoute GT.Corpus s i = Just $ Corpus s i
nodeTypeAppRoute GT.Dashboard s i = Just $ Dashboard s i nodeTypeAppRoute GT.Dashboard s i = Just $ Dashboard s i
nodeTypeAppRoute GT.Graph s i = Just $ PGraphExplorer s i nodeTypeAppRoute GT.Folder s i = Just $ Folder s i
nodeTypeAppRoute GT.NodeList s i = Just $ Lists s i
nodeTypeAppRoute GT.FolderPrivate s i = Just $ FolderPrivate s i nodeTypeAppRoute GT.FolderPrivate s i = Just $ FolderPrivate s i
nodeTypeAppRoute GT.FolderPublic s i = Just $ FolderPublic s i nodeTypeAppRoute GT.FolderPublic s i = Just $ FolderPublic s i
nodeTypeAppRoute GT.FolderShared s i = Just $ FolderShared s i nodeTypeAppRoute GT.FolderShared s i = Just $ FolderShared s i
nodeTypeAppRoute GT.Graph s i = Just $ PGraphExplorer s i
nodeTypeAppRoute GT.NodeContact s i = Just $ Annuaire s i
nodeTypeAppRoute GT.NodeFile s i = Just $ RouteFile s i
nodeTypeAppRoute GT.NodeList s i = Just $ Lists s i
nodeTypeAppRoute GT.NodeUser s i = Just $ UserPage s i nodeTypeAppRoute GT.NodeUser s i = Just $ UserPage s i
nodeTypeAppRoute GT.Team s i = Just $ Team s i
nodeTypeAppRoute GT.Texts s i = Just $ Texts s i nodeTypeAppRoute GT.Texts s i = Just $ Texts s i
nodeTypeAppRoute _ _ _ = Nothing nodeTypeAppRoute _ _ _ = Nothing
...@@ -138,29 +138,32 @@ instance encodeJsonTabPostQuery :: EncodeJson TabPostQuery where ...@@ -138,29 +138,32 @@ instance encodeJsonTabPostQuery :: EncodeJson TabPostQuery where
~> "query" := post.query ~> "query" := post.query
~> jsonEmptyObject ~> jsonEmptyObject
data NodeType = NodeUser data NodeType = Annuaire
| Folder | FolderPrivate | FolderShared | FolderPublic
| Annuaire
| NodeContact
| Corpus | Corpus
| Team
| Url_Document
| Dashboard | Dashboard
| Error | Error
| Folder
| FolderPrivate
| FolderPublic
| FolderShared
| Graph | Graph
| Phylo
| Individu | Individu
| Node | Node
| Nodes | NodeContact
| Tree
| NodeList | NodeList
| NodeUser
| Nodes
| Phylo
| Team
| Texts | Texts
| Tree
| Url_Document
-- TODO Optional Nodes -- TODO Optional Nodes
| NodeFrameWrite | NodeFile
| NodeFrameCalc | NodeFrameCalc
| NodeFrameNotebook | NodeFrameNotebook
| NodeFrameWrite
| NodePublic NodeType | NodePublic NodeType
| NodeFile
derive instance eqNodeType :: Eq NodeType derive instance eqNodeType :: Eq NodeType
......
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