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
142
Issues
142
List
Board
Labels
Milestones
Merge Requests
4
Merge Requests
4
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
9e3893bb
Commit
9e3893bb
authored
Apr 11, 2022
by
Alexandre Delanoë
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/375-dev-docs-focus-rc1.x' into dev
parents
ba43b2bb
f1023aa0
Pipeline
#2695
failed with stage
in 0 seconds
Changes
14
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
189 additions
and
68 deletions
+189
-68
bootstrap-darkster.css
dist/styles/bootstrap-darkster.css
+16
-0
bootstrap-default.css
dist/styles/bootstrap-default.css
+16
-0
bootstrap-greyson.css
dist/styles/bootstrap-greyson.css
+16
-0
bootstrap-herbie.css
dist/styles/bootstrap-herbie.css
+16
-0
bootstrap-monotony.css
dist/styles/bootstrap-monotony.css
+16
-0
Node.js
src/Gargantext/Components/Forest/Tree/Node.js
+1
-0
Node.purs
src/Gargantext/Components/Forest/Tree/Node.purs
+44
-26
Sync.purs
src/Gargantext/Components/Forest/Tree/Node/Tools/Sync.purs
+12
-15
Sidebar.purs
src/Gargantext/Components/GraphExplorer/Sidebar.purs
+1
-4
Phylo.purs
src/Gargantext/Components/Nodes/Corpus/Phylo.purs
+2
-2
Layout.purs
src/Gargantext/Components/PhyloExplorer/Layout.purs
+4
-3
TopBar.purs
src/Gargantext/Components/PhyloExplorer/TopBar.purs
+5
-4
Popover.purs
src/Gargantext/Utils/Popover.purs
+8
-4
_tree.sass
src/sass/_legacy/_tree.sass
+32
-10
No files found.
dist/styles/bootstrap-darkster.css
View file @
9e3893bb
...
...
@@ -7827,6 +7827,9 @@ a:focus, a:hover {
margin-right
:
16px
;
}
.mainleaf__update-icon.b-icon-button--overlay
::before
,
.mainleaf__settings-icon.b-icon-button--overlay
::before
{
top
:
-5px
;
}
.mainleaf__progress-bar
{
width
:
64px
;
position
:
relative
;
...
...
@@ -7889,6 +7892,19 @@ a:focus, a:hover {
top
:
5px
;
}
@media
screen
and
(
-webkit-min-device-pixel-ratio
:
0
)
{
.awesome-popover
.b-icon-button--overlay
::before
{
bottom
:
-5px
;
}
}
@-moz-document
url-prefix
()
{
.awesome-popover
{
max-height
:
22.5px
;
}
.awesome-popover
.b-icon-button--overlay
::before
{
bottom
:
-3px
;
}
}
.subtree__node
{
margin-top
:
2px
;
}
...
...
dist/styles/bootstrap-default.css
View file @
9e3893bb
...
...
@@ -7780,6 +7780,9 @@ a:focus, a:hover {
margin-right
:
16px
;
}
.mainleaf__update-icon.b-icon-button--overlay
::before
,
.mainleaf__settings-icon.b-icon-button--overlay
::before
{
top
:
-5px
;
}
.mainleaf__progress-bar
{
width
:
64px
;
position
:
relative
;
...
...
@@ -7842,6 +7845,19 @@ a:focus, a:hover {
top
:
5px
;
}
@media
screen
and
(
-webkit-min-device-pixel-ratio
:
0
)
{
.awesome-popover
.b-icon-button--overlay
::before
{
bottom
:
-5px
;
}
}
@-moz-document
url-prefix
()
{
.awesome-popover
{
max-height
:
22.5px
;
}
.awesome-popover
.b-icon-button--overlay
::before
{
bottom
:
-3px
;
}
}
.subtree__node
{
margin-top
:
2px
;
}
...
...
dist/styles/bootstrap-greyson.css
View file @
9e3893bb
...
...
@@ -7536,6 +7536,9 @@ a:focus, a:hover {
margin-right
:
16px
;
}
.mainleaf__update-icon.b-icon-button--overlay
::before
,
.mainleaf__settings-icon.b-icon-button--overlay
::before
{
top
:
-5px
;
}
.mainleaf__progress-bar
{
width
:
64px
;
position
:
relative
;
...
...
@@ -7598,6 +7601,19 @@ a:focus, a:hover {
top
:
5px
;
}
@media
screen
and
(
-webkit-min-device-pixel-ratio
:
0
)
{
.awesome-popover
.b-icon-button--overlay
::before
{
bottom
:
-5px
;
}
}
@-moz-document
url-prefix
()
{
.awesome-popover
{
max-height
:
22.5px
;
}
.awesome-popover
.b-icon-button--overlay
::before
{
bottom
:
-3px
;
}
}
.subtree__node
{
margin-top
:
2px
;
}
...
...
dist/styles/bootstrap-herbie.css
View file @
9e3893bb
...
...
@@ -7784,6 +7784,9 @@ a:focus, a:hover {
margin-right
:
16px
;
}
.mainleaf__update-icon.b-icon-button--overlay
::before
,
.mainleaf__settings-icon.b-icon-button--overlay
::before
{
top
:
-5px
;
}
.mainleaf__progress-bar
{
width
:
64px
;
position
:
relative
;
...
...
@@ -7846,6 +7849,19 @@ a:focus, a:hover {
top
:
5px
;
}
@media
screen
and
(
-webkit-min-device-pixel-ratio
:
0
)
{
.awesome-popover
.b-icon-button--overlay
::before
{
bottom
:
-5px
;
}
}
@-moz-document
url-prefix
()
{
.awesome-popover
{
max-height
:
22.5px
;
}
.awesome-popover
.b-icon-button--overlay
::before
{
bottom
:
-3px
;
}
}
.subtree__node
{
margin-top
:
2px
;
}
...
...
dist/styles/bootstrap-monotony.css
View file @
9e3893bb
...
...
@@ -7785,6 +7785,9 @@ a:focus, a:hover {
margin-right
:
16px
;
}
.mainleaf__update-icon.b-icon-button--overlay
::before
,
.mainleaf__settings-icon.b-icon-button--overlay
::before
{
top
:
-5px
;
}
.mainleaf__progress-bar
{
width
:
64px
;
position
:
relative
;
...
...
@@ -7847,6 +7850,19 @@ a:focus, a:hover {
top
:
5px
;
}
@media
screen
and
(
-webkit-min-device-pixel-ratio
:
0
)
{
.awesome-popover
.b-icon-button--overlay
::before
{
bottom
:
-5px
;
}
}
@-moz-document
url-prefix
()
{
.awesome-popover
{
max-height
:
22.5px
;
}
.awesome-popover
.b-icon-button--overlay
::before
{
bottom
:
-3px
;
}
}
.subtree__node
{
margin-top
:
2px
;
}
...
...
src/Gargantext/Components/Forest/Tree/Node.js
0 → 100644
View file @
9e3893bb
exports
.
nodeUserRegexp
=
/
(
@
{1}
.*
)
.gargantext.org$/
;
src/Gargantext/Components/Forest/Tree/Node.purs
View file @
9e3893bb
module Gargantext.Components.Forest.Tree.Node where
module Gargantext.Components.Forest.Tree.Node
( nodeSpan
, blankNodeSpan
) where
import Gargantext.Prelude
import Data.Array.NonEmpty as NArray
import Data.Foldable (intercalate)
import Data.Maybe (Maybe(..))
import Data.Maybe (Maybe(..)
, maybe
)
import Data.Nullable (null)
import Data.String.Regex as Regex
import Data.Symbol (SProxy(..))
import Data.Tuple.Nested ((/\))
import Effect (Effect)
...
...
@@ -43,6 +48,9 @@ import Reactix.DOM.HTML as H
import Record as Record
import Toestand as T
-- (?) never been able to properly declare PureScript Regex...
foreign import nodeUserRegexp :: Regex.Regex
here :: R2.Here
here = R2.here "Gargantext.Components.Forest.Tree.Node"
...
...
@@ -285,6 +293,7 @@ nodeSpanCpt = here.component "nodeSpan" cpt
, href
, id
, name: name' props.name nodeType session
, type: nodeType
}
,
...
...
@@ -411,45 +420,54 @@ folderIconCpt = here.component "folderIcon" cpt where
-----------------------------------------------
type NodeLinkProps =
( callback :: Unit -> Effect Unit
, href :: String
, id :: Int
, name :: GT.Name
, type :: GT.NodeType
)
nodeLink :: R2.Leaf NodeLinkProps
nodeLink = R2.leaf nodeLinkCpt
nodeLinkCpt :: R.Component NodeLinkProps
nodeLinkCpt = here.component "nodeLink" cpt
where
cpt { callback
, href
, id
, nam
e
} _ = do
let
tid = tooltipId name id
nodeLinkCpt = here.component "nodeLink" cpt
where
cpt { callback
, href
, id
, name
, type: nodeTyp
e
} _ = do
-- Computed
let
tid = tooltipId name id
aProps =
{ href
} `Record.merge` B.tooltipBind tid
aProps =
{ href
} `Record.merge` B.tooltipBind tid
pure $
-- Render
pure $
H.div
{ className: "mainleaf__node-link"
, on: { click: const $ callback unit }
}
H.div
{ className: "mainleaf__node-link"
, on: { click: const $ callback unit }
}
[
H.a
aProps
[
H.a
aProps
[
B.span_ $ textEllipsisBreak 15 name
]
B.span_ $ nodeLinkText nodeType name
]
]
nodeLinkText :: GT.NodeType -> String -> String
nodeLinkText GT.NodeUser s = s # (truncateNodeUser)
>>> maybe s identity
nodeLinkText _ s = textEllipsisBreak 15 s
truncateNodeUser :: String -> Maybe String
truncateNodeUser = Regex.match (nodeUserRegexp) >=> flip NArray.index 1 >>> join
---------------------------------------------------
...
...
src/Gargantext/Components/Forest/Tree/Node/Tools/Sync.purs
View file @
9e3893bb
...
...
@@ -31,15 +31,15 @@ type NodeActionsGraphProps =
nodeActionsGraph :: R2.Component NodeActionsGraphProps
nodeActionsGraph = R.createElement nodeActionsGraphCpt
nodeActionsGraphCpt :: R.Component NodeActionsGraphProps
nodeActionsGraphCpt = here.component "nodeActionsGraph" cpt
where
cpt { id, graphVersions, session, refresh } _ = do
pure $ H.div { className: "node-actions" } [
if graphVersions.gv_graph == Just graphVersions.gv_repo then
H.div {} []
else
graphUpdateButton { id, session, refresh }
]
nodeActionsGraphCpt = here.component "nodeActionsGraph" cpt
where
cpt { id, graphVersions, session, refresh } _ =
let sameVersions = (graphVersions.gv_graph == Just graphVersions.gv_repo)
in pure $
R2.if' (not sameVersions) $
graphUpdateButton { id, session, refresh }
type GraphUpdateButtonProps =
( id :: GT.ID
...
...
@@ -99,12 +99,9 @@ type NodeActionsNodeListProps =
nodeActionsNodeList :: Record NodeActionsNodeListProps -> R.Element
nodeActionsNodeList p = R.createElement nodeActionsNodeListCpt p []
nodeActionsNodeListCpt :: R.Component NodeActionsNodeListProps
nodeActionsNodeListCpt = here.component "nodeActionsNodeList" cpt
where
cpt props _ = do
pure $ H.div { className: "node-actions" } [
nodeListUpdateButton props
]
nodeActionsNodeListCpt = here.component "nodeActionsNodeList" cpt where
cpt props _ = pure $ nodeListUpdateButton props
type NodeListUpdateButtonProps =
( listId :: GT.ListId
...
...
src/Gargantext/Components/GraphExplorer/Sidebar.purs
View file @
9e3893bb
...
...
@@ -326,7 +326,7 @@ selectedNodesCpt = here.component "selectedNodes" cpt where
[
updateTermButton
( commonProps `Record.merge`
{ variant: ButtonVariant
Primary
{ variant: ButtonVariant
Success
, rType: CandidateTerm
, nodesMap
}
...
...
@@ -344,9 +344,6 @@ selectedNodesCpt = here.component "selectedNodes" cpt where
]
]
---------------------------------------------------------
neighborhood :: R2.Leaf Props
...
...
src/Gargantext/Components/Nodes/Corpus/Phylo.purs
View file @
9e3893bb
...
...
@@ -93,7 +93,7 @@ phyloLayoutCpt = here.component "main" cpt where
case mEl of
Nothing -> R.nothing
Just el -> R2.addClass el [ "p-0
--i
" ]
Just el -> R2.addClass el [ "p-0" ]
R.useEffectOnce do
pure do
...
...
@@ -101,7 +101,7 @@ phyloLayoutCpt = here.component "main" cpt where
case mEl of
Nothing -> R.nothing
Just el -> R2.removeClass el [ "p-0
--i
" ]
Just el -> R2.removeClass el [ "p-0" ]
-- | Render
...
...
src/Gargantext/Components/PhyloExplorer/Layout.purs
View file @
9e3893bb
...
...
@@ -21,7 +21,7 @@ import Gargantext.Components.PhyloExplorer.TopBar (topBar)
import Gargantext.Components.PhyloExplorer.Types (DisplayView(..), PhyloDataSet(..), ExtractedTerm, ExtractedCount, Source, Term, sortSources)
import Gargantext.Hooks.FirstEffect (useFirstEffect')
import Gargantext.Hooks.UpdateEffect (useUpdateEffect1')
import Gargantext.Types (NodeID)
import Gargantext.Types (NodeID
, SidePanelState(..)
)
import Gargantext.Utils (getter, (?))
import Gargantext.Utils.Reactix as R2
import Graphics.D3.Base (d3)
...
...
@@ -46,6 +46,7 @@ layoutCpt = here.component "layout" cpt where
cpt { phyloDataSet: (PhyloDataSet o)
, nodeId
} _ = do
-- States
---------
...
...
@@ -82,7 +83,7 @@ layoutCpt = here.component "layout" cpt where
R2.useBox' false
sideBarDisplayed /\ sideBarDisplayedBox <-
R2.useBox'
false
R2.useBox'
InitialClosed
extractedTerms /\ extractedTermsBox <-
R2.useBox' (mempty :: Array ExtractedTerm)
...
...
@@ -256,7 +257,7 @@ layoutCpt = here.component "layout" cpt where
{ className: "phylo__sidebar"
-- @XXX: ReactJS lack of "keep-alive" feature workaround solution
-- @link https://github.com/facebook/react/issues/12039
, style: { display: sideBarDisplayed ? "block" $ "none" }
, style: { display: sideBarDisplayed
== Opened
? "block" $ "none" }
}
[
sideBar
...
...
src/Gargantext/Components/PhyloExplorer/TopBar.purs
View file @
9e3893bb
...
...
@@ -9,6 +9,7 @@ import Effect (Effect)
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (ButtonVariant(..), ComponentStatus(..), Variant(..))
import Gargantext.Components.PhyloExplorer.Types (Term(..), Source(..))
import Gargantext.Types (SidePanelState(..), toggleSidePanelState)
import Gargantext.Utils ((?))
import Gargantext.Utils.Reactix as R2
import Reactix (nothing)
...
...
@@ -27,7 +28,7 @@ type Props =
, resultCallback :: Maybe Term -> Effect Unit
, toolBar :: T.Box (Boolean)
, sideBar :: T.Box (
Boolean
)
, sideBar :: T.Box (
SidePanelState
)
)
here :: R2.Here
...
...
@@ -71,12 +72,12 @@ component = here.component "main" cpt where
-- Sidebar toggle
B.button
{ className: "phylo-topbar__sidebar"
, callback: \_ -> T.modify_ (
not
) sideBar
, variant: sideBar' ?
, callback: \_ -> T.modify_ (
toggleSidePanelState
) sideBar
, variant: sideBar'
== Opened
?
ButtonVariant Light $
OutlinedButtonVariant Light
}
[ H.text $ sideBar' ? "Hide sidebar" $ "Show sidebar" ]
[ H.text $ sideBar'
== Opened
? "Hide sidebar" $ "Show sidebar" ]
,
-- Source
H.div
...
...
src/Gargantext/Utils/Popover.purs
View file @
9e3893bb
module Gargantext.Utils.Popover where
import Gargantext.Prelude
import DOM.Simple as DOM
import Data.Maybe (maybe)
import Data.Nullable (Nullable, toMaybe)
import DOM.Simple as DOM
import Effect (Effect)
import Effect.Uncurried (EffectFn2, runEffectFn2)
import Reactix as R
import Gargantext.Prelude
import Record as Record
type PopoverRef = R.Ref (Nullable DOM.Element)
...
...
@@ -22,8 +23,11 @@ type Props =
foreign import popoverCpt :: R.Component Props
-- | https://github.com/vaheqelyan/react-awesome-popover
popover :: Record Props -> Array R.Element -> R.Element
popover = R.rawCreateElement popoverCpt
popover props children = R.rawCreateElement popoverCpt props' children
where
props' = Record.merge props { className: "awesome-popover" }
foreign import _setState :: forall a. EffectFn2 DOM.Element a Unit
...
...
src/sass/_legacy/_tree.sass
View file @
9e3893bb
...
...
@@ -60,10 +60,9 @@ $node-popup-width: 544px
////////////////////////////////////
$leaf-margin-bottom
:
3px
.mainleaf
$self
:
&
$leaf-margin-bottom
:
3px
display
:
flex
align-items
:
center
...
...
@@ -212,15 +211,14 @@ $leaf-margin-bottom: 3px
//----------------------------
&__update-icon,
&__settings-icon
// altering component overlay offset to fit it with the ".mainleaf" overlay
// dimension
$aside-icon-offset-y
: -5px
&
__update-icon
,
&
__settings-icon
// altering component overlay offset to fit it with the ".mainleaf" overlay
// dimension
$aside-icon-offset-top
:
-5px
&.b-icon-button--overlay::before
top: $aside-icon-offset-y
bottom: $aside-icon-offset-y
&.
b-icon-button--overlay
:
:
before
top
:
$aside-icon-offset-top
//----------------------------
...
...
@@ -303,6 +301,30 @@ $leaf-margin-bottom: 3px
position
:
absolute
top
:
$blank-link-offset-y
// (?) Chrome engine adds extra height to the overlay embedded settings icon
// → set an empirical icon overlay position
@media
screen
and
(
-
webkit-min-device-pixel-ratio
:
0
)
$icon-overlay-bottom
:
-5px
.awesome-popover
.
b-icon-button--overlay
:
:
before
bottom
:
$icon-overlay-bottom
// (?) FireFox engine adds extra height to the embedded settings
// → set an empirical fixed height on its wrapper to avoid
// an height flickering alteration (on mainleaf hover) ;
// and modify the icon overlay position
@-moz-document
url-prefix
()
$simulated-mainleaf-overlay-height
:
22
.5px
$icon-overlay-bottom
:
-3px
.awesome-popover
max-height
:
$simulated-mainleaf-overlay-height
.
b-icon-button--overlay
:
:
before
bottom
:
$icon-overlay-bottom
////////////////////////////////////////
...
...
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