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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
gargantext
purescript-gargantext
Commits
80479a93
Commit
80479a93
authored
Aug 05, 2019
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[GraphExplorer] more reactix refactorings in Layout
parent
e6c7df25
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
344 additions
and
341 deletions
+344
-341
GraphExplorer.purs
src/Gargantext/Components/GraphExplorer.purs
+3
-1
Graph.purs
src/Gargantext/Pages/Corpus/Graph.purs
+321
-322
Layout.purs
src/Gargantext/Pages/Layout.purs
+1
-1
Actions.purs
src/Gargantext/Pages/Layout/Actions.purs
+8
-8
Specs.purs
src/Gargantext/Pages/Layout/Specs.purs
+6
-4
States.purs
src/Gargantext/Pages/Layout/States.purs
+5
-5
No files found.
src/Gargantext/Components/GraphExplorer.purs
View file @
80479a93
...
...
@@ -38,7 +38,7 @@ import Gargantext.Config.REST (get)
import Gargantext.Pages.Corpus.Graph.Tabs as GT
import Gargantext.Types (class Optional)
import Gargantext.Utils (toggleSet)
import Gargantext.Utils.Reactix
(scuff)
import Gargantext.Utils.Reactix
as R2
import Partial.Unsafe (unsafePartial)
import Unsafe.Coerce (unsafeCoerce)
import Web.HTML (window)
...
...
@@ -49,6 +49,8 @@ import Reactix.DOM.HTML as RH
type Props s fa2 = ()
spec = R2.scuff $ explorer {}
explorer :: forall s fa2. Record (Props s fa2) -> R.Element
explorer props = R.createElement explorerCpt props []
...
...
src/Gargantext/Pages/Corpus/Graph.purs
View file @
80479a93
This diff is collapsed.
Click to expand it.
src/Gargantext/Pages/Layout.purs
View file @
80479a93
...
...
@@ -53,7 +53,7 @@ dispatchAction dispatcher _ (Document i n) = do
dispatchAction dispatcher _ (PGraphExplorer nid) = do
dispatcher $ SetRoute $ PGraphExplorer nid
dispatcher $ GraphExplorerA $ GE.LoadGraph nid
--
dispatcher $ GraphExplorerA $ GE.LoadGraph nid
--dispatcher $ GraphExplorerA $ GE.LoadGraph "imtNew.json"
dispatchAction dispatcher _ Dashboard = do
...
...
src/Gargantext/Pages/Layout/Actions.purs
View file @
80479a93
...
...
@@ -12,7 +12,7 @@ import Routing.Hash (setHash)
import Gargantext.Components.Login as LN
import Gargantext.Components.Modals.Modal (modalShow)
import Gargantext.Pages.Annuaire as Annuaire
import Gargantext.Pages.Corpus.Graph as GE
--
import Gargantext.Pages.Corpus.Graph as GE
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Layout.Specs.Search as S
import Gargantext.Pages.Layout.States (AppState)
...
...
@@ -26,7 +26,7 @@ data Action
| SetRoute Routes
| SearchA S.Action
| AddCorpusA AC.Action
| GraphExplorerA GE.Action
--
| GraphExplorerA GE.Action
| AnnuaireAction Annuaire.Action
| ShowLogin
| Logout
...
...
@@ -63,7 +63,7 @@ performAction ShowAddCorpus _ _ = void do
performAction (LoginA _) _ _ = pure unit
performAction (AddCorpusA _) _ _ = pure unit
performAction (SearchA _) _ _ = pure unit
performAction (GraphExplorerA _) _ _ = pure unit
--
performAction (GraphExplorerA _) _ _ = pure unit
performAction (AnnuaireAction _) _ _ = pure unit
-- liftEffect $ modalShow "addCorpus"
-- modifyState $ _ {showCorpus = true}
...
...
@@ -94,8 +94,8 @@ _annuaireAction = prism AnnuaireAction \action ->
AnnuaireAction a -> Right a
_ -> Left action
_graphExplorerAction :: Prism' Action GE.Action
_graphExplorerAction = prism GraphExplorerA \action ->
case action of
GraphExplorerA caction -> Right caction
_-> Left action
--
_graphExplorerAction :: Prism' Action GE.Action
--
_graphExplorerAction = prism GraphExplorerA \action ->
--
case action of
--
GraphExplorerA caction -> Right caction
--
_-> Left action
src/Gargantext/Pages/Layout/Specs.purs
View file @
80479a93
...
...
@@ -12,6 +12,7 @@ import Thermite (Render, Spec, _render, defaultPerformAction, defaultRender, foc
import Gargantext.Prelude
import Gargantext.Components.Data.Lang (Lang(..))
import Gargantext.Components.GraphExplorer as GE
import Gargantext.Components.Login.Types (AuthData(..))
import Gargantext.Components.Login as LN
import Gargantext.Components.Tree as Tree
...
...
@@ -21,13 +22,13 @@ import Gargantext.Pages.Annuaire.User.Contacts as C
import Gargantext.Pages.Corpus as Corpus
import Gargantext.Pages.Corpus.Document as Annotation
import Gargantext.Pages.Corpus.Dashboard as Dsh
import Gargantext.Pages.Corpus.Graph as GE
--
import Gargantext.Pages.Corpus.Graph as GE
import Gargantext.Pages.Home as L
import Gargantext.Pages.Layout.Actions (Action(..), _addCorpusAction, _
graphExplorerAction, _
loginAction, _searchAction, performAction)
import Gargantext.Pages.Layout.Actions (Action(..), _addCorpusAction, _loginAction, _searchAction, performAction)
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Layout.Specs.Search as S
import Gargantext.Pages.Layout.Specs.SearchBar as SB
import Gargantext.Pages.Layout.States (AppState, _addCorpusState, _
graphExplorerState, _
loginState, _searchState)
import Gargantext.Pages.Layout.States (AppState, _addCorpusState, _loginState, _searchState)
import Gargantext.Router (Routes(..))
import Gargantext.Utils.Reactix (scuff)
...
...
@@ -61,7 +62,8 @@ pagesComponent s = case s.currentRoute of
selectSpec AddCorpus = layout0 $ focus _addCorpusState _addCorpusAction AC.layoutAddcorpus
selectSpec SearchView = layout0 $ focus _searchState _searchAction S.searchSpec
selectSpec (Document l i) = layout0 $ cmapProps (const {nodeId: i, listId: l}) $ noState Annotation.layout
selectSpec (PGraphExplorer i)= layout1 $ focus _graphExplorerState _graphExplorerAction GE.specOld
--selectSpec (PGraphExplorer i)= layout1 $ focus _graphExplorerState _graphExplorerAction GE.specOld
selectSpec (PGraphExplorer i) = layout1 $ noState $ GE.spec
selectSpec Dashboard = layout0 $ noState Dsh.layoutDashboard
selectSpec (Annuaire i) = layout0 $ cmapProps (const {annuaireId: i}) $ noState A.layout
selectSpec (UserPage i) = layout0 $ cmapProps (const {nodeId: i}) $ noState C.layoutUser
...
...
src/Gargantext/Pages/Layout/States.purs
View file @
80479a93
...
...
@@ -7,7 +7,7 @@ import Data.Maybe (Maybe(Just))
import Effect (Effect)
import Gargantext.Components.Login as LN
import Gargantext.Pages.Corpus.Graph as GE
--
import Gargantext.Pages.Corpus.Graph as GE
import Gargantext.Pages.Layout.Specs.AddCorpus as AC
import Gargantext.Pages.Layout.Specs.Search as S
import Gargantext.Router (Routes(..))
...
...
@@ -19,7 +19,7 @@ type AppState =
, searchState :: S.State
, showLogin :: Boolean
, showCorpus :: Boolean
, graphExplorerState :: GE.State
--
, graphExplorerState :: GE.State
, showTree :: Boolean
}
...
...
@@ -33,7 +33,7 @@ initAppState = do
, searchState : S.initialState
, showLogin : false
, showCorpus : false
, graphExplorerState : GE.initialState
--
, graphExplorerState : GE.initialState
, showTree : false
}
...
...
@@ -49,6 +49,6 @@ _addCorpusState = lens (\s -> s.addCorpusState) (\s ss -> s{addCorpusState = ss}
_searchState :: Lens' AppState S.State
_searchState = lens (\s -> s.searchState) (\s ss -> s{searchState = ss})
_graphExplorerState :: Lens' AppState GE.State
_graphExplorerState = lens (\s -> s.graphExplorerState) (\s ss -> s{graphExplorerState = ss})
--
_graphExplorerState :: Lens' AppState GE.State
--
_graphExplorerState = lens (\s -> s.graphExplorerState) (\s ss -> s{graphExplorerState = ss})
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