]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-16456 Remove expand button on non file header
authorMathieu Suen <mathieu.suen@sonarsource.com>
Thu, 2 Jun 2022 10:14:31 +0000 (12:14 +0200)
committersonartech <sonartech@sonarsource.com>
Thu, 2 Jun 2022 20:03:18 +0000 (20:03 +0000)
server/sonar-web/src/main/js/apps/issues/crossComponentSourceViewer/ComponentSourceSnippetGroupViewer.tsx

index 2fe03336c7064a1795e0f1458809a222f2e711c7..00a82856a42d70e2e4233aaafe87d82e2bba9487 100644 (file)
@@ -26,6 +26,7 @@ import { locationsByLine } from '../../../components/SourceViewer/helpers/indexi
 import SourceViewerHeaderSlim from '../../../components/SourceViewer/SourceViewerHeaderSlim';
 import { getBranchLikeQuery } from '../../../helpers/branch-like';
 import { BranchLike } from '../../../types/branch-like';
+import { isFile } from '../../../types/component';
 import {
   Dict,
   Duplication,
@@ -423,7 +424,7 @@ export default class ComponentSourceSnippetGroupViewer extends React.PureCompone
       <div className="component-source-container" ref={this.rootNodeRef}>
         <SourceViewerHeaderSlim
           branchLike={branchLike}
-          expandable={!fullyShown}
+          expandable={!fullyShown && isFile(snippetGroup.component.q)}
           loading={loading}
           onExpand={this.expandComponent}
           sourceViewerFile={snippetGroup.component}