]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-14728 Improve UX around scanner's download from an in-app tutorial
authorPhilippe Perrin <philippe.perrin@sonarsource.com>
Tue, 20 Apr 2021 16:46:48 +0000 (18:46 +0200)
committersonartech <sonartech@sonarsource.com>
Mon, 26 Apr 2021 20:03:35 +0000 (20:03 +0000)
server/sonar-web/src/main/js/components/tutorials/manual/commands/DotNetFramework.tsx
server/sonar-web/src/main/js/components/tutorials/manual/commands/DownloadScanner.tsx
server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/CLangGCCCommand-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DotNetFramework-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/DownloadScanner-test.tsx.snap
server/sonar-web/src/main/js/components/tutorials/manual/commands/__tests__/__snapshots__/Other-test.tsx.snap
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index af25c9819be4bba6f366a99c0fad72a818943748..0ead421f64b58645f9abddd059737ba72a43034e 100644 (file)
@@ -19,7 +19,6 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router';
 import { translate } from 'sonar-ui-common/helpers/l10n';
 import { DotNetProps } from './DotNet';
 import DotNetExecute from './DotNetExecute';
@@ -39,21 +38,23 @@ export default function DotNetFramework(props: DotNetProps) {
         <h4 className="spacer-bottom huge-spacer-top">
           {translate('onboarding.analysis.msbuild.header')}
         </h4>
-        <p className="spacer-bottom markdown">
+        <p className="markdown">
           <FormattedMessage
             defaultMessage={translate('onboarding.analysis.msbuild.text')}
             id="onboarding.analysis.msbuild.text"
-            values={{ code: <code>%PATH%</code> }}
+            values={{
+              code: <code>%PATH%</code>,
+              link: (
+                <a
+                  href="https://redirect.sonarsource.com/doc/download-scanner-msbuild.html"
+                  rel="noopener noreferrer"
+                  target="_blank">
+                  {translate('onboarding.analysis.msbuild.docs_link')}
+                </a>
+              )
+            }}
           />
         </p>
-        <p>
-          <Link
-            className="button"
-            to="/documentation/analysis/scan/sonarscanner-for-msbuild/"
-            target="_blank">
-            {translate('download_verb')}
-          </Link>
-        </p>
       </div>
 
       <DotNetExecute commands={commands} />
index 06bce10a1684362605324f938c9fc06933fc72c4..81ef04c99b750be304b4a9bd967e3497ad2d97e7 100644 (file)
@@ -19,7 +19,6 @@
  */
 import * as React from 'react';
 import { FormattedMessage } from 'react-intl';
-import { Link } from 'react-router';
 import { translate } from 'sonar-ui-common/helpers/l10n';
 import { OSs } from '../../types';
 
@@ -27,7 +26,7 @@ interface Props {
   os: OSs;
 }
 
-export default function SQScanner(props: Props) {
+export default function DownloadScanner(props: Props) {
   const { os } = props;
   return (
     <div>
@@ -38,15 +37,18 @@ export default function SQScanner(props: Props) {
           id="onboarding.analysis.sq_scanner.text"
           values={{
             dir: <code>bin</code>,
-            env_var: <code>{os === OSs.Windows ? '%PATH%' : 'PATH'}</code>
+            env_var: <code>{os === OSs.Windows ? '%PATH%' : 'PATH'}</code>,
+            link: (
+              <a
+                href="https://redirect.sonarsource.com/doc/download-scanner.html"
+                rel="noopener noreferrer"
+                target="_blank">
+                {translate('onboarding.analysis.sq_scanner.docs_link')}
+              </a>
+            )
           }}
         />
       </p>
-      <p>
-        <Link className="button" to="/documentation/analysis/scan/sonarscanner/" target="_blank">
-          {translate('download_verb')}
-        </Link>
-      </p>
     </div>
   );
 }
index a1bc4455cf1b0b096e4a2c240884fbce76d370e8..7539b8cf22dfdcdc23c47e98acbaccae58992d2d 100644 (file)
@@ -5,7 +5,7 @@ exports[`Shoud renders correctly 1`] = `
   <DownloadBuildWrapper
     os="linux"
   />
-  <SQScanner
+  <DownloadScanner
     os="linux"
   />
   <ExecBuildWrapper
index d52952a093e594f6d994f2516261b81a1b9cdff7..986272b490de02a36bd413918d90f1328936142a 100644 (file)
@@ -9,7 +9,7 @@ exports[`Should renders correctly 1`] = `
       onboarding.analysis.msbuild.header
     </h4>
     <p
-      className="spacer-bottom markdown"
+      className="markdown"
     >
       <FormattedMessage
         defaultMessage="onboarding.analysis.msbuild.text"
@@ -19,21 +19,17 @@ exports[`Should renders correctly 1`] = `
             "code": <code>
               %PATH%
             </code>,
+            "link": <a
+              href="https://redirect.sonarsource.com/doc/download-scanner-msbuild.html"
+              rel="noopener noreferrer"
+              target="_blank"
+            >
+              onboarding.analysis.msbuild.docs_link
+            </a>,
           }
         }
       />
     </p>
-    <p>
-      <Link
-        className="button"
-        onlyActiveOnIndex={false}
-        style={Object {}}
-        target="_blank"
-        to="/documentation/analysis/scan/sonarscanner-for-msbuild/"
-      >
-        download_verb
-      </Link>
-    </p>
   </div>
   <DotNetExecute
     commands={
index 5437c936d7279e49abcb786326c89ca4b73bab3f..6b24f51e05c7f1d91a2f54b0536fb2f700c3d886 100644 (file)
@@ -21,21 +21,17 @@ exports[`Shoud renders for "linux" correctly 1`] = `
           "env_var": <code>
             PATH
           </code>,
+          "link": <a
+            href="https://redirect.sonarsource.com/doc/download-scanner.html"
+            rel="noopener noreferrer"
+            target="_blank"
+          >
+            onboarding.analysis.sq_scanner.docs_link
+          </a>,
         }
       }
     />
   </p>
-  <p>
-    <Link
-      className="button"
-      onlyActiveOnIndex={false}
-      style={Object {}}
-      target="_blank"
-      to="/documentation/analysis/scan/sonarscanner/"
-    >
-      download_verb
-    </Link>
-  </p>
 </div>
 `;
 
@@ -60,21 +56,17 @@ exports[`Shoud renders for "mac" correctly 1`] = `
           "env_var": <code>
             PATH
           </code>,
+          "link": <a
+            href="https://redirect.sonarsource.com/doc/download-scanner.html"
+            rel="noopener noreferrer"
+            target="_blank"
+          >
+            onboarding.analysis.sq_scanner.docs_link
+          </a>,
         }
       }
     />
   </p>
