]> source.dussan.org Git - sonarqube.git/commitdiff
Fix styling issue on some commands in the project creation tutorial
authorGrégoire Aubert <gregoire.aubert@sonarsource.com>
Wed, 17 Jan 2018 08:35:23 +0000 (09:35 +0100)
committerGrégoire Aubert <gregoire.aubert@sonarsource.com>
Thu, 25 Jan 2018 14:16:50 +0000 (15:16 +0100)
server/sonar-web/src/main/js/apps/tutorials/onboarding/commands/ClangGCC.js
server/sonar-web/src/main/js/apps/tutorials/onboarding/commands/Command.js
server/sonar-web/src/main/js/apps/tutorials/onboarding/commands/DotNet.js
server/sonar-web/src/main/js/apps/tutorials/onboarding/commands/Msvc.js
server/sonar-web/src/main/js/apps/tutorials/onboarding/commands/Other.js
server/sonar-web/src/main/js/apps/tutorials/onboarding/commands/__tests__/__snapshots__/ClangGCC-test.js.snap
server/sonar-web/src/main/js/apps/tutorials/onboarding/commands/__tests__/__snapshots__/DotNet-test.js.snap
server/sonar-web/src/main/js/apps/tutorials/onboarding/commands/__tests__/__snapshots__/Msvc-test.js.snap
server/sonar-web/src/main/js/apps/tutorials/onboarding/commands/__tests__/__snapshots__/Other-test.js.snap
server/sonar-web/src/main/js/apps/tutorials/onboarding/styles.css

index a7c32e421fcbb98fa216824863f455da8e19edfb..249c8cc297648c5065db3a82584473009496d197 100644 (file)
@@ -67,8 +67,8 @@ export default function ClangGCC(props /*: Props */) {
           __html: translate('onboarding.analysis.sq_scanner.execute.text')
         }}
       />
-      <Command command={command1} isWindows={props.os === 'win'} />
-      <Command command={command2} isWindows={props.os === 'win'} />
+      <Command command={command1} isOneLine={true} />
+      <Command command={command2} isOneLine={props.os === 'win'} />
       <p
         className="big-spacer-top markdown"
         dangerouslySetInnerHTML={{ __html: translate('onboarding.analysis.sq_scanner.docs') }}
index 23d728a407ede3fcd69d43837aaab2d25d501cda..ab46a73e512eefd9e8ce989537fafcd6c07d5835 100644 (file)
@@ -26,7 +26,7 @@ import { translate } from '../../../../helpers/l10n';
 /*::
 type Props = {
   command: string | Array<?string>,
-  isWindows?: boolean
+  isOneLine?: boolean
 };
 */
 
