]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-19174 Showing title for long file path inside duplication popup in code viewer
authorRevanshu Paliwal <revanshu.paliwal@sonarsource.com>
Mon, 12 Jun 2023 10:42:15 +0000 (12:42 +0200)
committersonartech <sonartech@sonarsource.com>
Mon, 12 Jun 2023 20:02:50 +0000 (20:02 +0000)
server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx

index ca1c33e6722d01ac17a687014655d6cbe5c06119..8c0e256502cdb6ee3d2ae6ffafbb678da7c1ae68 100644 (file)
@@ -123,12 +123,15 @@ export default class DuplicationPopup extends PureComponent<Props> {
           <>
             <DuplicationHighlight>{duplicationHeader}</DuplicationHighlight>
             {duplications.map((duplication) => (
-              <div className="sw-my-2 sw-truncate" key={duplication.file.key}>
+              <div className="sw-my-2" key={duplication.file.key}>
                 <div className="sw-flex sw-flex-wrap sw-body-sm">
                   {this.isDifferentComponent(duplication.file, this.props.sourceViewerFile) && (
                     <div className="sw-mr-4">
                       <QualifierIcon className="sw-mr-1" qualifier={ComponentQualifier.Project} />
-                      <Link to={getProjectUrl(duplication.file.project)}>
+                      <Link
+                        to={getProjectUrl(duplication.file.project)}
+                        title={duplication.file.projectName}
+                      >
                         {duplication.file.projectName}
                       </Link>
                     </div>
@@ -138,10 +141,15 @@ export default class DuplicationPopup extends PureComponent<Props> {
                     <div className="sw-mr-2">
                       {this.renderDuplication(
                         duplication.file,
-                        <>
+                        <span
+                          title={
+                            (collapsedDirFromPath(duplication.file.name) ?? '') +
+                            (fileFromPath(duplication.file.name) ?? '')
+                          }
+                        >
                           <span>{collapsedDirFromPath(duplication.file.name)}</span>
                           <span>{fileFromPath(duplication.file.name)}</span>
-                        </>
+                        </span>
                       )}
                     </div>
                   )}