From ad9331af4d13764c6890d76c70ba96c633e9e956 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Gr=C3=A9goire=20Aubert?= Date: Wed, 8 May 2019 16:48:36 +0200 Subject: [PATCH] SONAR-12040 Drop duplicated css classes --- server/sonar-web/src/main/js/api/ce.ts | 2 +- .../nav/component/ComponentNavBranch.tsx | 2 +- .../notifications/NotificationsSidebar.tsx | 2 +- .../src/main/js/app/styles/init/misc.css | 19 ------------------- .../components/RuleDetailsMeta.tsx | 4 +--- .../RuleDetailsMeta-test.tsx.snap | 2 +- .../main/js/apps/issues/components/App.tsx | 2 +- .../components/ProjectCardLeakMeasures.tsx | 6 +++--- .../components/ProjectCardOverallMeasures.tsx | 6 +++--- .../ProjectCardLeakMeasures-test.tsx.snap | 12 ++++++------ .../ProjectCardOverallMeasures-test.tsx.snap | 6 +++--- .../changelog/ChangelogSearch.tsx | 2 +- .../ChangelogSearch-test.tsx.snap | 2 +- .../js/components/controls/ListFooter.tsx | 4 +--- .../components/docs/DocCollapsibleBlock.tsx | 2 +- .../src/main/js/components/docs/DocLink.tsx | 2 +- .../js/components/docs/DocTooltipLink.tsx | 2 +- .../DocCollapsibleBlock-test.tsx.snap | 4 ++-- .../__snapshots__/DocLink-test.tsx.snap | 2 +- .../DocTooltipLink-test.tsx.snap | 2 +- .../issue/components/IssueMessage.tsx | 6 +++--- .../__snapshots__/IssueMessage-test.tsx.snap | 2 +- .../issue/popups/SetAssigneePopup.tsx | 4 +--- 23 files changed, 36 insertions(+), 61 deletions(-) diff --git a/server/sonar-web/src/main/js/api/ce.ts b/server/sonar-web/src/main/js/api/ce.ts index 7d73d30fc77..7fdee30f235 100644 --- a/server/sonar-web/src/main/js/api/ce.ts +++ b/server/sonar-web/src/main/js/api/ce.ts @@ -43,7 +43,7 @@ export function getActivity(data: RequestData): Promise<{ tasks: T.Task[] }> { export function getStatus( componentId?: string -): Promise<{ failing: number; inProgress: number; pending: number }> { +): Promise<{ failing: number; inProgress: number; pending: number; pendingTime?: number }> { const data = {}; if (componentId) { Object.assign(data, { componentId }); diff --git a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx index 3b6ffb947eb..546558794e6 100644 --- a/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx +++ b/server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx @@ -156,7 +156,7 @@ export class ComponentNavBranch extends React.PureComponent { {displayName} {configuration && configuration.showSettings && ( - + )} diff --git a/server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx b/server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx index 660678a7552..7463fae9b79 100644 --- a/server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx +++ b/server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx @@ -72,7 +72,7 @@ export default function NotificationsSidebar(props: Props) { {translate('show_more')} {loadingMore && ( - + )} diff --git a/server/sonar-web/src/main/js/app/styles/init/misc.css b/server/sonar-web/src/main/js/app/styles/init/misc.css index bae0eeefa72..0e27826da62 100644 --- a/server/sonar-web/src/main/js/app/styles/init/misc.css +++ b/server/sonar-web/src/main/js/app/styles/init/misc.css @@ -17,25 +17,6 @@ * along with this program; if not, write to the Free Software Foundation, * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ -.vertical-top { - vertical-align: top !important; -} - -.vertical-bottom { - vertical-align: bottom !important; -} - -.vertical-middle { - vertical-align: middle !important; -} - -.vertical-text-top { - vertical-align: text-top !important; -} - -.vertical-baseline { - vertical-align: baseline !important; -} .nowrap { white-space: nowrap !important; 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 4e9b534f34c..93ba7ba04a4 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 @@ -223,9 +223,7 @@ export default class RuleDetailsMeta extends React.PureComponent { return (
  • -
    - {engine} -
    +
    {engine}
  • ); 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 d0de08cf387..ed9ef894352 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 @@ -265,7 +265,7 @@ exports[`should display right meta info 3`] = ` className="coding-rules-detail-property" >
    xoo
    diff --git a/server/sonar-web/src/main/js/apps/issues/components/App.tsx b/server/sonar-web/src/main/js/apps/issues/components/App.tsx index c1e1f55da27..9a0067deecf 100644 --- a/server/sonar-web/src/main/js/apps/issues/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/issues/components/App.tsx @@ -888,7 +888,7 @@ export class App extends React.PureComponent {
    - + {translate('metric.bugs.name')}
    @@ -62,7 +62,7 @@ export default function ProjectCardLeakMeasures({ measures }: Props) {
    - + {translate('metric.vulnerabilities.name')}
    @@ -80,7 +80,7 @@ export default function ProjectCardLeakMeasures({ measures }: Props) {
    - + {translate('metric.code_smells.name')}
    diff --git a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverallMeasures.tsx b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverallMeasures.tsx index 821257cb266..4ca5a6793a4 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverallMeasures.tsx +++ b/server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverallMeasures.tsx @@ -57,7 +57,7 @@ export default function ProjectCardOverallMeasures({ measures }: Props) {
    - + {translate('metric.bugs.name')}
    @@ -75,7 +75,7 @@ export default function ProjectCardOverallMeasures({ measures }: Props) {
    - + {translate('metric.vulnerabilities.name')}
    @@ -93,7 +93,7 @@ export default function ProjectCardOverallMeasures({ measures }: Props) {
    - + {translate('metric.code_smells.name')}
    diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeakMeasures-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeakMeasures-test.tsx.snap index 0e9a63970dc..54931f05b55 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeakMeasures-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeakMeasures-test.tsx.snap @@ -28,7 +28,7 @@ exports[`should render correctly with all data 1`] = ` className="project-card-measure-label-with-icon" > metric.bugs.name @@ -58,7 +58,7 @@ exports[`should render correctly with all data 1`] = ` className="project-card-measure-label-with-icon" > metric.vulnerabilities.name @@ -88,7 +88,7 @@ exports[`should render correctly with all data 1`] = ` className="project-card-measure-label-with-icon" > metric.code_smells.name @@ -194,7 +194,7 @@ exports[`should render no data style new coverage, new duplications and new line className="project-card-measure-label-with-icon" > metric.bugs.name @@ -224,7 +224,7 @@ exports[`should render no data style new coverage, new duplications and new line className="project-card-measure-label-with-icon" > metric.vulnerabilities.name @@ -254,7 +254,7 @@ exports[`should render no data style new coverage, new duplications and new line className="project-card-measure-label-with-icon" > metric.code_smells.name diff --git a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardOverallMeasures-test.tsx.snap b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardOverallMeasures-test.tsx.snap index e7f739d048a..43bad2938ca 100644 --- a/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardOverallMeasures-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardOverallMeasures-test.tsx.snap @@ -78,7 +78,7 @@ exports[`should render correctly with all data 1`] = ` className="project-card-measure-label-with-icon" > metric.bugs.name @@ -108,7 +108,7 @@ exports[`should render correctly with all data 1`] = ` className="project-card-measure-label-with-icon" > metric.vulnerabilities.name @@ -138,7 +138,7 @@ exports[`should render correctly with all data 1`] = ` className="project-card-measure-label-with-icon" > metric.code_smells.name diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx index 7d740bb554c..79777eecee4 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx @@ -33,7 +33,7 @@ export default class ChangelogSearch extends React.PureComponent { return (
    -
    diff --git a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/__snapshots__/ChangelogSearch-test.tsx.snap b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/__snapshots__/ChangelogSearch-test.tsx.snap index 7a22927456b..457151fcb76 100644 --- a/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/__snapshots__/ChangelogSearch-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/__snapshots__/ChangelogSearch-test.tsx.snap @@ -15,7 +15,7 @@ exports[`should render 1`] = ` } /> {this.props.engine && ( -
    +
    {this.props.engine}
    )} {this.props.manualVulnerability && ( -
    +
    {translate('issue.manual_vulnerability')}
    diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.tsx.snap b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.tsx.snap index e358fb0ed68..74d242cefac 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.tsx.snap @@ -11,7 +11,7 @@ exports[`should render with the message and a link to open the rule 1`] = `