]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-12040 Drop duplicated css classes
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Wed, 8 May 2019 14:48:36 +0000 (16:48 +0200)
committerSonarTech <sonartech@sonarsource.com>
Mon, 3 Jun 2019 18:21:18 +0000 (20:21 +0200)
23 files changed:
server/sonar-web/src/main/js/api/ce.ts
server/sonar-web/src/main/js/app/components/nav/component/ComponentNavBranch.tsx
server/sonar-web/src/main/js/app/components/notifications/NotificationsSidebar.tsx
server/sonar-web/src/main/js/app/styles/init/misc.css
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsMeta.tsx
server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/RuleDetailsMeta-test.tsx.snap
server/sonar-web/src/main/js/apps/issues/components/App.tsx
server/sonar-web/src/main/js/apps/projects/components/ProjectCardLeakMeasures.tsx
server/sonar-web/src/main/js/apps/projects/components/ProjectCardOverallMeasures.tsx
server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardLeakMeasures-test.tsx.snap
server/sonar-web/src/main/js/apps/projects/components/__tests__/__snapshots__/ProjectCardOverallMeasures-test.tsx.snap
server/sonar-web/src/main/js/apps/quality-profiles/changelog/ChangelogSearch.tsx
server/sonar-web/src/main/js/apps/quality-profiles/changelog/__tests__/__snapshots__/ChangelogSearch-test.tsx.snap
server/sonar-web/src/main/js/components/controls/ListFooter.tsx
server/sonar-web/src/main/js/components/docs/DocCollapsibleBlock.tsx
server/sonar-web/src/main/js/components/docs/DocLink.tsx
server/sonar-web/src/main/js/components/docs/DocTooltipLink.tsx
server/sonar-web/src/main/js/components/docs/__tests__/__snapshots__/DocCollapsibleBlock-test.tsx.snap
server/sonar-web/src/main/js/components/docs/__tests__/__snapshots__/DocLink-test.tsx.snap
server/sonar-web/src/main/js/components/docs/__tests__/__snapshots__/DocTooltipLink-test.tsx.snap
server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx
server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.tsx.snap
server/sonar-web/src/main/js/components/issue/popups/SetAssigneePopup.tsx

