Commit 30adc599 authored by Alexandre Delanoë's avatar Alexandre Delanoë

Merge remote-tracking branch 'origin/546-dev-ngrams-scroll-position' into dev

parents 47c338f3 b9846ccb
...@@ -11492,6 +11492,11 @@ select.form-control { ...@@ -11492,6 +11492,11 @@ select.form-control {
font-size: 0.85rem; font-size: 0.85rem;
} }
.tree-expanded {
padding-top: 12px;
padding-bottom: 12px;
}
.annotation-run { .annotation-run {
cursor: pointer; cursor: pointer;
} }
......
...@@ -11296,6 +11296,11 @@ select.form-control { ...@@ -11296,6 +11296,11 @@ select.form-control {
font-size: 0.85rem; font-size: 0.85rem;
} }
.tree-expanded {
padding-top: 12px;
padding-bottom: 12px;
}
.annotation-run { .annotation-run {
cursor: pointer; cursor: pointer;
} }
......
...@@ -11058,6 +11058,11 @@ select.form-control { ...@@ -11058,6 +11058,11 @@ select.form-control {
font-size: 0.85rem; font-size: 0.85rem;
} }
.tree-expanded {
padding-top: 12px;
padding-bottom: 12px;
}
.annotation-run { .annotation-run {
cursor: pointer; cursor: pointer;
} }
......
...@@ -11306,6 +11306,11 @@ select.form-control { ...@@ -11306,6 +11306,11 @@ select.form-control {
font-size: 0.85rem; font-size: 0.85rem;
} }
.tree-expanded {
padding-top: 12px;
padding-bottom: 12px;
}
.annotation-run { .annotation-run {
cursor: pointer; cursor: pointer;
} }
......
...@@ -11307,6 +11307,11 @@ select.form-control { ...@@ -11307,6 +11307,11 @@ select.form-control {
font-size: 0.85rem; font-size: 0.85rem;
} }
.tree-expanded {
padding-top: 12px;
padding-bottom: 12px;
}
.annotation-run { .annotation-run {
cursor: pointer; cursor: pointer;
} }
......
...@@ -2,6 +2,7 @@ module Gargantext.Components.NgramsTable.Tree where ...@@ -2,6 +2,7 @@ module Gargantext.Components.NgramsTable.Tree where
import Gargantext.Prelude import Gargantext.Prelude
import Data.Array (length)
import Data.Array as A import Data.Array as A
import Data.Lens ((^..), (^.), view) import Data.Lens ((^..), (^.), view)
import Data.Lens.Fold (folded) import Data.Lens.Fold (folded)
...@@ -291,18 +292,33 @@ renderNgramsItemCpt = here.component "renderNgramsItem" cpt ...@@ -291,18 +292,33 @@ renderNgramsItemCpt = here.component "renderNgramsItem" cpt
H.div {} H.div {}
( if isEditing' ( if isEditing'
then then
[ if (length $ getNgramsChildren' ngrams) > 0
B.iconButton then
{ name: "plus" [ H.div {className: "tree-expanded"} [
, className: "mr-1 align-bottom" B.iconButton
, overlay: false { name: "plus"
, variant: Primary , className: "mr-1 align-bottom"
, callback: const $ dispatch $ ToggleChild true ngrams , overlay: false
} , variant: Primary
, , callback: const $ dispatch $ ToggleChild true ngrams
R2.buff $ }
tag [ text $ " " <> ngramsTermText ngramsDepth.ngrams ] ,
] R2.buff $
tag [ text $ " " <> ngramsTermText ngramsDepth.ngrams ]
] ]
else
[
B.iconButton
{ name: "plus"
, className: "mr-1 align-bottom"
, overlay: false
, variant: Primary
, callback: const $ dispatch $ ToggleChild true ngrams
}
,
R2.buff $
tag [ text $ " " <> ngramsTermText ngramsDepth.ngrams ]
]
else else
[ [
renderNgramsTree renderNgramsTree
......
...@@ -335,3 +335,7 @@ ...@@ -335,3 +335,7 @@
.context-item-date .context-item-date
color: $gray-600 color: $gray-600
font-size: .85rem font-size: .85rem
.tree-expanded
padding-top: 12px
padding-bottom: 12px
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment