Skip to content

Commit

Permalink
Open tooltip on hover, show scroll on overflow y
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtemBaskal committed Jun 18, 2020
1 parent 19c0133 commit 15db9e9
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 2 additions & 4 deletions client/src/components/Logs/Cells/Tooltip.css
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@
pointer-events: auto !important;
background-color: var(--white);
z-index: 102;
overflow-y: scroll;
max-height: 100%;
}

.white-space--nowrap {
Expand Down Expand Up @@ -65,10 +67,6 @@
.grid .key-colon, .grid .title--border {
font-weight: bold;
}

.tooltip__container {
overflow-y: scroll;
}
}

.grid .key-colon:nth-child(odd)::after {
Expand Down
4 changes: 2 additions & 2 deletions client/src/components/Logs/Cells/getHintElement.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { Trans } from 'react-i18next';
import classNames from 'classnames';
import './Tooltip.css';
import 'react-popper-tooltip/dist/styles.css';
import { HIDE_TOOLTIP_DELAY } from '../../../helpers/constants';

const getHintElement = ({
className,
Expand All @@ -22,7 +23,7 @@ const getHintElement = ({
<Trans>{item || '—'}</Trans>
</div>,
),
}) => <TooltipTrigger placement={placement} trigger="click" tooltip={
}) => <TooltipTrigger placement={placement} trigger="hover" delayHide={HIDE_TOOLTIP_DELAY} tooltip={
({
tooltipRef,
getTooltipProps,
Expand Down Expand Up @@ -54,7 +55,6 @@ getHintElement.propTypes = {
placement: PropTypes.string,
canShowTooltip: PropTypes.string,
xlinkHref: PropTypes.string,
scrollHide: PropTypes.bool,
content: PropTypes.oneOfType([
PropTypes.string,
PropTypes.array,
Expand Down
1 change: 1 addition & 0 deletions client/src/helpers/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ export const DEBOUNCE_FILTER_TIMEOUT = 500;
export const CHECK_TIMEOUT = 1000;
export const SUCCESS_TOAST_TIMEOUT = 5000;
export const FAILURE_TOAST_TIMEOUT = 30000;
export const HIDE_TOOLTIP_DELAY = 300;

export const UNSAFE_PORTS = [
1,
Expand Down

0 comments on commit 15db9e9

Please sign in to comment.