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
568bbd85
Commit
568bbd85
authored
May 22, 2025
by
Yoelis Acourt
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
refactor: feature -> hide for simplicity
parent
635d544a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
28 deletions
+35
-28
Layout.purs
src/Gargantext/Components/Corpus/Layout.purs
+31
-22
TopBar.purs
src/Gargantext/Components/TopBar.purs
+4
-6
No files found.
src/Gargantext/Components/Corpus/Layout.purs
View file @
568bbd85
...
@@ -22,6 +22,7 @@ import Gargantext.Utils.Reactix as R2
...
@@ -22,6 +22,7 @@ import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix as R
import Reactix.DOM.HTML as H
import Reactix.DOM.HTML as H
import Toestand as T
import Toestand as T
import Gargantext.Hooks.UseFeatureFlag as Feature
type Props =
type Props =
( nodeId :: ID
( nodeId :: ID
...
@@ -107,28 +108,11 @@ layoutCpt = here.component "layout" cpt
...
@@ -107,28 +108,11 @@ layoutCpt = here.component "layout" cpt
[ editionBlock
[ editionBlock
{ nodeId }
{ nodeId }
]
]
, H.div
, Feature.hide
{ className: "node-layout__code-section corpus-layout__code-section" }
{ keys: [ "expert" ]
[ tileMenu
, render: viewCodeSectionButton boxes corpusCodeRoute
{ boxes
, currentTile: Just corpusCodeRoute
}
, xTile: Just corpusCodeRoute
, yTile: Just corpusCodeRoute
}
[ B.button
{ callback: const $ pure unit
, status: Muted
, size: SmallSize
, variant: ButtonVariant Secondary
}
[ B.icon
{ name: "code" }
, B.wad_
[ "d-inline-block", "virtual-space", "w-1" ]
, H.text "Code section"
]
]
]
, H.div
, H.div
{ className: "node-layout__folders corpus-layout__folders" }
{ className: "node-layout__folders corpus-layout__folders" }
[ FV.folderView
[ FV.folderView
...
@@ -138,6 +122,31 @@ layoutCpt = here.component "layout" cpt
...
@@ -138,6 +122,31 @@ layoutCpt = here.component "layout" cpt
]
]
]
]
viewCodeSectionButton :: Record AppStore.Store -> (Unit -> Effect GR.AppRoute) -> R.Element
viewCodeSectionButton boxes corpusCodeRoute =
H.div
{ className: "node-layout__code-section corpus-layout__code-section" }
[ tileMenu
{ boxes
, currentTile: Just corpusCodeRoute
, xTile: Just corpusCodeRoute
, yTile: Just corpusCodeRoute
}
[ B.button
{ callback: const $ pure unit
, status: Muted
, size: SmallSize
, variant: ButtonVariant Secondary
}
[ B.icon
{ name: "code" }
, B.wad_
[ "d-inline-block", "virtual-space", "w-1" ]
, H.text "Code section"
]
]
]
onExpandTableEditionChange :: T.Change Boolean -> Effect Unit
onExpandTableEditionChange :: T.Change Boolean -> Effect Unit
onExpandTableEditionChange { new } = do
onExpandTableEditionChange { new } = do
cache <- R2.loadLocalStorageState' R2.appParamsKey defaultCacheParams
cache <- R2.loadLocalStorageState' R2.appParamsKey defaultCacheParams
...
...
src/Gargantext/Components/TopBar.purs
View file @
568bbd85
...
@@ -75,16 +75,14 @@ componentCpt = here.component "main" cpt
...
@@ -75,16 +75,14 @@ componentCpt = here.component "main" cpt
, viewSideBar showTree' onTreeToggleClick
, viewSideBar showTree' onTreeToggleClick
, viewChangeLayoutSide
, viewChangeLayoutSide
, viewInfoMenu { location: windowLocation } []
, viewInfoMenu { location: windowLocation } []
, Feature.
featur
e
, Feature.
hid
e
{ keys: [ "expert" ]
{ keys: [ "expert" ]
, render: \shouldRender ->
, render: viewQuestionMark
if shouldRender then viewQuestionMark else empty
}
}
, Feature.
featur
e
, Feature.
hid
e
{ keys: [ "expert" ]
{ keys: [ "expert" ]
, render: \shouldRender ->
, render: viewThemeSelector theme
if shouldRender then viewThemeSelector theme else empty
}
}
, H.div
, H.div
...
...
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