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
148
Issues
148
List
Board
Labels
Milestones
Merge Requests
2
Merge Requests
2
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
85d48715
Verified
Commit
85d48715
authored
Jun 09, 2025
by
Przemyslaw Kaminski
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into 471-dev-get-contexts-for-ngrams-fix
parents
c11d5454
d41fd32c
Pipeline
#7659
passed with stages
in 29 minutes and 39 seconds
Changes
13
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
223 additions
and
65 deletions
+223
-65
bootstrap-darkster.css
dist/styles/bootstrap-darkster.css
+14
-0
bootstrap-default.css
dist/styles/bootstrap-default.css
+14
-0
bootstrap-greyson.css
dist/styles/bootstrap-greyson.css
+14
-0
bootstrap-herbie.css
dist/styles/bootstrap-herbie.css
+14
-0
bootstrap-monotony.css
dist/styles/bootstrap-monotony.css
+14
-0
SearchField.purs
...omponents/Forest/Tree/Node/Action/Search/SearchField.purs
+0
-1
Update.purs
...Gargantext/Components/Forest/Tree/Node/Action/Update.purs
+2
-1
Types.purs
...text/Components/Forest/Tree/Node/Action/Update/Types.purs
+1
-57
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+2
-1
Legend.purs
src/Gargantext/Components/GraphExplorer/Sidebar/Legend.purs
+36
-0
Buttons.purs
src/Gargantext/Components/GraphExplorer/Toolbar/Buttons.purs
+5
-1
Types.purs
src/Gargantext/Components/GraphExplorer/Types.purs
+89
-4
_graph.scss
src/sass/_legacy/_graph.scss
+18
-0
No files found.
dist/styles/bootstrap-darkster.css
View file @
85d48715
...
...
@@ -9750,6 +9750,20 @@ input[type=range]:-moz-focusring {
margin-right
:
8px
;
border
:
1px
solid
#ADB5BD
;
}
.graph-legend__separator
{
fill
:
#B5B5B5
;
}
.graph-legend__params
{
margin
:
16px
;
}
.graph-legend__params__heading
{
font-weight
:
bold
;
list-style
:
none
;
}
.graph-legend__params__item
{
list-style
:
initial
;
margin-left
:
16px
;
}
.graph-legend
.renameable-container__text
{
margin-right
:
8px
;
...
...
dist/styles/bootstrap-default.css
View file @
85d48715
...
...
@@ -9558,6 +9558,20 @@ input[type=range]:-moz-focusring {
margin-right
:
8px
;
border
:
1px
solid
#ADB5BD
;
}
.graph-legend__separator
{
fill
:
#B5B5B5
;
}
.graph-legend__params
{
margin
:
16px
;
}
.graph-legend__params__heading
{
font-weight
:
bold
;
list-style
:
none
;
}
.graph-legend__params__item
{
list-style
:
initial
;
margin-left
:
16px
;
}
.graph-legend
.renameable-container__text
{
margin-right
:
8px
;
...
...
dist/styles/bootstrap-greyson.css
View file @
85d48715
...
...
@@ -9401,6 +9401,20 @@ input[type=range]:-moz-focusring {
margin-right
:
8px
;
border
:
1px
solid
#ADB5BD
;
}
.graph-legend__separator
{
fill
:
#B5B5B5
;
}
.graph-legend__params
{
margin
:
16px
;
}
.graph-legend__params__heading
{
font-weight
:
bold
;
list-style
:
none
;
}
.graph-legend__params__item
{
list-style
:
initial
;
margin-left
:
16px
;
}
.graph-legend
.renameable-container__text
{
margin-right
:
8px
;
...
...
dist/styles/bootstrap-herbie.css
View file @
85d48715
...
...
@@ -9626,6 +9626,20 @@ input[type=range]:-moz-focusring {
margin-right
:
8px
;
border
:
1px
solid
#ADB5BD
;
}
.graph-legend__separator
{
fill
:
#B5B5B5
;
}
.graph-legend__params
{
margin
:
16px
;
}
.graph-legend__params__heading
{
font-weight
:
bold
;
list-style
:
none
;
}
.graph-legend__params__item
{
list-style
:
initial
;
margin-left
:
16px
;
}
.graph-legend
.renameable-container__text
{
margin-right
:
8px
;
...
...
dist/styles/bootstrap-monotony.css
View file @
85d48715
...
...
@@ -9699,6 +9699,20 @@ input[type=range]:-moz-focusring {
margin-right
:
8px
;
border
:
1px
solid
#ADB5BD
;
}
.graph-legend__separator
{
fill
:
#B5B5B5
;
}
.graph-legend__params
{
margin
:
16px
;
}
.graph-legend__params__heading
{
font-weight
:
bold
;
list-style
:
none
;
}
.graph-legend__params__item
{
list-style
:
initial
;
margin-left
:
16px
;
}
.graph-legend
.renameable-container__text
{
margin-right
:
8px
;
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Search/SearchField.purs
View file @
85d48715
...
...
@@ -756,7 +756,6 @@ submitButtonComponent = here.component "submitButton" cpt
H.button
{ className: "btn btn-primary " <> if datafield == External Empty then "disabled" else ""
, "type": "button"
, "disabled": if datafield == External Empty then "true" else "false"
, on: { click: doSearch onSearch errors session selection' search' }
, style: { width: "100%" }
}
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Update.purs
View file @
85d48715
...
...
@@ -11,11 +11,12 @@ import Gargantext.AsyncTasks as GAT
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (ComponentStatus(..))
import Gargantext.Components.Forest.Tree.Node.Action.Types (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action.Update.Types (
BridgenessMethod(..), Charts(..), Granularity(..), GraphMetric(..), Method(..), Strength(..), UpdateNodeConfigGraph(..), UpdateNodeParams
(..))
import Gargantext.Components.Forest.Tree.Node.Action.Update.Types (
Charts(..), Granularity(..), Method(..), UpdateNodeParams(..), UpdateNodeConfigGraph
(..))
import Gargantext.Components.Forest.Tree.Node.Tools as Tools
import Gargantext.Components.PhyloExplorer.API as Phylo
import Gargantext.Components.PhyloExplorer.Config.ConfigForm as PhyloForm
import Gargantext.Components.PhyloExplorer.ConfigFormParser as PhyloHook
import Gargantext.Components.GraphExplorer.Types (GraphMetric(..), Strength(..), PartitionMethod(..), BridgenessMethod(..))
import Gargantext.Config.REST (AffRESTError)
import Gargantext.Hooks.UseFeatureFlag as Feature
import Gargantext.Routes as GR
...
...
src/Gargantext/Components/Forest/Tree/Node/Action/Update/Types.purs
View file @
85d48715
...
...
@@ -5,6 +5,7 @@ import Gargantext.Prelude
import Data.Generic.Rep (class Generic)
import Data.Maybe (Maybe(..))
import Data.Show.Generic (genericShow)
import Gargantext.Components.GraphExplorer.Types (BridgenessMethod, GraphMetric, Strength)
import Gargantext.Components.PhyloExplorer.API as Phylo
import Gargantext.Types as GT
import Simple.JSON as JSON
...
...
@@ -105,63 +106,6 @@ instance Read Method where
read "WithModel" = Just WithModel
read _ = Nothing
----------------------------------------------------------------------
data GraphMetric = Order1 | Order2
derive instance Generic GraphMetric _
derive instance Eq GraphMetric
instance Show GraphMetric where
show = genericShow
instance Read GraphMetric where
read "Order1" = Just Order1
read "Order2" = Just Order2
read _ = Nothing
instance JSON.ReadForeign GraphMetric where
readImpl = JSONG.enumSumRep
instance JSON.WriteForeign GraphMetric where
writeImpl = JSON.writeImpl <<< show
data Strength = Strong | Weak
derive instance Generic Strength _
derive instance Eq Strength
instance Show Strength where
show = genericShow
instance Read Strength where
read "Strong" = Just Strong
read "Weak" = Just Weak
read _ = Nothing
instance JSON.ReadForeign Strength where
readImpl = JSONG.enumSumRep
instance JSON.WriteForeign Strength where
writeImpl = JSON.writeImpl <<< show
data BridgenessMethod
= BridgenessBasic
| BridgenessAdvanced
derive instance Generic BridgenessMethod _
derive instance Eq BridgenessMethod
instance Show BridgenessMethod where
show = genericShow
instance Read BridgenessMethod where
read "BridgenessBasic" = Just BridgenessBasic
read "BridgenessAdvanced" = Just BridgenessAdvanced
read _ = Nothing
instance JSON.ReadForeign BridgenessMethod where
readImpl = JSONG.enumSumRep
instance JSON.WriteForeign BridgenessMethod where
writeImpl = JSON.writeImpl <<< show
----------------------------------------------------------------------
data Granularity = NewNgrams | NewTexts | Both
...
...
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
85d48715
...
...
@@ -133,7 +133,7 @@ sideTabLegend = R2.leaf sideTabLegendCpt
sideTabLegendCpt :: R.Component Props
sideTabLegendCpt = here.component "sideTabLegend" cpt
where
cpt { metaData:
GET.MetaData { legend }
, session, graphId } _ = do
cpt { metaData:
m@(GET.MetaData { legend })
, session, graphId } _ = do
-- | States
-- |
store <- GraphStore.use
...
...
@@ -171,6 +171,7 @@ sideTabLegendCpt = here.component "sideTabLegend" cpt
, selectedNodeIds: store.selectedNodeIds
, session
, graphId
, metaData: m
}
]
...
...
src/Gargantext/Components/GraphExplorer/Sidebar/Legend.purs
View file @
85d48715
...
...
@@ -37,6 +37,7 @@ type Props =
, selectedNodeIds :: T.Box ST.NodeIds
, session :: Session
, graphId :: GET.GraphId
, metaData :: GET.MetaData
)
legend :: R2.Leaf Props
...
...
@@ -52,6 +53,7 @@ legendCpt = here.component "legend" cpt
, selectedNodeIds
, session
, graphId
, metaData: GET.MetaData m
}
_ = do
-- | Hooks
...
...
@@ -84,6 +86,40 @@ legendCpt = here.component "legend" cpt
]
]
]
, H.hr
{ className: "graph-legend__separator" }
-- Graph params
, H.ul
{ className: "graph-legend__params" }
[ H.li
{ className: "graph-legend__params__heading" }
[ H.text "Graph parameters:"
]
, H.li
{ className: "graph-legend__params__item" }
[ H.text $ "Version: " <> show m.list.version
]
, H.li
{ className: "graph-legend__params__item" }
[ H.text $ "Metric: " <> show m.metric
]
, H.li
{ className: "graph-legend__params__item" }
[ H.text $ "Start Force Atlas: " <> show m.startForceAtlas
]
, H.li
{ className: "graph-legend__params__item" }
[ H.text $ "Edges Strength: " <> maybe "null" show m.edgesStrength
]
-- , H.li
-- { className: "graph-legend__params__item" }
-- [ H.text $ "PartitionMethod: " <> maybe "null" show m.partitionMethod
-- ]
, H.li
{ className: "graph-legend__params__item" }
[ H.text $ "Bridgeness Method: " <> maybe "null" show m.bridgenessMethod
]
]
]
where
rename :: String -> Int -> String -> Effect Unit
...
...
src/Gargantext/Components/GraphExplorer/Toolbar/Buttons.purs
View file @
85d48715
...
...
@@ -29,6 +29,7 @@ import Gargantext.Components.Bootstrap.Types (ButtonVariant(..), Variant(..))
import Gargantext.Components.Forest.Tree.Node.Action.Upload (uploadArbitraryData)
import Gargantext.Components.Forest.Tree.Node.Action.Upload.Types (FileFormat(..))
import Gargantext.Components.GraphExplorer.API (cloneGraph)
import Gargantext.Components.GraphExplorer.Types (GraphMetric(..))
import Gargantext.Components.GraphExplorer.Types as GET
import Gargantext.Components.GraphExplorer.Utils as GEU
import Gargantext.Data.Louvain as DLouvain
...
...
@@ -235,9 +236,12 @@ louvainButtonCpt = here.component "louvainButton" cpt
{ corpusId: []
, legend: legend'
, list: { listId: 0, version: 0 }
, metric:
"Order1"
, metric:
Order1
, startForceAtlas: true
, title: ""
, edgesStrength: Nothing
, partitionMethod: Nothing
, bridgenessMethod: Nothing
}
T.write_ mMetaData'' mMetaData
T.write_ lgraph transformedGraph
...
...
src/Gargantext/Components/GraphExplorer/Types.purs
View file @
85d48715
module Gargantext.Components.GraphExplorer.Types where
import Gargantext.Components.GraphExplorer.GraphTypes
import Gargantext.Prelude
import Data.Array ((!!), length)
import Data.Eq.Generic (genericEq)
import Data.Generic.Rep (class Generic)
...
...
@@ -7,12 +10,11 @@ import Data.Maybe (Maybe(..), fromJust)
import Data.Newtype (class Newtype)
import Data.Ord.Generic (genericCompare)
import Data.Show.Generic (genericShow)
import Gargantext.Components.GraphExplorer.GraphTypes
import Gargantext.Hooks.Sigmax.Camera (Camera)
import Gargantext.Prelude
import Partial.Unsafe (unsafePartial)
import Record as Record
import Simple.JSON as JSON
import Simple.JSON.Generics as JSONG
type GraphId = Int
...
...
@@ -94,9 +96,12 @@ newtype MetaData = MetaData
{ listId :: ListId
, version :: Version
}
, metric ::
String
-- dummy value
, metric ::
GraphMetric
-- dummy value
, startForceAtlas :: Boolean
, title :: String
, edgesStrength :: Maybe Strength
, partitionMethod :: Maybe PartitionMethod
, bridgenessMethod :: Maybe BridgenessMethod
}
derive instance Generic MetaData _
...
...
@@ -147,12 +152,92 @@ initialGraphData = GraphData
{ corpusId: []
, legend: []
, list: { listId: 0, version: 0 }
, metric:
"Order1"
, metric:
Order1
, startForceAtlas: true
, title: ""
, edgesStrength: Nothing
, partitionMethod: Nothing
, bridgenessMethod: Nothing
}
}
----------------------------------------------------------------------
data GraphMetric = Order1 | Order2
derive instance Generic GraphMetric _
derive instance Eq GraphMetric
instance Show GraphMetric where
show = genericShow
instance Read GraphMetric where
read "Order1" = Just Order1
read "Order2" = Just Order2
read _ = Nothing
instance JSON.ReadForeign GraphMetric where
readImpl = JSONG.enumSumRep
instance JSON.WriteForeign GraphMetric where
writeImpl = JSON.writeImpl <<< show
data Strength = Strong | Weak
derive instance Generic Strength _
derive instance Eq Strength
instance Show Strength where
show = genericShow
instance Read Strength where
read "Strong" = Just Strong
read "Weak" = Just Weak
read _ = Nothing
instance JSON.ReadForeign Strength where
readImpl = JSONG.enumSumRep
instance JSON.WriteForeign Strength where
writeImpl = JSON.writeImpl <<< show
data PartitionMethod = Spinglass | Infomap | Confluence
derive instance Generic PartitionMethod _
derive instance Eq PartitionMethod
instance Show PartitionMethod where
show = genericShow
instance Read PartitionMethod where
read "Spinglass" = Just Spinglass
read "Confluence" = Just Confluence
read "Infomap" = Just Infomap
read _ = Nothing
instance JSON.ReadForeign PartitionMethod where
readImpl = JSONG.enumSumRep
instance JSON.WriteForeign PartitionMethod where
writeImpl = JSON.writeImpl <<< show
data BridgenessMethod
= BridgenessBasic
| BridgenessAdvanced
derive instance Generic BridgenessMethod _
derive instance Eq BridgenessMethod
instance Show BridgenessMethod where
show = genericShow
instance Read BridgenessMethod where
read "BridgenessBasic" = Just BridgenessBasic
read "BridgenessAdvanced" = Just BridgenessAdvanced
read _ = Nothing
instance JSON.ReadForeign BridgenessMethod where
readImpl = JSONG.enumSumRep
instance JSON.WriteForeign BridgenessMethod where
writeImpl = JSON.writeImpl <<< show
----------------------------------------------------------------------
newtype Legend = Legend { id_ :: Int, color :: String, label :: String }
derive instance Generic Legend _
...
...
src/sass/_legacy/_graph.scss
View file @
85d48715
...
...
@@ -229,6 +229,24 @@
margin-right
:
space-x
(
1
);
border
:
1px
solid
$gray-500
;
}
&
__separator
{
fill
:
#B5B5B5
;
}
&
__params
{
margin
:
space-x
(
2
);
&
__heading
{
font-weight
:
bold
;
list-style
:
none
;
}
&
__item
{
list-style
:
initial
;
margin-left
:
space-x
(
2
)
}
}
}
.graph-legend
.renameable-container__text
{
...
...
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