]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-11067 Align status dots in Branches Admin page
authorStas Vilchik <stas.vilchik@sonarsource.com>
Wed, 5 Dec 2018 15:29:20 +0000 (16:29 +0100)
committerSonarTech <sonartech@sonarsource.com>
Fri, 7 Dec 2018 19:21:03 +0000 (20:21 +0100)
server/sonar-web/src/main/js/apps/projectBranches/components/App.tsx
server/sonar-web/src/main/js/apps/projectBranches/components/BranchRow.tsx
server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/App-test.tsx.snap
server/sonar-web/src/main/js/apps/projectBranches/components/__tests__/__snapshots__/BranchRow-test.tsx.snap
server/sonar-web/src/main/js/components/common/BranchStatus.tsx

index dab6b18c8c83489843eabb9b73f24f6bf3f23b10..71f2cefde72d2e912b52d93ababc81229b55886a 100644 (file)
@@ -136,7 +136,7 @@ export default class App extends React.PureComponent<Props, State> {
             <thead>
               <tr>
                 <th>{translate('branch')}</th>
-                <th className="thin nowrap text-right">{translate('status')}</th>
+                <th className="thin nowrap">{translate('status')}</th>
                 <th className="thin nowrap text-right big-spacer-left">
                   {translate('branches.last_analysis_date')}
                 </th>
index 26b5bb56027fd3f871ece29face59f95c69c7787..fe4cbdc7d6ad6c6ef85647f521e0b4460c94e1b7 100644 (file)
@@ -172,8 +172,8 @@ export default class BranchRow extends React.PureComponent<Props, State> {
             <div className="outline-badge spacer-left">{translate('branches.main_branch')}</div>
           )}
         </td>
-        <td className="thin nowrap text-right">
-          <BranchStatus branchLike={branchLike} helpTooltipClassName="table-cell-doc" />
+        <td className="thin nowrap">
+          <BranchStatus branchLike={branchLike} />
         </td>
         <td className="thin nowrap text-right big-spacer-left">
           {branchLike.analysisDate && <DateFromNow date={branchLike.analysisDate} />}
index 5ee7c0a0b0387e842596f76a72c634bc6ee793ea..c706d117447405264e0d3802b71a7c2944e26a62 100644 (file)
@@ -62,7 +62,7 @@ exports[`renders sorted list of branches 1`] = `
             branch
           </th>
           <th
-            className="thin nowrap text-right"
+            className="thin nowrap"
           >
             status
           </th>
index c3f9bb716f977aca9670ae63402d8fdf7f7e112a..cc9f9c8b924fbc0f3ea25a5abf9a2f689c7c78cf 100644 (file)
@@ -20,7 +20,7 @@ exports[`renders main branch 1`] = `
     </div>
   </td>
   <td
-    className="thin nowrap text-right"
+    className="thin nowrap"
   >
     <BranchStatus
       branchLike={
@@ -29,7 +29,6 @@ exports[`renders main branch 1`] = `
           "name": "master",
         }
       }
-      helpTooltipClassName="table-cell-doc"
     />
   </td>
   <td
@@ -69,7 +68,7 @@ exports[`renders pull request 1`] = `
     1234 – Feature PR
   </td>
   <td
-    className="thin nowrap text-right"
+    className="thin nowrap"
   >
     <BranchStatus
       branchLike={
@@ -80,7 +79,6 @@ exports[`renders pull request 1`] = `
           "title": "Feature PR",
         }
       }
-      helpTooltipClassName="table-cell-doc"
     />
   </td>
   <td
@@ -122,7 +120,7 @@ exports[`renders short-living branch 1`] = `
     feature
   </td>
   <td
-    className="thin nowrap text-right"
+    className="thin nowrap"
   >
     <BranchStatus
       branchLike={
@@ -134,7 +132,6 @@ exports[`renders short-living branch 1`] = `
           "type": "SHORT",
         }
       }
-      helpTooltipClassName="table-cell-doc"
     />
   </td>
   <td
index e1ede2a2a97e5528d149faf405563aba23549c38..fa00986f0283022db8b66529659799848eb7b7d6 100644 (file)
@@ -18,7 +18,6 @@
  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  */
 import * as React from 'react';
-import * as classNames from 'classnames';
 import StatusIndicator from './StatusIndicator';
 import Level from '../ui/Level';
 import BugIcon from '../icons-components/BugIcon';
@@ -40,10 +39,9 @@ import './BranchStatus.css';
 interface Props {
   branchLike: T.BranchLike;
   concise?: boolean;
-  helpTooltipClassName?: string;
 }
 
-export default function BranchStatus({ branchLike, concise = false, helpTooltipClassName }: Props) {
+export default function BranchStatus({ branchLike, concise = false }: Props) {
   if (isShortLivingBranch(branchLike) || isPullRequest(branchLike)) {
     if (!branchLike.status) {
       return null;
@@ -89,7 +87,7 @@ export default function BranchStatus({ branchLike, concise = false, helpTooltipC
         </li>
         {shouldDisplayHelper && (
           <HelpTooltip
-            className={classNames('spacer-left', helpTooltipClassName)}
+            className="spacer-left"
             overlay={translateWithParameters(
               'branches.short_lived.quality_gate.description',
               totalIssues