From: Jeremy Davis Date: Thu, 19 Sep 2024 10:04:52 +0000 (+0200) Subject: SONAR-23030 Use Text component X-Git-Tag: 10.7.0.96327~62 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=88d60eb5226f7edd31f6df0f4ae2579844032dd7;p=sonarqube.git SONAR-23030 Use Text component --- diff --git a/server/sonar-web/src/main/js/apps/overview/branches/NewCodeMeasuresPanel.tsx b/server/sonar-web/src/main/js/apps/overview/branches/NewCodeMeasuresPanel.tsx index e56bf23087c..23df1709b69 100644 --- a/server/sonar-web/src/main/js/apps/overview/branches/NewCodeMeasuresPanel.tsx +++ b/server/sonar-web/src/main/js/apps/overview/branches/NewCodeMeasuresPanel.tsx @@ -18,19 +18,20 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ import styled from '@emotion/styled'; +import { Text, TextSize } from '@sonarsource/echoes-react'; import classNames from 'classnames'; import { LightLabel, NoDataIcon, SnoozeCircleIcon, TextError, - TextSubdued, TrendUpCircleIcon, getTabPanelId, themeColor, } from 'design-system'; +import { isEmpty } from 'lodash'; import React from 'react'; -import { useIntl } from 'react-intl'; +import { FormattedMessage, useIntl } from 'react-intl'; import { getBranchLikeQuery } from '~sonar-aligned/helpers/branch-like'; import { formatMeasure } from '~sonar-aligned/helpers/measures'; import { @@ -109,21 +110,19 @@ export default function NewCodeMeasuresPanel(props: Readonly) { } let acceptedIssuesFooter = null; - if (!newAcceptedIssues) { + if (isEmpty(newAcceptedIssues)) { acceptedIssuesFooter = ( - - - {intl.formatMessage({ - id: `overview.run_analysis_to_compute.${component.qualifier}`, - })} - + + + + ); } else { acceptedIssuesFooter = ( - + {intl.formatMessage({ id: 'overview.accepted_issues.help' })} - + ); } @@ -156,15 +155,14 @@ export default function NewCodeMeasuresPanel(props: Readonly) { return (
{leakPeriod && ( - - {translate('overview.new_code')}: - +
+ + {translate('overview.new_code')}: + + - - + +
)} {!noConditionsAndWarningForNewCode && ( @@ -213,7 +211,7 @@ export default function NewCodeMeasuresPanel(props: Readonly) { > ) { )} - + {translateWithParameters('settings.key_x', definition.key)} - +
); diff --git a/server/sonar-web/src/main/js/apps/settings/components/authentication/Authentication.tsx b/server/sonar-web/src/main/js/apps/settings/components/authentication/Authentication.tsx index ddb88e3a2d4..8f6e46d7097 100644 --- a/server/sonar-web/src/main/js/apps/settings/components/authentication/Authentication.tsx +++ b/server/sonar-web/src/main/js/apps/settings/components/authentication/Authentication.tsx @@ -18,7 +18,7 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { Link } from '@sonarsource/echoes-react'; +import { Link, Text } from '@sonarsource/echoes-react'; import classNames from 'classnames'; import { FlagMessage, SubTitle, ToggleButton, getTabId, getTabPanelId } from 'design-system'; import * as React from 'react'; @@ -123,9 +123,9 @@ export function Authentication(props: Props & WithAvailableFeaturesProps) { )} -
-

{translate('settings.authentication.description')}

-
+ + {translate('settings.authentication.description')} + - + + + {configuration == null || isEditing ? ( { return (
- +
); @@ -82,13 +82,13 @@ export default class GraphsHistory extends React.PureComponent { if (!hasHistoryData(series)) { return (
- + {translate( isCustom ? 'project_activity.graphs.custom.no_history' : 'component_measures.no_history', )} - +
); } diff --git a/server/sonar-web/src/main/js/components/tutorials/jenkins/PreRequisitesStep.tsx b/server/sonar-web/src/main/js/components/tutorials/jenkins/PreRequisitesStep.tsx index da01cd504e5..c1c1246f064 100644 --- a/server/sonar-web/src/main/js/components/tutorials/jenkins/PreRequisitesStep.tsx +++ b/server/sonar-web/src/main/js/components/tutorials/jenkins/PreRequisitesStep.tsx @@ -18,7 +18,8 @@ * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -import { FlagMessage, Link, ListItem, TutorialStep, UnorderedList } from 'design-system'; +import { Text } from '@sonarsource/echoes-react'; +import { FlagMessage, Link, TutorialStep } from 'design-system'; import * as React from 'react'; import { FormattedMessage } from 'react-intl'; import { DocLink } from '../../../helpers/doc-links'; @@ -47,37 +48,37 @@ export default function PreRequisitesStep(props: PreRequisitesStepProps) { /> - - {branchesEnabled && ( - - {translate('onboarding.tutorial.with.jenkins.prereqs.plugins.branch_source', alm)} - - )} - {!branchesEnabled && alm === AlmKeys.GitLab && ( - - {translate('onboarding.tutorial.with.jenkins.prereqs.plugins.gitlab_plugin')} - - )} - - {translate('onboarding.tutorial.with.jenkins.prereqs.plugins.sonar_scanner')} - - -

- - {translate('onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide.link')} - - ), - }} - /> -

-

- {translate('onboarding.tutorial.with.jenkins.prereqs.following_are_recommendations')} -

+ +
    + {branchesEnabled && ( +
  • + {translate('onboarding.tutorial.with.jenkins.prereqs.plugins.branch_source', alm)} +
  • + )} + {!branchesEnabled && alm === AlmKeys.GitLab && ( +
  • {translate('onboarding.tutorial.with.jenkins.prereqs.plugins.gitlab_plugin')}
  • + )} +
  • {translate('onboarding.tutorial.with.jenkins.prereqs.plugins.sonar_scanner')}
  • +
+

+ + {translate('onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide.link')} + + ), + }} + /> +

+

+ {translate('onboarding.tutorial.with.jenkins.prereqs.following_are_recommendations')} +

+
); }