From: Wouter Admiraal Date: Mon, 17 Dec 2018 11:09:32 +0000 (+0100) Subject: SONAR-11568 Fix tooltip when hovering over a search result with mouse X-Git-Tag: 7.6~214 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=35d4defcf214eec9f04f00860538199f82f997c1;p=sonarqube.git SONAR-11568 Fix tooltip when hovering over a search result with mouse --- diff --git a/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx b/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx index c75fd6719b3..67eb15dbb84 100644 --- a/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx +++ b/server/sonar-web/src/main/js/app/components/search/SearchResult.tsx @@ -122,28 +122,28 @@ export default class SearchResult extends React.PureComponent { placement="left" visible={this.state.tooltipVisible}> - - {component.isFavorite && } - {!component.isFavorite && component.isRecentlyBrowsed && } - + + + {component.isFavorite && } + {!component.isFavorite && component.isRecentlyBrowsed && } + + + + {component.match ? ( + + ) : ( + {component.name} + )} + + {this.renderOrganization(component)} + {this.renderProject(component)} - - {component.match ? ( - - ) : ( - {component.name} - )} - - {this.renderOrganization(component)} - {this.renderProject(component)} diff --git a/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchResult-test.tsx.snap b/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchResult-test.tsx.snap index 0a9d6781bf0..21d0975f905 100644 --- a/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchResult-test.tsx.snap +++ b/server/sonar-web/src/main/js/app/components/search/__tests__/__snapshots__/SearchResult-test.tsx.snap @@ -11,10 +11,8 @@ exports[`renders favorite 1`] = ` visible={false} > - - - - - foo + + + + + + foo + @@ -60,10 +63,8 @@ exports[`renders match 1`] = ` visible={false} > - + + + oo", + } + } /> - oo", - } - } - /> @@ -108,10 +114,8 @@ exports[`renders organizations 1`] = ` visible={false} > - - - - - foo + + + + + + foo + +
+ bar +
-
- bar -
@@ -161,10 +170,8 @@ exports[`renders organizations 2`] = ` visible={false} > - - - - - foo + + + + + + foo + @@ -209,10 +221,8 @@ exports[`renders projects 1`] = ` visible={false} > - - - - - qwe + + + + + + qwe + +
+ foo +
-
- foo -
@@ -262,10 +277,8 @@ exports[`renders recently browsed 1`] = ` visible={false} > - - - - - foo + + + + + + foo + @@ -310,10 +328,8 @@ exports[`renders selected 1`] = ` visible={false} > - - - - foo + + + + + foo + @@ -356,10 +377,8 @@ exports[`renders selected 2`] = ` visible={false} > - - - - foo + + + + + foo +