diff options
author | Pascal Mugnier <pascal.mugnier@sonarsource.com> | 2018-03-27 14:58:40 +0200 |
---|---|---|
committer | SonarTech <sonartech@sonarsource.com> | 2018-03-27 20:22:34 +0200 |
commit | 4834030c0da412abe33342f52f189b3d9ba9d812 (patch) | |
tree | 2832ef87fdb4750fb8ff98eb1b25604d0439db9f /server/sonar-web/src/main/js/apps/projectActivity | |
parent | 068b6c16b02c90ceedfcacbd02d876cc851f8885 (diff) | |
download | sonarqube-4834030c0da412abe33342f52f189b3d9ba9d812.tar.gz sonarqube-4834030c0da412abe33342f52f189b3d9ba9d812.zip |
SONAR-9578 Prevent "freezing effect" when hovering the tooltip on graph (#44)
Diffstat (limited to 'server/sonar-web/src/main/js/apps/projectActivity')
2 files changed, 7 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltips.js b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltips.js index 98c8c2db81c..cf17cc3b037 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltips.js +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/GraphsTooltips.js @@ -19,6 +19,7 @@ */ // @flow import React from 'react'; +import classNames from 'classnames'; import GraphsTooltipsContent from './GraphsTooltipsContent'; import GraphsTooltipsContentEvents from './GraphsTooltipsContentEvents'; import GraphsTooltipsContentCoverage from './GraphsTooltipsContentCoverage'; @@ -95,7 +96,9 @@ export default class GraphsTooltips extends React.PureComponent { const tooltipContent = this.renderContent().filter(Boolean); const addSeparator = tooltipContent.length > 0; return ( - <BubblePopup customClass={customClass} position={{ top, left, width: TOOLTIP_WIDTH }}> + <BubblePopup + customClass={classNames(customClass, 'disabled-pointer-events')} + position={{ top, left, width: TOOLTIP_WIDTH }}> <div className="project-activity-graph-tooltip"> <div className="project-activity-graph-tooltip-title spacer-bottom"> <DateTimeFormatter date={this.props.selectedDate} /> diff --git a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltips-test.js.snap b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltips-test.js.snap index 96758777f80..c2723826cfe 100644 --- a/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltips-test.js.snap +++ b/server/sonar-web/src/main/js/apps/projectActivity/components/__tests__/__snapshots__/GraphsTooltips-test.js.snap @@ -2,7 +2,7 @@ exports[`should not add separators if not needed 1`] = ` <BubblePopup - customClass="bubble-popup-right" + customClass="bubble-popup-right disabled-pointer-events" position={ Object { "left": 476, @@ -37,7 +37,7 @@ exports[`should not add separators if not needed 1`] = ` exports[`should render correctly for issues graphs 1`] = ` <BubblePopup - customClass="bubble-popup-right" + customClass="bubble-popup-right disabled-pointer-events" position={ Object { "left": 476, @@ -95,7 +95,7 @@ exports[`should render correctly for issues graphs 1`] = ` exports[`should render correctly for random graphs 1`] = ` <BubblePopup - customClass="bubble-popup-right" + customClass="bubble-popup-right disabled-pointer-events" position={ Object { "left": 476, |