Commit 28da24f3 authored by arturo's avatar arturo

>>> continue

parent 0a8ac5fe
...@@ -7827,6 +7827,9 @@ a:focus, a:hover { ...@@ -7827,6 +7827,9 @@ a:focus, a:hover {
margin-right: 16px; margin-right: 16px;
} }
.mainleaf__update-icon.b-icon-button--overlay::before, .mainleaf__settings-icon.b-icon-button--overlay::before {
top: -5px;
}
.mainleaf__progress-bar { .mainleaf__progress-bar {
width: 64px; width: 64px;
position: relative; position: relative;
...@@ -7889,6 +7892,19 @@ a:focus, a:hover { ...@@ -7889,6 +7892,19 @@ a:focus, a:hover {
top: 5px; 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 { .subtree__node {
margin-top: 2px; margin-top: 2px;
} }
......
...@@ -7780,6 +7780,9 @@ a:focus, a:hover { ...@@ -7780,6 +7780,9 @@ a:focus, a:hover {
margin-right: 16px; margin-right: 16px;
} }
.mainleaf__update-icon.b-icon-button--overlay::before, .mainleaf__settings-icon.b-icon-button--overlay::before {
top: -5px;
}
.mainleaf__progress-bar { .mainleaf__progress-bar {
width: 64px; width: 64px;
position: relative; position: relative;
...@@ -7842,6 +7845,19 @@ a:focus, a:hover { ...@@ -7842,6 +7845,19 @@ a:focus, a:hover {
top: 5px; 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 { .subtree__node {
margin-top: 2px; margin-top: 2px;
} }
......
...@@ -7536,6 +7536,9 @@ a:focus, a:hover { ...@@ -7536,6 +7536,9 @@ a:focus, a:hover {
margin-right: 16px; margin-right: 16px;
} }
.mainleaf__update-icon.b-icon-button--overlay::before, .mainleaf__settings-icon.b-icon-button--overlay::before {
top: -5px;
}
.mainleaf__progress-bar { .mainleaf__progress-bar {
width: 64px; width: 64px;
position: relative; position: relative;
...@@ -7598,6 +7601,19 @@ a:focus, a:hover { ...@@ -7598,6 +7601,19 @@ a:focus, a:hover {
top: 5px; 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 { .subtree__node {
margin-top: 2px; margin-top: 2px;
} }
......
...@@ -7784,6 +7784,9 @@ a:focus, a:hover { ...@@ -7784,6 +7784,9 @@ a:focus, a:hover {
margin-right: 16px; margin-right: 16px;
} }
.mainleaf__update-icon.b-icon-button--overlay::before, .mainleaf__settings-icon.b-icon-button--overlay::before {
top: -5px;
}
.mainleaf__progress-bar { .mainleaf__progress-bar {
width: 64px; width: 64px;
position: relative; position: relative;
...@@ -7846,6 +7849,19 @@ a:focus, a:hover { ...@@ -7846,6 +7849,19 @@ a:focus, a:hover {
top: 5px; 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 { .subtree__node {
margin-top: 2px; margin-top: 2px;
} }
......
...@@ -7785,6 +7785,9 @@ a:focus, a:hover { ...@@ -7785,6 +7785,9 @@ a:focus, a:hover {
margin-right: 16px; margin-right: 16px;
} }
.mainleaf__update-icon.b-icon-button--overlay::before, .mainleaf__settings-icon.b-icon-button--overlay::before {
top: -5px;
}
.mainleaf__progress-bar { .mainleaf__progress-bar {
width: 64px; width: 64px;
position: relative; position: relative;
...@@ -7847,6 +7850,19 @@ a:focus, a:hover { ...@@ -7847,6 +7850,19 @@ a:focus, a:hover {
top: 5px; 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 { .subtree__node {
margin-top: 2px; margin-top: 2px;
} }
......
...@@ -31,15 +31,15 @@ type NodeActionsGraphProps = ...@@ -31,15 +31,15 @@ type NodeActionsGraphProps =
nodeActionsGraph :: R2.Component NodeActionsGraphProps nodeActionsGraph :: R2.Component NodeActionsGraphProps
nodeActionsGraph = R.createElement nodeActionsGraphCpt nodeActionsGraph = R.createElement nodeActionsGraphCpt
nodeActionsGraphCpt :: R.Component NodeActionsGraphProps nodeActionsGraphCpt :: R.Component NodeActionsGraphProps
nodeActionsGraphCpt = here.component "nodeActionsGraph" cpt nodeActionsGraphCpt = here.component "nodeActionsGraph" cpt where
where cpt { id, graphVersions, session, refresh } _ =
cpt { id, graphVersions, session, refresh } _ = do let sameVersions = (graphVersions.gv_graph == Just graphVersions.gv_repo)
pure $ H.div { className: "node-actions" } [ in pure $
if graphVersions.gv_graph == Just graphVersions.gv_repo then
H.div {} [] R2.if' (not sameVersions) $
else
graphUpdateButton { id, session, refresh } graphUpdateButton { id, session, refresh }
]
type GraphUpdateButtonProps = type GraphUpdateButtonProps =
( id :: GT.ID ( id :: GT.ID
...@@ -99,12 +99,9 @@ type NodeActionsNodeListProps = ...@@ -99,12 +99,9 @@ type NodeActionsNodeListProps =
nodeActionsNodeList :: Record NodeActionsNodeListProps -> R.Element nodeActionsNodeList :: Record NodeActionsNodeListProps -> R.Element
nodeActionsNodeList p = R.createElement nodeActionsNodeListCpt p [] nodeActionsNodeList p = R.createElement nodeActionsNodeListCpt p []
nodeActionsNodeListCpt :: R.Component NodeActionsNodeListProps nodeActionsNodeListCpt :: R.Component NodeActionsNodeListProps
nodeActionsNodeListCpt = here.component "nodeActionsNodeList" cpt nodeActionsNodeListCpt = here.component "nodeActionsNodeList" cpt where
where cpt props _ = pure $ nodeListUpdateButton props
cpt props _ = do
pure $ H.div { className: "node-actions" } [
nodeListUpdateButton props
]
type NodeListUpdateButtonProps = type NodeListUpdateButtonProps =
( listId :: GT.ListId ( listId :: GT.ListId
......
module Gargantext.Utils.Popover where module Gargantext.Utils.Popover where
import Gargantext.Prelude
import DOM.Simple as DOM
import Data.Maybe (maybe) import Data.Maybe (maybe)
import Data.Nullable (Nullable, toMaybe) import Data.Nullable (Nullable, toMaybe)
import DOM.Simple as DOM
import Effect (Effect) import Effect (Effect)
import Effect.Uncurried (EffectFn2, runEffectFn2) import Effect.Uncurried (EffectFn2, runEffectFn2)
import Reactix as R import Reactix as R
import Record as Record
import Gargantext.Prelude
type PopoverRef = R.Ref (Nullable DOM.Element) type PopoverRef = R.Ref (Nullable DOM.Element)
...@@ -22,8 +23,11 @@ type Props = ...@@ -22,8 +23,11 @@ type Props =
foreign import popoverCpt :: R.Component Props foreign import popoverCpt :: R.Component Props
-- | https://github.com/vaheqelyan/react-awesome-popover
popover :: Record Props -> Array R.Element -> R.Element 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 foreign import _setState :: forall a. EffectFn2 DOM.Element a Unit
......
...@@ -60,10 +60,9 @@ $node-popup-width: 544px ...@@ -60,10 +60,9 @@ $node-popup-width: 544px
//////////////////////////////////// ////////////////////////////////////
$leaf-margin-bottom: 3px
.mainleaf .mainleaf
$self: & $self: &
$leaf-margin-bottom: 3px
display: flex display: flex
align-items: center align-items: center
...@@ -212,15 +211,14 @@ $leaf-margin-bottom: 3px ...@@ -212,15 +211,14 @@ $leaf-margin-bottom: 3px
//---------------------------- //----------------------------
&__update-icon, &__update-icon,
&__settings-icon &__settings-icon
// altering component overlay offset to fit it with the ".mainleaf" overlay // altering component overlay offset to fit it with the ".mainleaf" overlay
// dimension // dimension
$aside-icon-offset-y: -5px $aside-icon-offset-top: -5px
&.b-icon-button--overlay::before &.b-icon-button--overlay::before
top: $aside-icon-offset-y top: $aside-icon-offset-top
bottom: $aside-icon-offset-y
//---------------------------- //----------------------------
...@@ -303,6 +301,30 @@ $leaf-margin-bottom: 3px ...@@ -303,6 +301,30 @@ $leaf-margin-bottom: 3px
position: absolute position: absolute
top: $blank-link-offset-y 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
//////////////////////////////////////// ////////////////////////////////////////
......
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