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
6345d0d4
Commit
6345d0d4
authored
Jul 02, 2022
by
arturo
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[phylo] Change ngram for selected terms
*
#408
: UI/UX first layer, no interaction yet
parent
83b4876a
Pipeline
#3011
canceled with stage
Changes
8
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
171 additions
and
14 deletions
+171
-14
bootstrap-darkster.css
dist/styles/bootstrap-darkster.css
+8
-0
bootstrap-default.css
dist/styles/bootstrap-default.css
+8
-0
bootstrap-greyson.css
dist/styles/bootstrap-greyson.css
+8
-0
bootstrap-herbie.css
dist/styles/bootstrap-herbie.css
+8
-0
bootstrap-monotony.css
dist/styles/bootstrap-monotony.css
+8
-0
SelectionTab.purs
...antext/Components/PhyloExplorer/Sidebar/SelectionTab.purs
+37
-14
UpdateTerms.purs
...gantext/Components/PhyloExplorer/Sidebar/UpdateTerms.purs
+79
-0
_phylo.scss
src/sass/_legacy/_phylo.scss
+15
-0
No files found.
dist/styles/bootstrap-darkster.css
View file @
6345d0d4
...
...
@@ -9574,6 +9574,14 @@ select.form-control {
padding
:
0.25em
0.4em
;
font-weight
:
bold
;
}
.phylo-selection-tab__highlight__expand
{
position
:
absolute
;
right
:
1.25rem
;
bottom
:
1rem
;
}
.phylo-selection-tab__highlight__actions
{
margin-top
:
16px
;
}
.phylo-selection-tab__selection
{
margin
:
16px
20px
;
}
...
...
dist/styles/bootstrap-default.css
View file @
6345d0d4
...
...
@@ -9526,6 +9526,14 @@ select.form-control {
padding
:
0.25em
0.4em
;
font-weight
:
bold
;
}
.phylo-selection-tab__highlight__expand
{
position
:
absolute
;
right
:
1.25rem
;
bottom
:
1rem
;
}
.phylo-selection-tab__highlight__actions
{
margin-top
:
16px
;
}
.phylo-selection-tab__selection
{
margin
:
16px
20px
;
}
...
...
dist/styles/bootstrap-greyson.css
View file @
6345d0d4
...
...
@@ -9283,6 +9283,14 @@ select.form-control {
padding
:
0.25em
0.4em
;
font-weight
:
bold
;
}
.phylo-selection-tab__highlight__expand
{
position
:
absolute
;
right
:
1.25rem
;
bottom
:
1rem
;
}
.phylo-selection-tab__highlight__actions
{
margin-top
:
16px
;
}
.phylo-selection-tab__selection
{
margin
:
16px
20px
;
}
...
...
dist/styles/bootstrap-herbie.css
View file @
6345d0d4
...
...
@@ -9531,6 +9531,14 @@ select.form-control {
padding
:
0.25em
0.4em
;
font-weight
:
bold
;
}
.phylo-selection-tab__highlight__expand
{
position
:
absolute
;
right
:
1.25rem
;
bottom
:
1rem
;
}
.phylo-selection-tab__highlight__actions
{
margin-top
:
16px
;
}
.phylo-selection-tab__selection
{
margin
:
16px
20px
;
}
...
...
dist/styles/bootstrap-monotony.css
View file @
6345d0d4
...
...
@@ -9532,6 +9532,14 @@ select.form-control {
padding
:
0.25em
0.4em
;
font-weight
:
bold
;
}
.phylo-selection-tab__highlight__expand
{
position
:
absolute
;
right
:
1.25rem
;
bottom
:
1rem
;
}
.phylo-selection-tab__highlight__actions
{
margin-top
:
16px
;
}
.phylo-selection-tab__selection
{
margin
:
16px
20px
;
}
...
...
src/Gargantext/Components/PhyloExplorer/Sidebar/SelectionTab.purs
View file @
6345d0d4
...
...
@@ -13,6 +13,7 @@ import Effect (Effect)
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (ButtonVariant(..), Variant(..))
import Gargantext.Components.PhyloExplorer.Sidebar.DocList (docListWrapper)
import Gargantext.Components.PhyloExplorer.Sidebar.UpdateTerms (updateTerms)
import Gargantext.Components.PhyloExplorer.Store as PhyloStore
import Gargantext.Components.PhyloExplorer.Types (ExtractedCount(..), ExtractedTerm(..), defaultCacheParams)
import Gargantext.Hooks.FirstEffect (useFirstEffect')
...
...
@@ -47,6 +48,7 @@ component = here.component "main" cpt where
selectedBranch <- R2.useLive' store.selectedBranch
selectedSource <- R2.useLive' store.selectedSource
expandNeighborhood <- R2.useLive' store.expandNeighborhood
expandSelection <- R2.useLive' store.expandSelection
showMore' /\ showMore <- R2.useBox' false
...
...
@@ -79,8 +81,8 @@ component = here.component "main" cpt where
-- | Behaviors
-- |
let
onExpandClick _ = T.modify_ (not) store.expandNeighborhood
onExpand
Neighborhood
Click _ = T.modify_ (not) store.expandNeighborhood
onExpandSelectionClick _ = T.modify_ (not) store.expandSelection
-- | Render
-- |
...
...
@@ -195,11 +197,24 @@ component = here.component "main" cpt where
[
H.text "term"
]
,
-- Expand Selection actions
B.iconButton
{ name: expandSelection ?
"caret-up" $
"caret-down"
, className: "phylo-selection-tab__highlight__expand"
, callback: onExpandSelectionClick
}
]
,
-- Selection actions
R2.when expandSelection $
H.li
{ className: "list-group-item" }
[
-- Wikipedia informations
H.a
{ href: "https://en.wikipedia.org/w/index.php?search=\""
<> s
...
...
@@ -209,6 +224,14 @@ component = here.component "main" cpt where
[
H.text "Click here for more info"
]
,
-- NGrams edition
H.div
{ className: "phylo-selection-tab__highlight__actions" }
[
updateTerms
{}
]
]
]
]
...
...
@@ -270,7 +293,7 @@ component = here.component "main" cpt where
"caret-up" $
"caret-down"
, className: "phylo-selection-tab__counter__expand"
, callback: onExpandClick
, callback: onExpand
Neighborhood
Click
}
]
,
...
...
src/Gargantext/Components/PhyloExplorer/Sidebar/UpdateTerms.purs
0 → 100644
View file @
6345d0d4
module Gargantext.Components.PhyloExplorer.Sidebar.UpdateTerms where
import Gargantext.Prelude
import Effect (Effect)
import Gargantext.Components.App.Store as AppStore
import Gargantext.Components.Bootstrap as B
import Gargantext.Components.Bootstrap.Types (ButtonVariant(..), ComponentStatus(..), Variant(..))
import Gargantext.Components.PhyloExplorer.Store as PhyloStore
import Gargantext.Utils.Reactix as R2
import Reactix as R
import Reactix.DOM.HTML as H
here :: R2.Here
here = R2.here "Gargantext.Components.PhyloExplorer.Sidebar.UpdateTerms"
-- | @NOTE #408: only dealing with single Term selection
-- | (hence not dealing with multiple selection, nor Branch,
-- | nor Source → if so, please change the source code accordingly)
updateTerms :: R2.Leaf ()
updateTerms = R2.leaf updateTermsCpt
updateTermsCpt :: R.Component ()
updateTermsCpt = here.component "main" cpt where
cpt {} _ = do
-- | States
-- |
{ errors
, reloadForest
} <- AppStore.use
{ selectedTerm
, phyloId
} <- PhyloStore.use
selectedTerm' <- R2.useLive' selectedTerm
phyloId' <- R2.useLive' phyloId
-- | Behaviors
-- |
let
callback :: Unit -> Effect Unit
callback _ = pure unit
-- | Render
-- |
pure $
B.buttonGroup
{ collapse: false }
[
B.button
{ variant: ButtonVariant Light
, status: Disabled
, callback
}
[
B.icon
{ name: "circle"
, className: "mr-1 candidate-term"
}
,
H.text "Move as candidate"
]
,
B.button
{ variant: ButtonVariant Light
, status: Disabled
, callback
}
[
B.icon
{ name: "circle"
, className: "mr-1 stop-term"
}
,
H.text "Move as stop"
]
]
src/sass/_legacy/_phylo.scss
View file @
6345d0d4
...
...
@@ -594,6 +594,21 @@ $decreasing-color: #11638F;
padding
:
$badge-padding-y
$badge-padding-x
;
font-weight
:
bold
;
}
&
__expand
{
// Following <list-group-item> spacing
$position-x
:
$list-group-item-padding-x
;
// Empirical: fit well with icon overlay
$position-y
:
1rem
;
position
:
absolute
;
right
:
$position-x
;
bottom
:
$position-y
;
}
&
__actions
{
margin-top
:
space-x
(
2
);
}
}
&
__selection
{
...
...
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