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
b2e22224
Commit
b2e22224
authored
Jul 13, 2021
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 300-dev-purescript-simple-json
parents
b9fb7988
bba70c4a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
26 additions
and
27 deletions
+26
-27
sass.css
dist/styles/sass.css
+1
-1
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+24
-25
_tree.sass
src/sass/_tree.sass
+1
-1
No files found.
dist/styles/sass.css
View file @
b2e22224
...
...
@@ -540,7 +540,7 @@ li .leaf:hover a.settings {
position
:
fixed
;
top
:
3.7em
;
width
:
15%
;
z-index
:
9
10
;
z-index
:
9
09
;
}
.left-handed
.forest-layout
{
...
...
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
b2e22224
...
...
@@ -209,15 +209,15 @@ selectedNodesCpt = here.component "selectedNodes" cpt
]
]
, RH.div { className: "tab-content flex-space-between" }
[
remove
Button (Record.merge { buttonType: "primary"
, rType: CandidateTerm
, nodesMap
, text: "Move as candidate" } commonProps) []
[
updateTerm
Button (Record.merge { buttonType: "primary"
, rType: CandidateTerm
, nodesMap
, text: "Move as candidate" } commonProps) []
, H.br {}
,
remove
Button (Record.merge { buttonType: "danger"
, nodesMap
, rType: StopTerm
, text: "Move as stop" } commonProps) []
,
updateTerm
Button (Record.merge { buttonType: "danger"
, nodesMap
, rType: StopTerm
, text: "Move as stop" } commonProps) []
]
]
]
...
...
@@ -246,7 +246,7 @@ neighborhoodCpt = here.component "neighborhood" cpt
]
type
Remove
ButtonProps = (
type
UpdateTerm
ButtonProps = (
buttonType :: String
, nodesMap :: SigmaxT.NodesMap
, rType :: TermList
...
...
@@ -254,11 +254,10 @@ type RemoveButtonProps = (
| Common
)
removeButton :: R2.Component RemoveButtonProps
removeButton = R.createElement removeButtonCpt
removeButtonCpt :: R.Component RemoveButtonProps
removeButtonCpt = here.component "removeButton" cpt
updateTermButton :: R2.Component UpdateTermButtonProps
updateTermButton = R.createElement updateTermButtonCpt
updateTermButtonCpt :: R.Component UpdateTermButtonProps
updateTermButtonCpt = here.component "updateTermButton" cpt
where
cpt { buttonType
, graphId
...
...
@@ -282,7 +281,7 @@ removeButtonCpt = here.component "removeButton" cpt
onClickRemove selectedNodeIds' e = do
let nodes = mapMaybe (\id -> Map.lookup id nodesMap)
$ Set.toUnfoldable selectedNodeIds'
deleteNod
es { graphId: graphId
sendPatch
es { graphId: graphId
, metaData: metaData
, nodes
, session: session
...
...
@@ -309,7 +308,7 @@ neighbourBadges :: SigmaxT.SGraph -> SigmaxT.NodeIds -> Seq.Seq (Record SigmaxT.
neighbourBadges graph selectedNodeIds = SigmaxT.neighbours graph selectedNodes' where
selectedNodes' = SigmaxT.graphNodes $ SigmaxT.nodesById graph selectedNodeIds
type
DeleteNod
es =
type
SendPatch
es =
( graphId :: NodeID
, metaData :: GET.MetaData
, nodes :: Array (Record SigmaxT.Node)
...
...
@@ -318,10 +317,10 @@ type DeleteNodes =
, termList :: TermList
)
deleteNodes :: Record DeleteNod
es -> Effect Unit
deleteNod
es { graphId, metaData, nodes, session, termList, reloadForest } = do
sendPatches :: Record SendPatch
es -> Effect Unit
sendPatch
es { graphId, metaData, nodes, session, termList, reloadForest } = do
launchAff_ do
patches <- (parTraverse (
deleteNode
termList session metaData) nodes) :: Aff (Array NTC.VersionedNgramsPatches)
patches <- (parTraverse (
sendPatch
termList session metaData) nodes) :: Aff (Array NTC.VersionedNgramsPatches)
let mPatch = last patches
case mPatch of
Nothing -> pure unit
...
...
@@ -329,12 +328,12 @@ deleteNodes { graphId, metaData, nodes, session, termList, reloadForest } = do
liftEffect $ T2.reload reloadForest
-- Why is this called delete node?
deleteNode
:: TermList
-> Session
-> GET.MetaData
-> Record SigmaxT.Node
-> Aff NTC.VersionedNgramsPatches
deleteNode
termList session (GET.MetaData metaData) node = do
sendPatch
:: TermList
-> Session
-> GET.MetaData
-> Record SigmaxT.Node
-> Aff NTC.VersionedNgramsPatches
sendPatch
termList session (GET.MetaData metaData) node = do
ret <- NTC.putNgramsPatches coreParams versioned
task <- NTC.postNgramsChartsAsync coreParams -- TODO add task
pure ret
...
...
src/sass/_tree.sass
View file @
b2e22224
...
...
@@ -173,7 +173,7 @@ li
position
:
fixed
top
:
3
.7em
width
:
15%
z-index
:
9
10
z-index
:
9
09
.left-handed
.forest-layout
left
:
80%
...
...
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