-  <p>
-    <Link
-      className="button"
-      onlyActiveOnIndex={false}
-      style={Object {}}
-      target="_blank"
-      to="/documentation/analysis/scan/sonarscanner/"
-    >
-      download_verb
-    </Link>
-  </p>
 </div>
 `;
 
@@ -99,20 +91,16 @@ exports[`Shoud renders for "win" correctly 1`] = `
           "env_var": <code>
             %PATH%
           </code>,
+          "link": <a
+            href="https://redirect.sonarsource.com/doc/download-scanner.html"
+            rel="noopener noreferrer"
+            target="_blank"
+          >
+            onboarding.analysis.sq_scanner.docs_link
+          </a>,
         }
       }
     />
   </p>
-  <p>
-    <Link
-      className="button"
-      onlyActiveOnIndex={false}
-      style={Object {}}
-      target="_blank"
-      to="/documentation/analysis/scan/sonarscanner/"
-    >
-      download_verb
-    </Link>
-  </p>
 </div>
 `;
index c724f9f71617e39edd7c33a21d0b7221e2ba836e..9dd484cc5468a838c559a8fdc7e74e0094e00523 100644 (file)
@@ -3375,25 +3375,16 @@ onboarding.analysis.java.gradle.header.sonarcloud=Execute the Scanner for Gradle
 onboarding.analysis.java.gradle.text.1.sonarcloud=Declare the {plugin} plugin in your {file} file:
 onboarding.analysis.java.gradle.text.2.sonarcloud=and add the following lines to your {file} file:
 
-onboarding.analysis.msbuild.header=Download and unzip the Scanner for MSBuild
-onboarding.analysis.msbuild.text=And add the executable's directory to the {code} environment variable
+onboarding.analysis.msbuild.header=Download and unzip the Scanner for .NET
+onboarding.analysis.msbuild.text=Visit the {link} to download the latest version, and add the executable's directory to the {code} environment variable
 onboarding.analysis.msbuild.execute=Execute the Scanner for .NET from your computer
 onboarding.analysis.msbuild.execute.text=Running a {instance} analysis is straighforward. You just need to execute the following commands at the root of your solution.
 onboarding.analysis.msbuild.docs_link=official documentation of the Scanner for .NET
-onboarding.analysis.msbuild.header.sonarcloud=Download and unzip the Scanner for MSBuild
-onboarding.analysis.msbuild.text.sonarcloud=And add the executable's directory to the <code>%PATH%</code> environment variable
-onboarding.analysis.msbuild.execute.sonarcloud=Execute the Scanner for MSBuild from your computer
-onboarding.analysis.msbuild.execute.text.sonarcloud=Execute the following commands at the root of your solution.
 
 onboarding.analysis.sq_scanner.header.linux=Download and unzip the Scanner for Linux
 onboarding.analysis.sq_scanner.header.win=Download and unzip the Scanner for Windows
 onboarding.analysis.sq_scanner.header.mac=Download and unzip the Scanner for macOS
-onboarding.analysis.sq_scanner.text=And add the {dir} directory to the {env_var} environment variable
-onboarding.analysis.sq_scanner.text.linux=And add the <code>bin</code> directory to the <code>PATH</code> environment variable
-onboarding.analysis.sq_scanner.text.win=And add the <code>bin</code> directory to the <code>%PATH%</code> environment variable
-onboarding.analysis.sq_scanner.text.mac=And add the <code>bin</code> directory to the <code>PATH</code> environment variable
-onboarding.analysis.sq_scanner.text.ci=And add the <code>bin</code> directory to the <code>PATH</code> environment variable
-onboarding.analysis.sq_scanner.text.sonarcloud=Add the following lines to your {file} file:
+onboarding.analysis.sq_scanner.text=Visit the {link} to download the latest version, and add the {dir} directory to the {env_var} environment variable
 onboarding.analysis.sq_scanner.execute=Execute the Scanner from your computer
 onboarding.analysis.sq_scanner.execute.text=Running a {instance} analysis is straighforward. You just need to execute the following commands in your project's folder.
 onboarding.analysis.sq_scanner.execute.text.custom=Run the following commands in your project's folder.