From bc10c18c1d79cf4659e6d7389f1805d3bd2dadc6 Mon Sep 17 00:00:00 2001 From: Philippe Perrin Date: Tue, 21 Jul 2020 13:06:30 +0200 Subject: [PATCH] SONAR-13599 Remove scope from Rules --- .../components/RuleDetailsMeta.tsx | 20 +------------------ .../RuleDetailsMeta-test.tsx.snap | 12 ----------- .../resources/org/sonar/l10n/core.properties | 5 ----- 3 files changed, 1 insertion(+), 36 deletions(-) diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx index 1dca1f3849a..88c76616153 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx @@ -24,7 +24,6 @@ import Dropdown from 'sonar-ui-common/components/controls/Dropdown'; import Tooltip from 'sonar-ui-common/components/controls/Tooltip'; import IssueTypeIcon from 'sonar-ui-common/components/icons/IssueTypeIcon'; import LinkIcon from 'sonar-ui-common/components/icons/LinkIcon'; -import RuleScopeIcon from 'sonar-ui-common/components/icons/RuleScopeIcon'; import DateFormatter from 'sonar-ui-common/components/intl/DateFormatter'; import { PopupPlacement } from 'sonar-ui-common/components/ui/popups'; import { translate, translateWithParameters } from 'sonar-ui-common/helpers/l10n'; @@ -197,18 +196,6 @@ export default class RuleDetailsMeta extends React.PureComponent { ); }; - renderScope = () => { - const scope = this.props.ruleDetails.scope || 'MAIN'; - return ( - -
  • - - {translate('coding_rules.scope', scope)} -
  • -
    - ); - }; - renderExternalBadge = () => { const { ruleDetails } = this.props; if (!ruleDetails.repo) { @@ -265,12 +252,7 @@ export default class RuleDetailsMeta extends React.PureComponent {
      {this.renderType()} {this.renderSeverity()} - {!ruleDetails.isExternal && ( - <> - {this.renderStatus()} - {this.renderScope()} - - )} + {!ruleDetails.isExternal && this.renderStatus()} {this.renderTags()} {!ruleDetails.isExternal && this.renderCreationDate()} {this.renderRepository()} diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsMeta-test.tsx.snap b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsMeta-test.tsx.snap index be77ee6e3b2..9de6d69e248 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsMeta-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsMeta-test.tsx.snap @@ -88,18 +88,6 @@ exports[`should display right meta info 1`] = ` /> - -
    • - - coding_rules.scope.MAIN -
    • -