index 7d73d30fc777f8bd63974587ea2a6992e62b4e25..7fdee30f23575412d3e708dddc1362f74317586d 100644 (file)
@@ -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 });
index 3b6ffb947eb44187110ed431e3621f9062626c12..546558794e6bdd919697ae5919a66ba7f38adbcb 100644 (file)
@@ -156,7 +156,7 @@ export class ComponentNavBranch extends React.PureComponent<Props, State> {
           <span className="note">{displayName}</span>
           {configuration && configuration.showSettings && (
             <HelpTooltip className="spacer-left" overlay={this.renderOverlay()}>
-              <PlusCircleIcon className="vertical-middle" fill={theme.blue} size={12} />
+              <PlusCircleIcon className="text-middle" fill={theme.blue} size={12} />
             </HelpTooltip>
           )}
         </div>
index 660678a755278a88f032df2a343640b052605a95..7463fae9b799afa6a16f6e42f09de66dffde0ff9 100644 (file)
@@ -72,7 +72,7 @@ export default function NotificationsSidebar(props: Props) {
                 {translate('show_more')}
               </a>
               {loadingMore && (
-                <DeferredSpinner className="vertical-bottom spacer-left position-absolute" />
+                <DeferredSpinner className="text-bottom spacer-left position-absolute" />
               )}
             </div>
           </div>
index bae0eeefa7290b763c0074b08b273bc377b0eb2b..0e27826da62fc54c72cb8930f7cb1d15debd6efc 100644 (file)
  * 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;
index 4e9b534f34c79256faaf3f6a4b807d3d79d8c683..93ba7ba04a41517d30048cca9c2a2e7f3d645278 100644 (file)
@@ -223,9 +223,7 @@ export default class RuleDetailsMeta extends React.PureComponent<Props> {
     return (
       <Tooltip overlay={translateWithParameters('coding_rules.external_rule.engine', engine)}>
         <li className="coding-rules-detail-property">
-          <div className="outline-badge badge-tiny-height spacer-left vertical-text-top">
-            {engine}
-          </div>
+          <div className="outline-badge badge-tiny-height spacer-left text-text-top">{engine}</div>
         </li>
       </Tooltip>
     );
index d0de08cf38792d97d1510464c884cd4d12b94149..ed9ef8943529c36c54410209002702614dea3f79 100644 (file)
@@ -265,7 +265,7 @@ exports[`should display right meta info 3`] = `
         className="coding-rules-detail-property"
       >
         <div
-          className="outline-badge badge-tiny-height spacer-left vertical-text-top"
+          className="outline-badge badge-tiny-height spacer-left text-text-top"
         >
           xoo
         </div>
index c1e1f55da27ed0471aed673c09b9a2967ad4b1c2..9a0067deecf40511b3b09e9256111477488761de 100644 (file)
@@ -888,7 +888,7 @@ export class App extends React.PureComponent<Props, State> {
       <div className="pull-left">
         <Checkbox
           checked={isChecked}
-          className="spacer-right vertical-middle"
+          className="spacer-right text-middle"
           disabled={issues.length === 0}
           id="issues-selection"
           onCheck={this.handleCheckAll}
index 81fe78f56d6583f672c8029dd26558d23704fbdc..1d9875f043a27b54facbd61951d256484d79dfb3 100644 (file)
@@ -44,7 +44,7 @@ export default function ProjectCardLeakMeasures({ measures }: Props) {
             <Rating value={measures['new_reliability_rating']} />
           </div>
           <div className="project-card-measure-label-with-icon">
-            <BugIcon className="little-spacer-right vertical-bottom" />
+            <BugIcon className="little-spacer-right text-bottom" />
             {translate('metric.bugs.name')}
           </div>
         </div>
@@ -62,7 +62,7 @@ export default function ProjectCardLeakMeasures({ measures }: Props) {
             <Rating value={measures['new_security_rating']} />
           </div>
           <div className="project-card-measure-label-with-icon">
-            <VulnerabilityIcon className="little-spacer-right vertical-bottom" />
+            <VulnerabilityIcon className="little-spacer-right text-bottom" />
             {translate('metric.vulnerabilities.name')}
           </div>
         </div>
@@ -80,7 +80,7 @@ export default function ProjectCardLeakMeasures({ measures }: Props) {
             <Rating value={measures['new_maintainability_rating']} />
           </div>
           <div className="project-card-measure-label-with-icon">
-            <CodeSmellIcon className="little-spacer-right vertical-bottom" />
+            <CodeSmellIcon className="little-spacer-right text-bottom" />
             {translate('metric.code_smells.name')}
           </div>
         </div>
index 821257cb266bcc0573dddb5c9159ed9d2b5747b3..4ca5a6793a4b509f1922ae4f4fc975337577a9cd 100644 (file)
@@ -57,7 +57,7 @@ export default function ProjectCardOverallMeasures({ measures }: Props) {
             <Rating value={measures['reliability_rating']} />
           </div>
           <div className="project-card-measure-label-with-icon">
-            <BugIcon className="little-spacer-right vertical-bottom" />
+            <BugIcon className="little-spacer-right text-bottom" />
             {translate('metric.bugs.name')}
           </div>
         </div>
@@ -75,7 +75,7 @@ export default function ProjectCardOverallMeasures({ measures }: Props) {
             <Rating value={measures['security_rating']} />
           </div>
           <div className="project-card-measure-label-with-icon">
-            <VulnerabilityIcon className="little-spacer-right vertical-bottom" />
+            <VulnerabilityIcon className="little-spacer-right text-bottom" />
             {translate('metric.vulnerabilities.name')}
           </div>
         </div>
@@ -93,7 +93,7 @@ export default function ProjectCardOverallMeasures({ measures }: Props) {
             <Rating value={measures['sqale_rating']} />
           </div>
           <div className="project-card-measure-label-with-icon">
-            <CodeSmellIcon className="little-spacer-right vertical-bottom" />
+            <CodeSmellIcon className="little-spacer-right text-bottom" />
             {translate('metric.code_smells.name')}
           </div>
         </div>
index 0e9a63970dcb484ceff619c331dd07e7088be3c6..54931f05b55289fe1079bd2a4919fc257669032b 100644 (file)
@@ -28,7 +28,7 @@ exports[`should render correctly with all data 1`] = `
         className="project-card-measure-label-with-icon"
       >
         <BugIcon
-          className="little-spacer-right vertical-bottom"
+          className="little-spacer-right text-bottom"
         />
         metric.bugs.name
       </div>
@@ -58,7 +58,7 @@ exports[`should render correctly with all data 1`] = `
         className="project-card-measure-label-with-icon"
       >
         <VulnerabilityIcon
-          className="little-spacer-right vertical-bottom"
+          className="little-spacer-right text-bottom"
         />
         metric.vulnerabilities.name
       </div>
@@ -88,7 +88,7 @@ exports[`should render correctly with all data 1`] = `
         className="project-card-measure-label-with-icon"
       >
         <CodeSmellIcon
-          className="little-spacer-right vertical-bottom"
+          className="little-spacer-right text-bottom"
         />
         metric.code_smells.name
       </div>
@@ -194,7 +194,7 @@ exports[`should render no data style new coverage, new duplications and new line
         className="project-card-measure-label-with-icon"
       >
         <BugIcon
-          className="little-spacer-right vertical-bottom"
+          className="little-spacer-right text-bottom"
         />
         metric.bugs.name
       </div>
@@ -224,7 +224,7 @@ exports[`should render no data style new coverage, new duplications and new line
         className="project-card-measure-label-with-icon"
       >
         <VulnerabilityIcon
-          className="little-spacer-right vertical-bottom"
+          className="little-spacer-right text-bottom"
         />
         metric.vulnerabilities.name
       </div>
@@ -254,7 +254,7 @@ exports[`should render no data style new coverage, new duplications and new line
         className="project-card-measure-label-with-icon"
       >
         <CodeSmellIcon
-          className="little-spacer-right vertical-bottom"
+          className="little-spacer-right text-bottom"
         />
         metric.code_smells.name
       </div>
index e7f739d048aef8db03405afbd4a33d899ad6b001..43bad2938cab135a9dd8559c64183c027d89b729 100644 (file)
@@ -78,7 +78,7 @@ exports[`should render correctly with all data 1`] = `
         className="project-card-measure-label-with-icon"
       >
         <BugIcon
-          className="little-spacer-right vertical-bottom"
+          className="little-spacer-right text-bottom"
         />
         metric.bugs.name
       </div>
@@ -108,7 +108,7 @@ exports[`should render correctly with all data 1`] = `
         className="project-card-measure-label-with-icon"
       >
         <VulnerabilityIcon
-          className="little-spacer-right vertical-bottom"
+          className="little-spacer-right text-bottom"
         />
         metric.vulnerabilities.name
       </div>
@@ -138,7 +138,7 @@ exports[`should render correctly with all data 1`] = `
         className="project-card-measure-label-with-icon"
       >
         <CodeSmellIcon
-          className="little-spacer-right vertical-bottom"
+          className="little-spacer-right text-bottom"
         />
         metric.code_smells.name
       </div>
index 7d740bb554ce5aa6ea6f50f1b6579cc20c32bc10..79777eecee431d4e06eb48be71d7647d0d2f0719 100644 (file)
@@ -33,7 +33,7 @@ export default class ChangelogSearch extends React.PureComponent<Props> {
     return (
       <div className="display-inline-block" id="quality-profile-changelog-form">
         <DateRangeInput onChange={this.props.onDateRangeChange} value={this.props.dateRange} />
-        <Button className="spacer-left vertical-top" onClick={this.props.onReset}>
+        <Button className="spacer-left text-top" onClick={this.props.onReset}>
           {translate('reset_verb')}
         </Button>
       </div>
index 7a22927456bb5da5d99ddb4881967dbbc6f28133..457151fcb76891ebdc51a019dae44df996206d32 100644 (file)
@@ -15,7 +15,7 @@ exports[`should render 1`] = `
     }
   />
   <Button
-    className="spacer-left vertical-top"
+    className="spacer-left text-top"
     onClick={[MockFunction]}
   >
     reset_verb
index dd8b35599852f7790132a2c454806ac8d9a12ac9..9d0efcf94f3ea635f580d296fdd54e44d0c780dc 100644 (file)
@@ -61,9 +61,7 @@ export default function ListFooter({ ready = true, ...props }: Props) {
         formatMeasure(props.total, 'INT', null)
       )}
       {props.loadMore != null && hasMore ? loadMoreLink : null}
-      {props.loading && (
-        <DeferredSpinner className="vertical-bottom spacer-left position-absolute" />
-      )}
+      {props.loading && <DeferredSpinner className="text-bottom spacer-left position-absolute" />}
     </footer>
   );
 }
index 661b9c3bd2bf428dd8be4f0dbe095278035c52ff..c45eb7eb46a1feaf4a09986b0aaa4d729a3280ba 100644 (file)
@@ -41,7 +41,7 @@ export default class DocCollapsibleBlock extends React.PureComponent<{}, State>
         className="link-no-underline"
         href="#"
         onClick={this.handleClick}>
-        <OpenCloseIcon className="vertical-middle little-spacer-right" open={this.state.open} />
+        <OpenCloseIcon className="text-middle little-spacer-right" open={this.state.open} />
         {children.props ? children.props.children : children}
       </a>
     );
index e2f7198e8a9018f7bae50b32b5eee237d1630a31..7995cef2b36a82fde2c5786ccfe44000a8274901 100644 (file)
@@ -81,7 +81,7 @@ export class DocLink extends React.PureComponent<Props> {
           {children}
         </a>
         <DetachIcon
-          className="text-muted little-spacer-left little-spacer-right vertical-baseline"
+          className="text-muted little-spacer-left little-spacer-right text-baseline"
           size={12}
         />
       </>
index f2ebad3840f49ed05857be19bad05472320e43e9..10c32b3ed636a8b0c7d077c5581875d5a54ff6cf 100644 (file)
@@ -58,7 +58,7 @@ export default function DocTooltipLink({ children, customProps, href, ...other }
       <a href={href} rel="noopener noreferrer" target="_blank" {...other}>
         {children}
       </a>
-      <DetachIcon className="little-spacer-left little-spacer-right vertical-baseline" size={12} />
+      <DetachIcon className="little-spacer-left little-spacer-right text-baseline" size={12} />
     </>
   );
 }
index 67244fe808ab382bc5ca285ca9c4f19360d0bf47..11bc4d073e220bb4793a41a4c0b37841493478a4 100644 (file)
@@ -14,7 +14,7 @@ exports[`should render a collapsible block 1`] = `
     onClick={[Function]}
   >
     <OpenCloseIcon
-      className="vertical-middle little-spacer-right"
+      className="text-middle little-spacer-right"
       open={false}
     />
     Foo
@@ -34,7 +34,7 @@ exports[`should render a collapsible block 2`] = `
     onClick={[Function]}
   >
     <OpenCloseIcon
-      className="vertical-middle little-spacer-right"
+      className="text-middle little-spacer-right"
       open={true}
     />
     Foo
index 94a51e8b63b3aa2b83c6c6ad2cdc447e01ecc100..925637e493d858e13cb2ba643fc654bd535b59d5 100644 (file)
@@ -54,7 +54,7 @@ exports[`should render simple link 1`] = `
     link text
   </a>
   <DetachIcon
-    className="text-muted little-spacer-left little-spacer-right vertical-baseline"
+    className="text-muted little-spacer-left little-spacer-right text-baseline"
     size={12}
   />
 </Fragment>
index a934b2bd048ac97e1a0a22865da2fd88bc7b104f..be9b357e26146eccf7471d75d2a892c954d9b5d5 100644 (file)
@@ -28,7 +28,7 @@ exports[`should render simple link 1`] = `
     target="_blank"
   />
   <DetachIcon
-    className="little-spacer-left little-spacer-right vertical-baseline"
+    className="little-spacer-left little-spacer-right text-baseline"
     size={12}
   />
 </Fragment>
index b5e405385d2a4bcd94df1b843598a157d811abd0..96b00e2cf73ec0908550506413d4c6d5bf69b840 100644 (file)
@@ -46,21 +46,21 @@ export default class IssueMessage extends React.PureComponent<Props> {
         <span className="little-spacer-right">{this.props.message}</span>
         <Button
           aria-label={translate('issue.rule_details')}
-          className="button button-grey button-tiny spacer-right vertical-top"
+          className="button button-grey button-tiny spacer-right text-top"
           onClick={this.handleClick}>
           {translate('issue.see_rule')}
         </Button>
         {this.props.engine && (
           <Tooltip
             overlay={translateWithParameters('issue.from_external_rule_engine', this.props.engine)}>
-            <div className="outline-badge badge-tiny-height spacer-right vertical-top">
+            <div className="outline-badge badge-tiny-height spacer-right text-top">
               {this.props.engine}
             </div>
           </Tooltip>
         )}
         {this.props.manualVulnerability && (
           <Tooltip overlay={translate('issue.manual_vulnerability.description')}>
-            <div className="outline-badge badge-tiny-height spacer-right vertical-top">
+            <div className="outline-badge badge-tiny-height spacer-right text-top">
               {translate('issue.manual_vulnerability')}
             </div>
           </Tooltip>
index e358fb0ed68ad21758e33b5e19775316e1125926..74d242cefac67408553caefca030af05f31315a2 100644 (file)
@@ -11,7 +11,7 @@ exports[`should render with the message and a link to open the rule 1`] = `
   </span>
   <Button
     aria-label="issue.rule_details"
-    className="button button-grey button-tiny spacer-right vertical-top"
+    className="button button-grey button-tiny spacer-right text-top"
     onClick={[Function]}
   >
     issue.see_rule
index a1672fe2a83380b2f94d457e591d592a203dea1e..50b8f33b4113d7b570acf5d3a15d0bb543bcf737 100644 (file)
@@ -130,9 +130,7 @@ class SetAssigneePopup extends React.PureComponent<Props, State> {
                 {!!user.login && (
                   <Avatar className="spacer-right" hash={user.avatar} name={user.name} size={16} />
                 )}
-                <span
-                  className="vertical-middle"
-                  style={{ marginLeft: !user.login ? 24 : undefined }}>
+                <span className="text-middle" style={{ marginLeft: !user.login ? 24 : undefined }}>
                   {user.name}
                 </span>
               </SelectListItem>