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
140
Issues
140
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
8682b0cd
Commit
8682b0cd
authored
Apr 07, 2022
by
arturo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
>>> continue
parent
bd247a02
Pipeline
#2677
failed with stage
in 0 seconds
Changes
12
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
141 additions
and
155 deletions
+141
-155
bootstrap-darkster.css
dist/styles/bootstrap-darkster.css
+1
-4
bootstrap-default.css
dist/styles/bootstrap-default.css
+1
-4
bootstrap-greyson.css
dist/styles/bootstrap-greyson.css
+1
-4
bootstrap-herbie.css
dist/styles/bootstrap-herbie.css
+1
-4
bootstrap-monotony.css
dist/styles/bootstrap-monotony.css
+1
-4
Bootstrap.purs
src/Gargantext/Components/Bootstrap/Bootstrap.purs
+1
-1
Tooltip.purs
src/Gargantext/Components/Bootstrap/Floaty/Tooltip.purs
+8
-1
Node.purs
src/Gargantext/Components/Forest/Tree/Node.purs
+59
-56
Buttons.purs
src/Gargantext/Components/GraphExplorer/Buttons.purs
+2
-2
Router.purs
src/Gargantext/Components/Router.purs
+58
-67
TopBar.purs
src/Gargantext/Components/TopBar.purs
+4
-1
_tree.sass
src/sass/_legacy/_tree.sass
+4
-7
No files found.
dist/styles/bootstrap-darkster.css
View file @
8682b0cd
...
...
@@ -11409,9 +11409,6 @@ a:focus, a:hover {
content
:
""
;
background-color
:
#f8f9fa
;
}
.mainleaf--selected
.mainleaf__node-icon
{
color
:
#FF550B
;
}
.mainleaf--selected
.mainleaf__node-link
a
{
color
:
#FF550B
;
font-weight
:
bold
;
...
...
@@ -11430,7 +11427,7 @@ a:focus, a:hover {
content
:
""
;
background-color
:
#f8f9fa
;
height
:
12px
;
width
:
1
44
px
;
width
:
1
20
px
;
position
:
absolute
;
top
:
5px
;
}
...
...
dist/styles/bootstrap-default.css
View file @
8682b0cd
...
...
@@ -11361,9 +11361,6 @@ a:focus, a:hover {
content
:
""
;
background-color
:
#f8f9fa
;
}
.mainleaf--selected
.mainleaf__node-icon
{
color
:
#005a9a
;
}
.mainleaf--selected
.mainleaf__node-link
a
{
color
:
#005a9a
;
font-weight
:
bold
;
...
...
@@ -11382,7 +11379,7 @@ a:focus, a:hover {
content
:
""
;
background-color
:
#f8f9fa
;
height
:
12px
;
width
:
1
44
px
;
width
:
1
20
px
;
position
:
absolute
;
top
:
5px
;
}
...
...
dist/styles/bootstrap-greyson.css
View file @
8682b0cd
...
...
@@ -11117,9 +11117,6 @@ a:focus, a:hover {
content
:
""
;
background-color
:
#f8f9fa
;
}
.mainleaf--selected
.mainleaf__node-icon
{
color
:
#2f3c48
;
}
.mainleaf--selected
.mainleaf__node-link
a
{
color
:
#2f3c48
;
font-weight
:
bold
;
...
...
@@ -11138,7 +11135,7 @@ a:focus, a:hover {
content
:
""
;
background-color
:
#f8f9fa
;
height
:
12px
;
width
:
1
44
px
;
width
:
1
20
px
;
position
:
absolute
;
top
:
5px
;
}
...
...
dist/styles/bootstrap-herbie.css
View file @
8682b0cd
...
...
@@ -11366,9 +11366,6 @@ a:focus, a:hover {
content
:
""
;
background-color
:
#f8f9fa
;
}
.mainleaf--selected
.mainleaf__node-icon
{
color
:
#083358
;
}
.mainleaf--selected
.mainleaf__node-link
a
{
color
:
#083358
;
font-weight
:
bold
;
...
...
@@ -11387,7 +11384,7 @@ a:focus, a:hover {
content
:
""
;
background-color
:
#f8f9fa
;
height
:
12px
;
width
:
1
44
px
;
width
:
1
20
px
;
position
:
absolute
;
top
:
5px
;
}
...
...
dist/styles/bootstrap-monotony.css
View file @
8682b0cd
...
...
@@ -11399,9 +11399,6 @@ a:focus, a:hover {
content
:
""
;
background-color
:
#f8f9fa
;
}
.mainleaf--selected
.mainleaf__node-icon
{
color
:
#222222
;
}
.mainleaf--selected
.mainleaf__node-link
a
{
color
:
#222222
;
font-weight
:
bold
;
...
...
@@ -11420,7 +11417,7 @@ a:focus, a:hover {
content
:
""
;
background-color
:
#f8f9fa
;
height
:
12px
;
width
:
1
44
px
;
width
:
1
20
px
;
position
:
absolute
;
top
:
5px
;
}
...
...
src/Gargantext/Components/Bootstrap/Bootstrap.purs
View file @
8682b0cd
...
...
@@ -15,7 +15,7 @@ import Gargantext.Components.Bootstrap.IconButton(iconButton) as Exports
import Gargantext.Components.Bootstrap.ProgressBar(progressBar) as Exports
import Gargantext.Components.Bootstrap.Spinner(spinner) as Exports
import Gargantext.Components.Bootstrap.Tabs(tabs) as Exports
import Gargantext.Components.Bootstrap.Tooltip(tooltip,
tooltipBind
, tooltipContainer) as Exports
import Gargantext.Components.Bootstrap.Tooltip(tooltip,
TooltipBindingProps, tooltipBind, tooltipBind'
, tooltipContainer) as Exports
import Gargantext.Components.Bootstrap.Shortcut(
div', div_
...
...
src/Gargantext/Components/Bootstrap/Floaty/Tooltip.purs
View file @
8682b0cd
module Gargantext.Components.Bootstrap.Tooltip
( tooltip
,
tooltipBind
,
TooltipBindingProps, tooltipBind, tooltipBind'
, tooltipContainer
) where
...
...
@@ -90,6 +90,13 @@ tooltipBind =
, "data-tip": true
}
-- | Derived empty state
tooltipBind' :: Record TooltipBindingProps
tooltipBind' =
{ "data-for": ""
, "data-tip": false
}
-------------------------------------------------------------
type ContainerProps =
...
...
src/Gargantext/Components/Forest/Tree/Node.purs
View file @
8682b0cd
...
...
@@ -2,11 +2,9 @@ module Gargantext.Components.Forest.Tree.Node where
import Gargantext.Prelude
import DOM.Simple as DOM
import DOM.Simple.Event as DE
import Data.Foldable (intercalate)
import Data.Maybe (Maybe(..))
import Data.Nullable (
Nullable,
null)
import Data.Nullable (null)
import Data.Symbol (SProxy(..))
import Data.Tuple.Nested ((/\))
import Effect (Effect)
...
...
@@ -15,24 +13,21 @@ import Effect.Class (liftEffect)
import Gargantext.AsyncTasks as GAT
import Gargantext.Components.App.Data (Boxes)
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Tooltip (tooltipBind)
import Gargantext.Components.Bootstrap.Types (ComponentStatus(..), TooltipEffect(..), Variant(..))
import Gargantext.Components.Forest.Tree.Node.Action.Types (Action(..))
import Gargantext.Components.Forest.Tree.Node.Action.Upload (DroppedFile(..), fileTypeView)
import Gargantext.Components.Forest.Tree.Node.Action.Upload.Types (FileType(..), UploadFileBlob(..))
import Gargantext.Components.Forest.Tree.Node.Box (nodePopupView)
import Gargantext.Components.Forest.Tree.Node.Settings (SettingsBox(..), settingsBox)
import Gargantext.Components.Forest.Tree.Node.Tools.ProgressBar (BarType(..), asyncProgressBar)
import Gargantext.Components.Forest.Tree.Node.Tools.ProgressBar as PB
import Gargantext.Components.Forest.Tree.Node.Tools.Sync (nodeActionsGraph, nodeActionsNodeList)
import Gargantext.Components.GraphExplorer.API as GraphAPI
import Gargantext.Components.Lang (Lang(EN))
import Gargantext.Components.Nodes.Corpus (loadCorpusWithChild)
import Gargantext.Config.REST (logRESTError)
import Gargantext.Context.Progress (
AsyncProps,
asyncContext, asyncProgress)
import Gargantext.Context.Progress (asyncContext, asyncProgress)
import Gargantext.Ends (Frontends, url)
import Gargantext.Hooks.FirstEffect (useFirstEffect')
import Gargantext.Hooks.Loader (useLoader
, useLoader
Effect)
import Gargantext.Hooks.Loader (useLoaderEffect)
import Gargantext.Hooks.Version (Version, useVersion)
import Gargantext.Routes as Routes
import Gargantext.Sessions (Session, sessionId)
...
...
@@ -42,8 +37,6 @@ import Gargantext.Utils (nbsp, textEllipsisBreak, (?))
import Gargantext.Utils.Popover as Popover
import Gargantext.Utils.Reactix as R2
import Gargantext.Utils.Toestand as T2
import React.SyntheticEvent (SyntheticEvent_)
import React.SyntheticEvent as E
import React.SyntheticEvent as SE
import Reactix as R
import Reactix.DOM.HTML as H
...
...
@@ -78,7 +71,6 @@ nodeSpanCpt :: R.Component NodeSpanProps
nodeSpanCpt = here.component "nodeSpan" cpt
where
cpt props@{ boxes: boxes@{ errors
, handed
, reloadMainPage
, reloadRoot
, route
...
...
@@ -119,8 +111,8 @@ nodeSpanCpt = here.component "nodeSpan" cpt
dropClass Nothing _ = ""
name' :: String -> GT.NodeType -> Session -> String
name' _ GT.NodeUser s
ession = show session
name' n _ _
= n
name' _ GT.NodeUser s
= show s
name' n _ _ = n
isSelected = Just route' == Routes.nodeTypeAppRoute nodeType (sessionId session) id
...
...
@@ -128,6 +120,8 @@ nodeSpanCpt = here.component "nodeSpan" cpt
href = url frontends $ GT.NodePath (sessionId session) nodeType (Just id)
name = name' props.name nodeType session
-- Methods
dropHandler :: forall event.
...
...
@@ -151,18 +145,18 @@ nodeSpanCpt = here.component "nodeSpan" cpt
T.Box Boolean
-> SE.SyntheticEvent_ event
-> Effect Unit
onDragOverHandler
isDragOver
e = do
onDragOverHandler
box
e = do
-- prevent redirection when file is dropped
-- https://stackoverflow.com/a/6756680/941471
SE.preventDefault e
SE.stopPropagation e
T.write_ true
isDragOver
T.write_ true
box
onDragLeave :: forall event.
T.Box Boolean
-> SE.SyntheticEvent_ event
-> Effect Unit
onDragLeave
isDragOver _ = T.write_ false isDragOver
onDragLeave
box _ = T.write_ false box
onTaskFinish ::
GT.NodeID
...
...
@@ -231,6 +225,27 @@ nodeSpanCpt = here.component "nodeSpan" cpt
}
[
-- // Abstract informations //
nodeTooltip
{ id
, nodeType
, name
}
[
case mVersion of
Nothing -> mempty
Just v -> versionComparator v
]
,
R.createPortal
[
fileTypeView
{ dispatch, droppedFile, id, isDragOver, nodeType } []
]
host
,
-- // Leaf informations data //
folderIcon
...
...
@@ -240,15 +255,18 @@ nodeSpanCpt = here.component "nodeSpan" cpt
}
,
nodeIcon
{ nodeType
, isLeaf
, callback: const $ T.modify_ (not) folderOpen
}
(
{ nodeType
, isLeaf
, callback: const $ T.modify_ (not) folderOpen
, isSelected
}
)
[
case mVersion of
Nothing -> mempty
Just { clientVersion, remoteVersion} ->
B.iconButton
B.iconButton
$
{ className: intercalate " "
[ "mainleaf__version-badge"
, clientVersion == remoteVersion ?
...
...
@@ -305,7 +323,7 @@ nodeSpanCpt = here.component "nodeSpan" cpt
{ boxes
, dispatch
, id
, name
: name' props.name nodeType session
, name
, nodeType
, onPopoverClose: const $ onPopoverClose popoverRef
, session
...
...
@@ -325,35 +343,16 @@ nodeSpanCpt = here.component "nodeSpan" cpt
taskProgress
{}
]
,
-- // Abstract informations //
nodeTooltip
{ id
, nodeType
, name: name' props.name nodeType session
}
[
case mVersion of
Nothing -> mempty
Just v -> versionComparator v
]
,
R.createPortal
[
fileTypeView
{ dispatch, droppedFile, id, isDragOver, nodeType } []
]
host
]
---------------------------------------------------------
type NodeIconProps =
( nodeType :: GT.NodeType
, callback :: Unit -> Effect Unit
, isLeaf :: Boolean
( nodeType :: GT.NodeType
, callback :: Unit -> Effect Unit
, isLeaf :: Boolean
, isSelected :: Boolean
)
nodeIcon :: R2.Component NodeIconProps
...
...
@@ -363,18 +362,22 @@ nodeIconCpt = here.component "nodeIcon" cpt where
cpt { nodeType
, callback
, isLeaf
} children = pure $
, isSelected
} children = do
-- Render
pure $
H.span
{ className: "mainleaf__node-icon" } $
[
B.iconButton
{ name: GT.getIcon nodeType true
, callback
, status: isLeaf ? Idled $ Enabled
}
]
<> children
H.span
{ className: "mainleaf__node-icon" } $
[
B.iconButton
{ name: GT.getIcon nodeType true
, callback
, status: isLeaf ? Idled $ Enabled
, variant: isSelected ? Primary $ Dark
}
]
<> children
-----------------------------------------------
...
...
src/Gargantext/Components/GraphExplorer/Buttons.purs
View file @
8682b0cd
...
...
@@ -284,7 +284,7 @@ multiSelectEnabledButtonCpt = here.component "multiSelectEnabledButton" cpt
ButtonVariant Secondary
, callback: \_ -> T.write_ false state
}
[ H.text "Single
-node
" ]
[ H.text "Single" ]
,
B.button
{ variant: state' ?
...
...
@@ -292,5 +292,5 @@ multiSelectEnabledButtonCpt = here.component "multiSelectEnabledButton" cpt
OutlinedButtonVariant Secondary
, callback: \_ -> T.write_ true state
}
[ H.text "Multi
-nod
e" ]
[ H.text "Multi
pl
e" ]
]
src/Gargantext/Components/Router.purs
View file @
8682b0cd
This diff is collapsed.
Click to expand it.
src/Gargantext/Components/TopBar.purs
View file @
8682b0cd
...
...
@@ -9,6 +9,7 @@ import Gargantext.Components.Bootstrap.Types (ButtonVariant(..), Variant(..))
import Gargantext.Components.Lang (langSwitcher, allFeLangs)
import Gargantext.Components.Themes (themeSwitcher, allThemes)
import Gargantext.Types (Handed(..))
import Gargantext.Utils ((?))
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
...
...
@@ -64,7 +65,9 @@ topBarCpt = here.component "topBar" cpt
]
,
B.button
{ variant: ButtonVariant Light
{ variant: showTree' ?
ButtonVariant Light $
OutlinedButtonVariant Light
, callback: const $ T.modify_ (not) showTree
, className: "main-topbar__tree-switcher"
}
...
...
src/sass/_legacy/_tree.sass
View file @
8682b0cd
...
...
@@ -266,16 +266,13 @@ $leaf-margin-bottom: 3px
//----------------------------
&
--selected
&
--selected
&
#{
$self
}
__node-link
:
:
before
&
__node-link
:
:
before
content
:
""
background-color
:
$gray-100
#{
$self
}
__node-icon
color
:
$primary
#{
$self
}
__node-link
a
&
__node-link
a
color
:
$primary
font-weight
:
bold
...
...
@@ -291,7 +288,7 @@ $leaf-margin-bottom: 3px
&
--blank
//
for
<
Cloak
>
use
cases
$blank-color
:
$gray-100
$blank-link-width
:
1
44px
$blank-link-width
:
1
20px
//
roughly
max
size
of
a
truncated
node
link
text
$blank-link-height
:
12px
$blank-link-offset-y
:
5px
...
...
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