]> source.dussan.org Git - sonarqube.git/commitdiff
New Code definition UX validation fixes (#8622)
authorAndrey Luiz <andrey.luiz@sonarsource.com>
Wed, 21 Jun 2023 12:17:48 +0000 (14:17 +0200)
committersonartech <sonartech@sonarsource.com>
Wed, 21 Jun 2023 20:03:06 +0000 (20:03 +0000)
server/sonar-web/src/main/js/apps/create/project/CreateProjectPage.tsx
server/sonar-web/src/main/js/apps/projectBaseline/styles.css
server/sonar-web/src/main/js/components/new-code-definition/GlobalNewCodeDefinitionDescription.tsx
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index 29f69c240c4c259469d2ad95fe3ce0c93cced437..7b2abaa73ddbb203b0197f76ce8f5a68a23df836 100644 (file)
@@ -329,7 +329,7 @@ export class CreateProjectPage extends React.PureComponent<CreateProjectPageProp
           onNcdChanged={this.handleNcdChanged}
         />
 
-        <div className="sw-flex sw-flex-row sw-gap-2 sw-mt-4">
+        <div className="sw-flex sw-flex-row sw-gap-4 sw-mt-4">
           <ButtonLink onClick={this.handleGoBack}>{translate('back')}</ButtonLink>
           <SubmitButton
             onClick={this.handleProjectCreation}
index 9967cf27b7f460b41083cdbe33fe54f539555988..5e09ae45cbc820f00c3d78832c10b53698c61d59 100644 (file)
   padding-top: 2px;
 }
 
-.project-baseline-selector .general-setting {
-  margin-left: 7px;
-}
-
 .branch-baseline-selector > hr {
   margin: 0 calc(-4 * var(--gridSize)) calc(4 * var(--gridSize));
 }
index 2751b7032578659a519fccbb73ac7c5238e41c9c..cf41e0236f64c5aa29dea807bc9d1ad773ea840a 100644 (file)
@@ -53,11 +53,14 @@ export default function GlobalNewCodeDefinitionDescription({
 
   return (
     <>
-      <div className="general-setting display-flex-start">
-        <span className="sw-font-bold flex-0">{setting}:&nbsp;</span>
-        <span>
-          {description} {useCase}
-        </span>
+      <div className="sw-flex sw-flex-col sw-gap-2 sw-max-w-[800px]">
+        <span className="sw-font-bold flex-0">{setting}</span>
+        {isGlobalNcdCompliant && (
+          <>
+            <span>{description}</span>
+            <span>{useCase}</span>
+          </>
+        )}
       </div>
       {!isGlobalNcdCompliant && (
         <Alert variant="warning" className="sw-mt-4 sw-max-w-[800px]">
index 0853667c3476c62665c93883aca496fe44807754..99d7d002a8a23cb0ce0ed5f869a5f56de94c5af6 100644 (file)
@@ -3757,8 +3757,8 @@ new_code_definition.global_setting=Use the global setting
 new_code_definition.specific_setting=Define a specific setting for this project
 
 new_code_definition.compliance.warning.title.global=Your global new code definition is not compliant with the Clean as You Code methodology
-new_code_definition.compliance.warning.explanation=Please ask an administrator to update the global new code definition before switching back to it.
-new_code_definition.compliance.warning.explanation.admin=Please update the global new code definition under {link} before switching back to it.
+new_code_definition.compliance.warning.explanation=Please ask an administrator to update the global new code definition before you can use it for your project.
+new_code_definition.compliance.warning.explanation.admin=Please update the global new code definition under {link} before you can use it for your project.
 new_code_definition.compliance.warning.explanation.action.admin.link=General Settings > New Code
 
 new_code_definition.previous_version=Previous version