* 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 {
}
let acceptedIssuesFooter = null;
- if (!newAcceptedIssues) {
+ if (isEmpty(newAcceptedIssues)) {
acceptedIssuesFooter = (
- <StyledInfoMessage className="sw-rounded-2 sw-text-xs sw-p-4 sw-flex sw-gap-1 sw-flex-wrap">
- <span>
- {intl.formatMessage({
- id: `overview.run_analysis_to_compute.${component.qualifier}`,
- })}
- </span>
+ <StyledInfoMessage className="sw-rounded-2 sw-p-4">
+ <Text size={TextSize.Small}>
+ <FormattedMessage id={`overview.run_analysis_to_compute.${component.qualifier}`} />
+ </Text>
</StyledInfoMessage>
);
} else {
acceptedIssuesFooter = (
- <TextSubdued className="sw-body-xs">
+ <Text size={TextSize.Small} isSubdued>
{intl.formatMessage({ id: 'overview.accepted_issues.help' })}
- </TextSubdued>
+ </Text>
);
}
return (
<div id={getTabPanelId(CodeScope.New)}>
{leakPeriod && (
- <span
- className="sw-body-xs sw-flex sw-items-center sw-mr-6"
- data-spotlight-id="cayc-promotion-2"
- >
- <LightLabel className="sw-mr-1">{translate('overview.new_code')}:</LightLabel>
- <b className="sw-flex">
+ <div className="sw-flex sw-items-center sw-mr-6" data-spotlight-id="cayc-promotion-2">
+ <Text isSubdued size={TextSize.Small} className="sw-mr-1">
+ {translate('overview.new_code')}:
+ </Text>
+ <Text isHighlighted size={TextSize.Small} className="sw-flex">
<LeakPeriodInfo leakPeriod={leakPeriod} />
- </b>
- </span>
+ </Text>
+ </div>
)}
<GridContainer className="sw-relative sw-overflow-hidden sw-mt-8 js-summary">
{!noConditionsAndWarningForNewCode && (
>
<IssueMeasuresCardInner
data-testid="overview__measures-accepted_issues"
- disabled={Boolean(component.needIssueSync) || !newAcceptedIssues}
+ disabled={Boolean(component.needIssueSync) || isEmpty(newAcceptedIssues)}
metric={MetricKey.new_accepted_issues}
value={formatMeasure(newAcceptedIssues, MetricType.ShortInteger)}
header={intl.formatMessage({
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { Note, SubHeading } from 'design-system';
+import { Text, Tooltip } from '@sonarsource/echoes-react';
+import { SubHeading } from 'design-system';
import * as React from 'react';
-import Tooltip from '../../../components/controls/Tooltip';
import { translateWithParameters } from '../../../helpers/l10n';
import { sanitizeStringRestricted } from '../../../helpers/sanitize';
import { ExtendedSettingDefinition } from '../../../types/settings';
)}
<Tooltip content={translateWithParameters('settings.key_x', definition.key)}>
- <Note as="div" className="sw-mt-4">
+ <Text isSubdued as="div" className="sw-mt-4">
{translateWithParameters('settings.key_x', definition.key)}
- </Note>
+ </Text>
</Tooltip>
</div>
);
* 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';
</FlagMessage>
)}
- <div className="sw-my-6">
- <p>{translate('settings.authentication.description')}</p>
- </div>
+ <Text as="p" className="sw-my-6">
+ {translate('settings.authentication.description')}
+ </Text>
<ToggleButton
role="tablist"
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { Spinner } from '@sonarsource/echoes-react';
+import { Spinner, Text } from '@sonarsource/echoes-react';
import { SubTitle } from 'design-system/lib';
import React from 'react';
import { FormattedMessage } from 'react-intl';
<SubTitle as="h3">
<FormattedMessage id="email_notification.header" />
</SubTitle>
- <FormattedMessage id="email_notification.description" />
+ <Text>
+ <FormattedMessage id="email_notification.description" />
+ </Text>
<Spinner isLoading={isLoading}>
{configuration == null || isEditing ? (
<EmailNotificationConfiguration
* along with this program; if not, write to the Free Software Foundation,
* Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
-import { LightLabel, Spinner } from 'design-system';
+import { Spinner, Text } from '@sonarsource/echoes-react';
import { isEqual, uniqBy } from 'lodash';
import * as React from 'react';
import { translate, translateWithParameters } from '../../helpers/l10n';
return (
<div className="sw-flex sw-justify-center sw-flex-col sw-items-stretch sw-grow">
<div className="sw-text-center">
- <Spinner loading={loading} />
+ <Spinner isLoading={loading} />
</div>
</div>
);
if (!hasHistoryData(series)) {
return (
<div className="sw-flex sw-items-center sw-justify-center sw-h-full">
- <LightLabel className="sw-body-sm">
+ <Text isSubdued>
{translate(
isCustom
? 'project_activity.graphs.custom.no_history'
: 'component_measures.no_history',
)}
- </LightLabel>
+ </Text>
</div>
);
}
* 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';
/>
</span>
</FlagMessage>
- <UnorderedList ticks className="sw-ml-8 sw-mb-4">
- {branchesEnabled && (
- <ListItem>
- {translate('onboarding.tutorial.with.jenkins.prereqs.plugins.branch_source', alm)}
- </ListItem>
- )}
- {!branchesEnabled && alm === AlmKeys.GitLab && (
- <ListItem>
- {translate('onboarding.tutorial.with.jenkins.prereqs.plugins.gitlab_plugin')}
- </ListItem>
- )}
- <ListItem>
- {translate('onboarding.tutorial.with.jenkins.prereqs.plugins.sonar_scanner')}
- </ListItem>
- </UnorderedList>
- <p className="sw-mb-4">
- <FormattedMessage
- defaultMessage={translate('onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide')}
- id="onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide"
- values={{
- link: (
- <Link to={docUrl}>
- {translate('onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide.link')}
- </Link>
- ),
- }}
- />
- </p>
- <p className="sw-mb-4">
- {translate('onboarding.tutorial.with.jenkins.prereqs.following_are_recommendations')}
- </p>
+ <Text as="div">
+ <ul className="sw-mb-4">
+ {branchesEnabled && (
+ <li>
+ {translate('onboarding.tutorial.with.jenkins.prereqs.plugins.branch_source', alm)}
+ </li>
+ )}
+ {!branchesEnabled && alm === AlmKeys.GitLab && (
+ <li>{translate('onboarding.tutorial.with.jenkins.prereqs.plugins.gitlab_plugin')}</li>
+ )}
+ <li>{translate('onboarding.tutorial.with.jenkins.prereqs.plugins.sonar_scanner')}</li>
+ </ul>
+ <p className="sw-mb-4">
+ <FormattedMessage
+ defaultMessage={translate(
+ 'onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide',
+ )}
+ id="onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide"
+ values={{
+ link: (
+ <Link to={docUrl}>
+ {translate('onboarding.tutorial.with.jenkins.prereqs.step_by_step_guide.link')}
+ </Link>
+ ),
+ }}
+ />
+ </p>
+ <p className="sw-mb-4">
+ {translate('onboarding.tutorial.with.jenkins.prereqs.following_are_recommendations')}
+ </p>
+ </Text>
</TutorialStep>
);
}