diff options
3 files changed, 32 insertions, 15 deletions
diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx index 79957e5340f..8a80d6826c7 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/DetailsHeader.tsx @@ -27,6 +27,7 @@ import { ItemButton, ItemDangerButton, ItemDivider, + LightLabel, SubTitle, } from 'design-system'; import { countBy } from 'lodash'; @@ -105,20 +106,34 @@ export default function DetailsHeader({ </div> </div> {qualityGate.isBuiltIn && ( - <p className="sw-mt-4"> - <FormattedMessage - defaultMessage="quality_gates.is_built_in.description" - id="quality_gates.is_built_in.description" - tagName="p" - values={{ - link: ( - <DocumentationLink to="/user-guide/clean-as-you-code/"> - {translate('clean_as_you_code')} - </DocumentationLink> - ), - }} - /> - </p> + <> + <LightLabel className="sw-mt-2"> + <FormattedMessage + defaultMessage="quality_gates.is_built_in.cayc.description" + id="quality_gates.is_built_in.cayc.description" + values={{ + link: ( + <DocumentationLink to="/user-guide/clean-as-you-code/"> + {translate('clean_as_you_code')} + </DocumentationLink> + ), + }} + /> + </LightLabel> + <span className="sw-mt-9"> + <FormattedMessage + defaultMessage="quality_gates.is_built_in.description" + id="quality_gates.is_built_in.description" + values={{ + link: ( + <DocumentationLink to="/user-guide/quality-gates/#recommended-quality-gate"> + {translate('learn_more')} + </DocumentationLink> + ), + }} + /> + </span> + </> )} </div> {actionsCount === 1 && ( diff --git a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx index ee43cfe93fb..ce39c5ec511 100644 --- a/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx +++ b/server/sonar-web/src/main/js/apps/quality-gates/components/__tests__/QualityGate-it.tsx @@ -82,6 +82,7 @@ it('should render the built-in quality gate properly', async () => { await user.click(builtInQualityGate); }); + expect(await screen.findByText(/quality_gates.is_built_in.cayc.description/)).toBeInTheDocument(); expect(await screen.findByText(/quality_gates.is_built_in.description/)).toBeInTheDocument(); }); diff --git a/sonar-core/src/main/resources/org/sonar/l10n/core.properties b/sonar-core/src/main/resources/org/sonar/l10n/core.properties index 73e397be9d9..fe1d5567495 100644 --- a/sonar-core/src/main/resources/org/sonar/l10n/core.properties +++ b/sonar-core/src/main/resources/org/sonar/l10n/core.properties @@ -2127,7 +2127,8 @@ quality_gates.copy=Copy Quality Gate quality_gates.cannot_set_default_no_cayc=You must make this quality gate Clean as You Code compliant to make this the default quality gate. quality_gates.cannot_copy_no_cayc=You must make this quality gate Clean as You Code compliant to copy. quality_gates.is_default_no_conditions=This is the default quality gate, but it has no configured conditions. Please configure at least 1 condition for this quality gate. -quality_gates.is_built_in.description=The only quality gate you need to practice {link} +quality_gates.is_built_in.description=Sonar Way is recommended for most projects. {link} +quality_gates.is_built_in.cayc.description=The only quality gate you need to practice {link} quality_gates.conditions=Conditions quality_gates.conditions.help=Your project will fail the Quality Gate if it crosses any metric thresholds set for New Code or Overall Code. quality_gates.conditions.help.link=See also: Clean as You Code |