From e9712bd39c63373d2ee16be40cdd1d1db351c640 Mon Sep 17 00:00:00 2001 From: Jeremy Davis Date: Tue, 6 Jun 2023 16:27:10 +0200 Subject: [PATCH] SONAR-19398 Remove NewCode toggle for Applications --- .../main/js/apps/code/components/Search.tsx | 30 +++++++++++++------ .../resources/org/sonar/l10n/core.properties | 1 + 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/code/components/Search.tsx b/server/sonar-web/src/main/js/apps/code/components/Search.tsx index 69980d82774..3c1323fe81b 100644 --- a/server/sonar-web/src/main/js/apps/code/components/Search.tsx +++ b/server/sonar-web/src/main/js/apps/code/components/Search.tsx @@ -28,7 +28,7 @@ import { getBranchLikeQuery } from '../../../helpers/branch-like'; import { KeyboardKeys } from '../../../helpers/keycodes'; import { translate } from '../../../helpers/l10n'; import { BranchLike } from '../../../types/branch-like'; -import { ComponentQualifier, isView } from '../../../types/component'; +import { ComponentQualifier, isPortfolioLike, isView } from '../../../types/component'; import { ComponentMeasure } from '../../../types/types'; interface Props { @@ -141,11 +141,13 @@ class Search extends React.PureComponent { render() { const { className, component, newCodeSelected } = this.props; const { loading, query } = this.state; - const isViewLike = isView(component.qualifier); + const isPortfolio = isPortfolioLike(component.qualifier); + + const searchPlaceholder = getSearchPlaceholderLabel(component.qualifier as ComponentQualifier); return (