@@ -36,13 +36,13 @@ export default class Command extends React.PureComponent {
   /*:: props: Props; */
 
   render() {
-    const { command, isWindows } = this.props;
+    const { command, isOneLine } = this.props;
     const commandArray = Array.isArray(command) ? command.filter(line => line != null) : [command];
-    const finalCommand = isWindows ? commandArray.join(' ') : commandArray.join(s);
+    const finalCommand = isOneLine ? commandArray.join(' ') : commandArray.join(s);
 
     return (
       <div
-        className={classNames('onboarding-command', { 'onboarding-command-windows': isWindows })}>
+        className={classNames('onboarding-command', { 'onboarding-command-oneline': isOneLine })}>
         <pre>{finalCommand}</pre>
         <ClipboardButton copyValue={finalCommand} tooltipPlacement="top" />
       </div>
index 8e2832d1bdd6fd08f841fb1e44ef4badd495079a..493eb4f690b2536daf4707cc6de1978551b6d722 100644 (file)
@@ -58,9 +58,9 @@ export default function DotNet(props /*: Props */) {
           __html: translate('onboarding.analysis.msbuild.execute.text')
         }}
       />
-      <Command command={command1} isWindows={true} />
-      <Command command={command2} isWindows={true} />
-      <Command command={command3} isWindows={true} />
+      <Command command={command1} isOneLine={true} />
+      <Command command={command2} isOneLine={true} />
+      <Command command={command3} isOneLine={true} />
       <p
         className="big-spacer-top markdown"
         dangerouslySetInnerHTML={{ __html: translate('onboarding.analysis.msbuild.docs') }}
index 3dca446d7d4a07bc68f491b5c3a96dd0a6419de0..c8fc810659573b7a1545a9ed7f8176b10523a4ff 100644 (file)
@@ -61,9 +61,9 @@ export default function Msvc(props /*: Props */) {
           __html: translate('onboarding.analysis.msbuild.execute.text')
         }}
       />
-      <Command command={command1} isWindows={true} />
-      <Command command={command2} isWindows={true} />
-      <Command command={command3} isWindows={true} />
+      <Command command={command1} isOneLine={true} />
+      <Command command={command2} isOneLine={true} />
+      <Command command={command3} isOneLine={true} />
       <p
         className="big-spacer-top markdown"
         dangerouslySetInnerHTML={{ __html: translate('onboarding.analysis.msbuild.docs') }}
index 42558d54eeff68c2e24408e9e9b43cff7034d3a4..2698d23cd097cefb2ef4db66632eb8b92b0f15ec 100644 (file)
@@ -56,7 +56,7 @@ export default function Other(props /*: Props */) {
           __html: translate('onboarding.analysis.sq_scanner.execute.text')
         }}
       />
-      <Command command={command} isWindows={props.os === 'win'} />
+      <Command command={command} isOneLine={props.os === 'win'} />
       <p
         className="big-spacer-top markdown"
         dangerouslySetInnerHTML={{ __html: translate('onboarding.analysis.sq_scanner.docs') }}
index c462b767acf3084289042e99c01387a1b05ec0d7..42680367bee27291a0406856d33b701aff697064 100644 (file)
@@ -24,7 +24,7 @@ exports[`renders correctly 1`] = `
   />
   <Command
     command="build-wrapper-win-x86-64.exe --out-dir bw-output make clean all"
-    isWindows={true}
+    isOneLine={true}
   />
   <Command
     command={
@@ -38,7 +38,7 @@ exports[`renders correctly 1`] = `
         "-Dsonar.login=token",
       ]
     }
-    isWindows={true}
+    isOneLine={true}
   />
   <p
     className="big-spacer-top markdown"
@@ -75,7 +75,7 @@ exports[`renders correctly 2`] = `
   />
   <Command
     command="build-wrapper-linux-x86-64 --out-dir bw-output make clean all"
-    isWindows={false}
+    isOneLine={true}
   />
   <Command
     command={
@@ -89,7 +89,7 @@ exports[`renders correctly 2`] = `
         "-Dsonar.login=token",
       ]
     }
-    isWindows={false}
+    isOneLine={false}
   />
   <p
     className="big-spacer-top markdown"
@@ -126,7 +126,7 @@ exports[`renders correctly 3`] = `
   />
   <Command
     command="build-wrapper-linux-x86-64 --out-dir bw-output make clean all"
-    isWindows={false}
+    isOneLine={true}
   />
   <Command
     command={
@@ -140,7 +140,7 @@ exports[`renders correctly 3`] = `
         "-Dsonar.login=token",
       ]
     }
-    isWindows={false}
+    isOneLine={false}
   />
   <p
     className="big-spacer-top markdown"
index b82b31b3cc1774c6487aa6e9e5f7ae8ce946f346..56d2150cae2ffeae8036828f7be52c684b71547b 100644 (file)
@@ -26,11 +26,11 @@ exports[`renders correctly 1`] = `
         "/d:sonar.login=\\"token\\"",
       ]
     }
-    isWindows={true}
+    isOneLine={true}
   />
   <Command
     command="MsBuild.exe /t:Rebuild"
-    isWindows={true}
+    isOneLine={true}
   />
   <Command
     command={
@@ -39,7 +39,7 @@ exports[`renders correctly 1`] = `
         "/d:sonar.login=\\"token\\"",
       ]
     }
