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
138
Issues
138
List
Board
Labels
Milestones
Merge Requests
5
Merge Requests
5
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
b3fad287
Commit
b3fad287
authored
May 26, 2025
by
Yoelis Acourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hide stuff behind feature flags:
update terms options landing page stuff community side
parent
463bc224
Pipeline
#7617
passed with stages
in 30 minutes and 21 seconds
Changes
4
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
20 deletions
+52
-20
Update.purs
...Gargantext/Components/Forest/Tree/Node/Action/Update.purs
+17
-7
Tools.purs
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
+16
-6
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+17
-6
Home.purs
src/Gargantext/Components/Nodes/Home.purs
+2
-1
No files found.
src/Gargantext/Components/Forest/Tree/Node/Action/Update.purs
View file @
b3fad287
...
...
@@ -17,6 +17,7 @@ import Gargantext.Components.PhyloExplorer.API as Phylo
import Gargantext.Components.PhyloExplorer.Config.ConfigForm as PhyloForm
import Gargantext.Components.PhyloExplorer.ConfigFormParser as PhyloHook
import Gargantext.Config.REST (AffRESTError)
import Gargantext.Hooks.UseFeatureFlag as Feature
import Gargantext.Routes as GR
import Gargantext.Sessions (Session, post)
import Gargantext.Types (ID, NodeType(..))
...
...
@@ -263,16 +264,25 @@ updateNodeListCpt = here.component "updateNodeList" cpt
, iconName: "reload-with-settings"
, textTitle: "Update terms"
}
[ Tools.formChoiceSafe
{ items: [ Basic, Advanced, WithModel ]
, default: methodList'
, callback: \val -> T.write_ val methodList
, print: show
, label: "Update with:"
[ Feature.feature
{ keys: [ "expert" ]
, render: \shouldRender ->
if shouldRender then viewUpdateTermsOptions methodList' methodList [ Basic, Advanced, WithModel ]
else viewUpdateTermsOptions methodList' methodList [ Basic ]
}
[]
]
viewUpdateTermsOptions :: forall box11 t13. Show t13 => T.Write box11 t13 => t13 -> box11 -> Array t13 -> R.Element
viewUpdateTermsOptions methodList' methodList items =
Tools.formChoiceSafe
{ items: items
, default: methodList'
, callback: \val -> T.write_ val methodList
, print: show
, label: "Update with:"
}
[]
updateTexts :: R2.Component UpdateProps
updateTexts = R.createElement updateTextsCpt
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools.purs
View file @
b3fad287
...
...
@@ -23,6 +23,7 @@ import Reactix as R
import Reactix.DOM.HTML as H
import Record.Extra as RX
import Toestand as T
import Gargantext.Hooks.UseFeatureFlag as Feature
here :: R2.Here
here = R2.here "Gargantext.Components.Forest.Tree.Node.Tools"
...
...
@@ -280,7 +281,7 @@ formChoiceSafeCpt = here.component "formChoiceSafe" cpt
cpt { items, default, callback, print, label } _ = do
pure $ case items of
[] -> H.div {} []
[ n ] -> formButton { item: n, callback, print } []
--
[ n ] -> formButton { item: n, callback, print } []
_ -> formChoice { items, default, callback, print, label } []
type FormChoiceProps item m =
...
...
@@ -304,14 +305,23 @@ formChoiceCpt = here.component "formChoice" cpt
cpt { items, callback, default, print, label } _ = do
pure $ H.div { className: "form-group" }
[ H.label {} [ H.text label ]
, R2.select
{ className: "form-control with-icon-font"
, defaultValue: show default
, on: { change }
} $ map option items
, Feature.feature
{ keys: [ "expert" ]
, render: \shouldRender ->
if shouldRender then viewSelectNodeOptions $ map option items
else viewSelectNodeOptions $ map option (A.filter (\i -> print i `A.notElem` [ "Visio", "Annuaire" ]) items)
}
]
where
viewSelectNodeOptions options =
R2.select
{ className: "form-control with-icon-font"
, defaultValue: show default
, on: { change }
} $ options
change e = callback $ fromMaybe default $ reader $ R.unsafeEventValue e
option opt = H.option { value: show opt } [ H.text $ print opt ]
...
...
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
b3fad287
...
...
@@ -25,6 +25,7 @@ import Gargantext.Components.App.Store as AppStore
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (ButtonVariant(..), Elevation(..), Variant(..))
import Gargantext.Components.GraphExplorer.Sidebar.ContactList (contactListWrapper)
import Gargantext.Hooks.UseFeatureFlag as Feature
import Gargantext.Components.GraphExplorer.Sidebar.DocList (docListWrapper)
import Gargantext.Components.GraphExplorer.Sidebar.Legend as Legend
import Gargantext.Components.GraphExplorer.Store as GraphStore
...
...
@@ -101,12 +102,22 @@ sidebarCpt = here.component "sidebar" cpt
, callback: closeCallback
, className: "graph-sidebar__close"
}
,
-- Menu
B.tabs
{ value: sideTab'
, list: sideTabs
, callback: flip T.write_ sideTab
-- Menu
, Feature.feature
{ keys: [ "expert" ]
, render: \shouldRender ->
if shouldRender then B.tabs
{ value: sideTab'
, list: sideTabs
, callback: flip T.write_ sideTab
}
else B.tabs
{ value: sideTab'
, list: [ GET.SideTabLegend, GET.SideTabData ]
, callback: flip T.write_ sideTab
}
}
, case sideTab' of
GET.SideTabLegend -> sideTabLegend props
...
...
src/Gargantext/Components/Nodes/Home.purs
View file @
b3fad287
...
...
@@ -39,6 +39,7 @@ import Gargantext.Components.Bootstrap.Types (Elevation(..), Position(..), Toolt
import Gargantext.Components.Data.Landing (BlockText(..), BlockTexts(..), Button(..), LandingData(..))
import Gargantext.Components.FolderView as FV
import Gargantext.Components.Lang (LandingLang(..))
import Gargantext.Hooks.UseFeatureFlag as Feature
import Gargantext.Components.Lang.Landing.EnUS as En
import Gargantext.Components.Lang.Landing.FrFR as Fr
import Gargantext.Config as Config
...
...
@@ -138,7 +139,7 @@ homeLayoutCpt = here.component "homeLayout" cpt
]
-- @TODO
-- H.div { className: "home-research-form" } []
,
blocksRandomText' landingData
,
Feature.hide { keys: [ "expert" ], render: blocksRandomText' landingData }
, B.wad
[ "mt-8" ]
[ license
...
...
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