]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-13527 Show full filename in concise issue on hover
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Mon, 15 Jun 2020 07:28:56 +0000 (09:28 +0200)
committersonartech <sonartech@sonarsource.com>
Fri, 19 Jun 2020 20:04:42 +0000 (20:04 +0000)
server/sonar-web/src/main/js/apps/issues/components/ComponentBreadcrumbs.tsx
server/sonar-web/src/main/js/apps/issues/components/__tests__/__snapshots__/ComponentBreadcrumbs-test.tsx.snap
server/sonar-web/src/main/js/apps/issues/conciseIssuesList/ConciseIssueComponent.tsx
server/sonar-web/src/main/js/apps/issues/conciseIssuesList/__tests__/__snapshots__/ConciseIssueComponent-test.tsx.snap
server/sonar-web/src/main/js/apps/issues/styles.css

index c6f6c118dd61a2d8d9fcc504e00890c97f85a01a..b0e134740ce2bfec303da7f352d50bb077272c21 100644 (file)
@@ -75,7 +75,7 @@ export default function ComponentBreadcrumbs({
         </span>
       )}
 
-      {collapsePath(componentName || '')}
+      <span title={componentName}>{collapsePath(componentName || '')}</span>
     </div>
   );
 }
index cdcbc76af08432d322c612c334e59eb1c69b442b..82ae1824db0053fa11ccb5641b1ce92e517a5584 100644 (file)
@@ -16,7 +16,11 @@ exports[`renders 1`] = `
       className="slash-separator"
     />
   </span>
-  comp-name
+  <span
+    title="comp-name"
+  >
+    comp-name
+  </span>
 </div>
 `;
 
@@ -44,6 +48,10 @@ exports[`renders with sub-project 1`] = `
       className="slash-separator"
     />
   </span>
-  comp-name
+  <span
+    title="comp-name"
+  >
+    comp-name
+  </span>
 </div>
 `;
index 2b48de14f2ae5f13db9e8f11f113dc2a82c595b6..d267b0c4046841434159be03428a2645b96e81e1 100644 (file)
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import { collapsePath } from 'sonar-ui-common/helpers/path';
 
 interface Props {
   path: string;
 }
 
-export default function ConciseIssueComponent(props: Props) {
+export default function ConciseIssueComponent({ path }: Props) {
   return (
-    <div className="concise-issue-component note text-ellipsis">{collapsePath(props.path, 20)}</div>
+    <div className="concise-issue-component text-ellipsis note" title={path}>
+      {path}
+    </div>
   );
 }
index a03391a81053d13c5fe9bd7898c48e2743690591..6a04ea2c1dc39186ba7db4f58d08cab9bf2ccc96 100644 (file)
@@ -2,8 +2,9 @@
 
 exports[`should render 1`] = `
 <div
-  className="concise-issue-component note text-ellipsis"
+  className="concise-issue-component text-ellipsis note"
+  title="src/app/folder/sub-folder/long-folder/name/app.js"
 >
-  src/.../long-folder/name/app.js
+  src/app/folder/sub-folder/long-folder/name/app.js
 </div>
 `;
index 88402d912afbe4ad33a1b200c5789db03d0382b9..1c166a3a06518f2dd1131432d10a4c0c9a0d0058 100644 (file)
@@ -54,6 +54,7 @@
   margin-bottom: calc(var(--gridSize) / 2);
   padding-left: var(--gridSize);
   padding-right: var(--gridSize);
+  direction: rtl;
 }
 
 .concise-issue-box {