]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-19197 Move Code Variant facet before Directory facet
authorWouter Admiraal <wouter.admiraal@sonarsource.com>
Tue, 23 May 2023 07:57:31 +0000 (09:57 +0200)
committersonartech <sonartech@sonarsource.com>
Tue, 23 May 2023 20:03:09 +0000 (20:03 +0000)
server/sonar-web/src/main/js/apps/issues/sidebar/Sidebar.tsx

index ea5ce2bfbed0cf407994f6c40ce8944a82466858..3b96cac8bbc0e5a8ca39fc135d4fc94b71a3a88a 100644 (file)
@@ -96,6 +96,15 @@ export class Sidebar extends React.PureComponent<Props> {
     };
     return (
       <>
+        {showVariantsFilter && isProject(component?.qualifier) && (
+          <VariantFacet
+            fetching={loadingFacets.codeVariants === true}
+            open={!!openFacets.codeVariants}
+            stats={facets.codeVariants}
+            values={query.codeVariants}
+            {...commonProps}
+          />
+        )}
         {component.qualifier !== ComponentQualifier.Directory && (
           <DirectoryFacet
             branchLike={branchLike}
@@ -106,15 +115,6 @@ export class Sidebar extends React.PureComponent<Props> {
             {...commonProps}
           />
         )}
-        {showVariantsFilter && isProject(component?.qualifier) && (
-          <VariantFacet
-            fetching={loadingFacets.codeVariants === true}
-            open={!!openFacets.codeVariants}
-            stats={facets.codeVariants}
-            values={query.codeVariants}
-            {...commonProps}
-          />
-        )}
         <FileFacet
           branchLike={branchLike}
           fetching={loadingFacets.files === true}