From: David Cho-Lerat Date: Wed, 14 Jun 2023 08:10:07 +0000 (+0200) Subject: SONAR-19573 Update the standard facet's "No results" style X-Git-Tag: 10.1.0.73491~36 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4e03f778b863e05114d01bf24df7a0748381f043;p=sonarqube.git SONAR-19573 Update the standard facet's "No results" style --- diff --git a/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx b/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx index 0fba1b26538..9a33b8ab1b1 100644 --- a/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx +++ b/server/sonar-web/src/main/js/apps/issues/sidebar/StandardFacet.tsx @@ -19,7 +19,7 @@ */ /* eslint-disable react/no-unused-prop-types */ -import { FacetBox, FacetItem } from 'design-system'; +import { FacetBox, FacetItem, TextMuted } from 'design-system'; import { omit, sortBy, without } from 'lodash'; import * as React from 'react'; import { translate, translateWithParameters } from '../../../helpers/l10n'; @@ -267,11 +267,7 @@ export class StandardFacet extends React.PureComponent { onClick: (x: string, multiple?: boolean) => void ) => { if (!categories.length) { - return ( -
- {translate('no_results')} -
- ); + return ; } const getStat = (category: string) => { @@ -347,6 +343,10 @@ export class StandardFacet extends React.PureComponent { const allItemShown = limitedList.length + selectedBelowLimit.length === sortedItems.length; + if (!(limitedList.length || selectedBelowLimit.length)) { + return ; + } + return ( <> {limitedList.map((item) => (