Commit d628054a authored by arturo's avatar arturo

>>> continue

parent e280486d
Pipeline #2985 failed with stage
in 0 seconds
...@@ -9025,21 +9025,24 @@ select.form-control { ...@@ -9025,21 +9025,24 @@ select.form-control {
font-family: "Comfortaa"; font-family: "Comfortaa";
} }
.ngrams-tree-loaded-node--child::before, .ngrams-tree-loaded-node--subchild::before { .ngrams-tree-loaded-node--first-child::before, .ngrams-tree-loaded-node--grand-child::before {
color: #6C757D; color: #6C757D;
font-size: 11px; font-size: 11px;
margin-right: 4px; margin-right: 4px;
} }
.right-handed .ngrams-tree-loaded-node--child::before, .right-handed .ngrams-tree-loaded-node--subchild::before { .right-handed .ngrams-tree-loaded-node--first-child::before, .right-handed .ngrams-tree-loaded-node--grand-child::before {
content: "└"; content: "└";
} }
.left-handed .ngrams-tree-loaded-node--child::before, .left-handed .ngrams-tree-loaded-node--subchild::before { .left-handed .ngrams-tree-loaded-node--first-child::before, .left-handed .ngrams-tree-loaded-node--grand-child::before {
content: "┘"; content: "┘";
} }
.ngrams-tree-loaded-node--subchild { .ngrams-tree-loaded-node--first-child {
padding-left: 13px; margin-left: -2px;
}
.ngrams-tree-loaded-node--grand-child {
margin-left: 13px;
} }
.annotation-run { .annotation-run {
......
...@@ -8977,21 +8977,24 @@ select.form-control { ...@@ -8977,21 +8977,24 @@ select.form-control {
font-weight: bold; font-weight: bold;
} }
.ngrams-tree-loaded-node--child::before, .ngrams-tree-loaded-node--subchild::before { .ngrams-tree-loaded-node--first-child::before, .ngrams-tree-loaded-node--grand-child::before {
color: #CED4DA; color: #CED4DA;
font-size: 11px; font-size: 11px;
margin-right: 4px; margin-right: 4px;
} }
.right-handed .ngrams-tree-loaded-node--child::before, .right-handed .ngrams-tree-loaded-node--subchild::before { .right-handed .ngrams-tree-loaded-node--first-child::before, .right-handed .ngrams-tree-loaded-node--grand-child::before {
content: "└"; content: "└";
} }
.left-handed .ngrams-tree-loaded-node--child::before, .left-handed .ngrams-tree-loaded-node--subchild::before { .left-handed .ngrams-tree-loaded-node--first-child::before, .left-handed .ngrams-tree-loaded-node--grand-child::before {
content: "┘"; content: "┘";
} }
.ngrams-tree-loaded-node--subchild { .ngrams-tree-loaded-node--first-child {
padding-left: 13px; margin-left: -2px;
}
.ngrams-tree-loaded-node--grand-child {
margin-left: 13px;
} }
.annotation-run { .annotation-run {
......
...@@ -8734,21 +8734,24 @@ select.form-control { ...@@ -8734,21 +8734,24 @@ select.form-control {
font-family: "Oswald"; font-family: "Oswald";
} }
.ngrams-tree-loaded-node--child::before, .ngrams-tree-loaded-node--subchild::before { .ngrams-tree-loaded-node--first-child::before, .ngrams-tree-loaded-node--grand-child::before {
color: #CED4DA; color: #CED4DA;
font-size: 11px; font-size: 11px;
margin-right: 4px; margin-right: 4px;
} }
.right-handed .ngrams-tree-loaded-node--child::before, .right-handed .ngrams-tree-loaded-node--subchild::before { .right-handed .ngrams-tree-loaded-node--first-child::before, .right-handed .ngrams-tree-loaded-node--grand-child::before {
content: "└"; content: "└";
} }
.left-handed .ngrams-tree-loaded-node--child::before, .left-handed .ngrams-tree-loaded-node--subchild::before { .left-handed .ngrams-tree-loaded-node--first-child::before, .left-handed .ngrams-tree-loaded-node--grand-child::before {
content: "┘"; content: "┘";
} }
.ngrams-tree-loaded-node--subchild { .ngrams-tree-loaded-node--first-child {
padding-left: 13px; margin-left: -2px;
}
.ngrams-tree-loaded-node--grand-child {
margin-left: 13px;
} }
.annotation-run { .annotation-run {
......
...@@ -8982,21 +8982,24 @@ select.form-control { ...@@ -8982,21 +8982,24 @@ select.form-control {
font-family: "Crete Round"; font-family: "Crete Round";
} }
.ngrams-tree-loaded-node--child::before, .ngrams-tree-loaded-node--subchild::before { .ngrams-tree-loaded-node--first-child::before, .ngrams-tree-loaded-node--grand-child::before {
color: #CED4DA; color: #CED4DA;
font-size: 11px; font-size: 11px;
margin-right: 4px; margin-right: 4px;
} }
.right-handed .ngrams-tree-loaded-node--child::before, .right-handed .ngrams-tree-loaded-node--subchild::before { .right-handed .ngrams-tree-loaded-node--first-child::before, .right-handed .ngrams-tree-loaded-node--grand-child::before {
content: "└"; content: "└";
} }
.left-handed .ngrams-tree-loaded-node--child::before, .left-handed .ngrams-tree-loaded-node--subchild::before { .left-handed .ngrams-tree-loaded-node--first-child::before, .left-handed .ngrams-tree-loaded-node--grand-child::before {
content: "┘"; content: "┘";
} }
.ngrams-tree-loaded-node--subchild { .ngrams-tree-loaded-node--first-child {
padding-left: 13px; margin-left: -2px;
}
.ngrams-tree-loaded-node--grand-child {
margin-left: 13px;
} }
.annotation-run { .annotation-run {
......
...@@ -8983,21 +8983,24 @@ select.form-control { ...@@ -8983,21 +8983,24 @@ select.form-control {
font-family: "Open Sans"; font-family: "Open Sans";
} }
.ngrams-tree-loaded-node--child::before, .ngrams-tree-loaded-node--subchild::before { .ngrams-tree-loaded-node--first-child::before, .ngrams-tree-loaded-node--grand-child::before {
color: #CED4DA; color: #CED4DA;
font-size: 11px; font-size: 11px;
margin-right: 4px; margin-right: 4px;
} }
.right-handed .ngrams-tree-loaded-node--child::before, .right-handed .ngrams-tree-loaded-node--subchild::before { .right-handed .ngrams-tree-loaded-node--first-child::before, .right-handed .ngrams-tree-loaded-node--grand-child::before {
content: "└"; content: "└";
} }
.left-handed .ngrams-tree-loaded-node--child::before, .left-handed .ngrams-tree-loaded-node--subchild::before { .left-handed .ngrams-tree-loaded-node--first-child::before, .left-handed .ngrams-tree-loaded-node--grand-child::before {
content: "┘"; content: "┘";
} }
.ngrams-tree-loaded-node--subchild { .ngrams-tree-loaded-node--first-child {
padding-left: 13px; margin-left: -2px;
}
.ngrams-tree-loaded-node--grand-child {
margin-left: 13px;
} }
.annotation-run { .annotation-run {
......
...@@ -15,7 +15,7 @@ import Data.Set as Set ...@@ -15,7 +15,7 @@ import Data.Set as Set
import Effect (Effect) import Effect (Effect)
import Effect.Aff (Aff) import Effect.Aff (Aff)
import Gargantext.Components.Bootstrap as B import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (Variant(..)) import Gargantext.Components.Bootstrap.Types (ComponentStatus(..), Variant(..))
import Gargantext.Components.Table as Tbl import Gargantext.Components.Table as Tbl
import Gargantext.Config.REST (logRESTError) import Gargantext.Config.REST (logRESTError)
import Gargantext.Core.NgramsTable.Functions (applyNgramsPatches, setTermListA, tablePatchHasNgrams) import Gargantext.Core.NgramsTable.Functions (applyNgramsPatches, setTermListA, tablePatchHasNgrams)
...@@ -132,10 +132,10 @@ treeLoadedCpt = here.component "treeLoaded" cpt where ...@@ -132,10 +132,10 @@ treeLoadedCpt = here.component "treeLoaded" cpt where
{ className: intercalate " " { className: intercalate " "
[ "ngrams-tree-loaded-node" [ "ngrams-tree-loaded-node"
, ngramsDepth.depth == 1 ? , ngramsDepth.depth == 1 ?
"ngrams-tree-loaded-node--child" $ "ngrams-tree-loaded-node--first-child" $
"" ""
, ngramsDepth.depth > 1 ? , ngramsDepth.depth > 1 ?
"ngrams-tree-loaded-node--subchild" $ "ngrams-tree-loaded-node--grand-child" $
"" ""
] ]
} }
...@@ -210,9 +210,18 @@ renderNgramsItemCpt = here.component "renderNgramsItem" cpt ...@@ -210,9 +210,18 @@ renderNgramsItemCpt = here.component "renderNgramsItem" cpt
isEditing' <- T.useLive T.unequal isEditing isEditing' <- T.useLive T.unequal isEditing
pure $ Tbl.makeRow pure $ Tbl.makeRow
[ H.div {} [
[ H.span { className: "fa fa-eye-slash" H.div
, on: { click: onClick } } [] { className: "text-center"
, style: { marginTop: "6px" }
}
[
B.iconButton
{ name: "eye-slash"
, status: Disabled -- see `onClick` behavior
, callback: onClick
, className: ""
}
] ]
, selected , selected
, checkbox GT.MapTerm , checkbox GT.MapTerm
...@@ -244,7 +253,10 @@ renderNgramsItemCpt = here.component "renderNgramsItem" cpt ...@@ -244,7 +253,10 @@ renderNgramsItemCpt = here.component "renderNgramsItem" cpt
} }
] ]
) )
, H.text $ show (ngramsElement ^. _NgramsElement <<< _occurrences) ,
B.wad'
[ "pl-3" ] $
show (ngramsElement ^. _NgramsElement <<< _occurrences)
] ]
where where
ngramsDepth = { ngrams, depth: 0 } ngramsDepth = { ngrams, depth: 0 }
...@@ -277,21 +289,42 @@ renderNgramsItemCpt = here.component "renderNgramsItem" cpt ...@@ -277,21 +289,42 @@ renderNgramsItemCpt = here.component "renderNgramsItem" cpt
-- | ngramsTransient = const Nothing -- | ngramsTransient = const Nothing
-- | otherwise = Just <<< dispatch <<< cycleTermListItem <<< view _ngrams -- | otherwise = Just <<< dispatch <<< cycleTermListItem <<< view _ngrams
selected = selected =
H.input { checked: Set.member ngrams ngramsSelection B.wad
, className: "checkbox" [ "text-center" ]
, on: { change: const $ dispatch $ ToggleSelect ngrams } [
, type: "checkbox" H.input
} { checked: Set.member ngrams ngramsSelection
, className: "checkbox"
, on: { change: const $ dispatch $ ToggleSelect ngrams }
, type: "checkbox"
, style:
{ cursor: "pointer"
, marginTop: "6px"
}
}
]
checkbox termList' = checkbox termList' =
let chkd = termList == termList' let chkd = termList == termList'
termList'' = if chkd then GT.CandidateTerm else termList' termList'' = if chkd then GT.CandidateTerm else termList'
in in
H.input { checked: chkd B.wad
, className: "checkbox" [ "text-center" ]
, on: { change: const $ dispatch $ CoreAction $ [
setTermListA ngrams (replace termList termList'') } H.input
, readOnly: ngramsTransient { checked: chkd
, type: "checkbox" } , className: "checkbox"
, on: { change: const $ dispatch $ CoreAction $
setTermListA ngrams (replace termList termList'') }
, readOnly: ngramsTransient
, type: "checkbox"
, style:
{ cursor: "pointer"
, marginTop: "6px"
}
}
]
ngramsTransient = tablePatchHasNgrams ngramsLocalPatch ngrams ngramsTransient = tablePatchHasNgrams ngramsLocalPatch ngrams
-- ^ TODO here we do not look at ngramsNewElems, shall we? -- ^ TODO here we do not look at ngramsNewElems, shall we?
ngramsOpacity ngramsOpacity
......
...@@ -130,21 +130,27 @@ ...@@ -130,21 +130,27 @@
////////////////////////////////////////////////// //////////////////////////////////////////////////
.ngrams-tree-loaded-node .ngrams-tree-loaded-node
// empirical value where the child separator aligns with its parent text
$child-offset: 13px
&--child,
&--subchild
&::before &--first-child::before,
color: $gray-400 &--grand-child::before
font-size: 11px color: $gray-400
margin-right: space-x(0.5) font-size: 11px
margin-right: space-x(0.5)
@include right-handed @include right-handed
content: "└" content: "└"
@include left-handed @include left-handed
content: "┘" content: "┘"
&--subchild &--first-child
padding-left: $child-offset // empirical value where the child separator aligns with its parent text
$child-offset: -2px
margin-left: -2px
&--grand-child
// empirical value where the child separator aligns with its parent text
$child-offset: 13px
margin-left: 13px
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