aboutsummaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
authorRevanshu Paliwal <revanshu.paliwal@sonarsource.com>2023-06-12 12:42:15 +0200
committersonartech <sonartech@sonarsource.com>2023-06-12 20:02:50 +0000
commit6af7276c5587e1bb62551f20df7b046ba803ba58 (patch)
treea4d9176193d851eb586760a193889bc05e429afa /server
parent24554326887a8d5404927fa55f5ee7bcf49fb69a (diff)
downloadsonarqube-6af7276c5587e1bb62551f20df7b046ba803ba58.tar.gz
sonarqube-6af7276c5587e1bb62551f20df7b046ba803ba58.zip
SONAR-19174 Showing title for long file path inside duplication popup in code viewer
Diffstat (limited to 'server')
-rw-r--r--server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx16
1 files changed, 12 insertions, 4 deletions
diff --git a/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx b/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx
index ca1c33e6722..8c0e256502c 100644
--- a/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx
+++ b/server/sonar-web/src/main/js/components/SourceViewer/components/DuplicationPopup.tsx
@@ -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>
)}