-    isWindows={true}
+    isOneLine={true}
   />
   <p
     className="big-spacer-top markdown"
@@ -78,11 +78,11 @@ exports[`renders correctly 2`] = `
         "/d:sonar.login=\\"token\\"",
       ]
     }
-    isWindows={true}
+    isOneLine={true}
   />
   <Command
     command="MsBuild.exe /t:Rebuild"
-    isWindows={true}
+    isOneLine={true}
   />
   <Command
     command={
@@ -91,7 +91,7 @@ exports[`renders correctly 2`] = `
         "/d:sonar.login=\\"token\\"",
       ]
     }
-    isWindows={true}
+    isOneLine={true}
   />
   <p
     className="big-spacer-top markdown"
index e27a0b48d83fe93ab9cbe35dc0856840a680045b..c5260a8f2e7ac04e6da4aaf71985497c5a2bd06b 100644 (file)
@@ -31,11 +31,11 @@ exports[`renders correctly 1`] = `
         "/d:sonar.login=\\"token\\"",
       ]
     }
-    isWindows={true}
+    isOneLine={true}
   />
   <Command
     command="build-wrapper-win-x86-64.exe --out-dir bw-output MsBuild.exe /t:Rebuild"
-    isWindows={true}
+    isOneLine={true}
   />
   <Command
     command={
@@ -44,7 +44,7 @@ exports[`renders correctly 1`] = `
         "/d:sonar.login=\\"token\\"",
       ]
     }
-    isWindows={true}
+    isOneLine={true}
   />
   <p
     className="big-spacer-top markdown"
@@ -88,11 +88,11 @@ exports[`renders correctly 2`] = `
         "/d:sonar.login=\\"token\\"",
       ]
     }
-    isWindows={true}
+    isOneLine={true}
   />
   <Command
     command="build-wrapper-win-x86-64.exe --out-dir bw-output MsBuild.exe /t:Rebuild"
-    isWindows={true}
+    isOneLine={true}
   />
   <Command
     command={
@@ -101,7 +101,7 @@ exports[`renders correctly 2`] = `
         "/d:sonar.login=\\"token\\"",
       ]
     }
-    isWindows={true}
+    isOneLine={true}
   />
   <p
     className="big-spacer-top markdown"
index 060600bb1bc1d559f1fd93f10be9fb60d4ef059c..ba21667f2f5ddac5bd1608b861e4cb7f2b5f1f20 100644 (file)
@@ -29,7 +29,7 @@ exports[`renders correctly 1`] = `
         "-Dsonar.login=token",
       ]
     }
-    isWindows={true}
+    isOneLine={true}
   />
   <p
     className="big-spacer-top markdown"
@@ -71,7 +71,7 @@ exports[`renders correctly 2`] = `
         "-Dsonar.login=token",
       ]
     }
-    isWindows={false}
+    isOneLine={false}
   />
   <p
     className="big-spacer-top markdown"
@@ -113,7 +113,7 @@ exports[`renders correctly 3`] = `
         "-Dsonar.login=token",
       ]
     }
-    isWindows={false}
+    isOneLine={false}
   />
   <p
     className="big-spacer-top markdown"
index c4b04edf2decf9c842bd0636b501df29ae8fb050..d5e4ba2fcb9b7ec00bd0501ea2707b0eee12e2cf 100644 (file)
   color: #404040;
 }
 
-.onboarding-command-windows pre {
+.onboarding-command-oneline pre {
   padding-bottom: 40px;
 }
 
-.onboarding-command-windows button {
+.onboarding-command-oneline button {
   top: auto;
   top: 40px;
 }