]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-17816 Better wording
authorJeremy Davis <jeremy.davis@sonarsource.com>
Mon, 16 Jan 2023 14:17:42 +0000 (15:17 +0100)
committersonartech <sonartech@sonarsource.com>
Mon, 16 Jan 2023 20:03:43 +0000 (20:03 +0000)
server/sonar-web/src/main/js/apps/overview/branches/CleanAsYouCodeWarning.tsx
server/sonar-web/src/main/js/apps/overview/styles.css
sonar-core/src/main/resources/org/sonar/l10n/core.properties

index c3dca159e4bacc2bc136f481154110c83cd747ef..f41c9c11d422d16fb935f7d3151e2cb0b6c885ac 100644 (file)
@@ -32,25 +32,41 @@ interface Props {
 export default function CleanAsYouCodeWarning({ component }: Props) {
   return (
     <>
-      <Alert variant="warning">{translate('overview.quality_gate.conditions.cayc.warning')}</Alert>
-      <p className="big-spacer-top big-spacer-bottom">
+      <Alert variant="warning">
         {component.qualityGate ? (
           <FormattedMessage
-            id="overview.quality_gate.conditions.cayc.details"
-            defaultMessage={translate('overview.quality_gate.conditions.cayc.details')}
+            id="overview.quality_gate.conditions.cayc.warning"
+            defaultMessage={translate('overview.quality_gate.conditions.cayc.warning')}
             values={{
               link: (
-                <Link to={getQualityGateUrl(component.qualityGate.key)}>
-                  {translate('overview.quality_gate.conditions.cayc.details.link')}
-                </Link>
+                <div
+                  className="overview-quality-gate-alert-inline-link"
+                  title={component.qualityGate.name}
+                >
+                  <Link to={getQualityGateUrl(component.qualityGate.key)}>
+                    {component.qualityGate.name}
+                  </Link>
+                </div>
               ),
             }}
           />
         ) : (
-          translate('overview.quality_gate.conditions.cayc.details.no_link')
+          translate('overview.quality_gate.conditions.cayc.warning.no_link')
         )}
+      </Alert>
+
+      <p className="big-spacer-top big-spacer-bottom">
+        {translate('overview.quality_gate.conditions.cayc.details')}
       </p>
 
+      {component.qualityGate && (
+        <div className="big-spacer-bottom">
+          <Link className="button" to={getQualityGateUrl(component.qualityGate.key)}>
+            {translate('overview.quality_gate.conditions.cayc.review')}
+          </Link>
+        </div>
+      )}
+
       <Link
         target="_blank"
         to="https://docs.sonarqube.org/latest/user-guide/clean-as-you-code/#quality-gate"
index d06f711df3218d6a9a9ced1006949d4cf91eeac1..dbe0751d8ec888d79993dd32d6fad3e08a3e849c 100644 (file)
   font-size: var(--bigFontSize);
 }
 
+.overview-quality-gate-alert-inline-link {
+  display: inline-block;
+  max-width: 100%;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  padding-bottom: 1px;
+  margin-bottom: -5px;
+}
+
 /*
  * Animations
  */
index b4f051af2a08b31a1b4335b1caadde2c1bdf6e17..eda34a3b6602e63d62ca42a16ce2f72b7325d46b 100644 (file)
@@ -3259,10 +3259,10 @@ overview.you_should_define_quality_gate=You should define a quality gate on this
 overview.quality_gate.ignored_conditions=Some Quality Gate conditions on New Code were ignored because of the small number of New Lines
 overview.quality_gate.ignored_conditions.tooltip=At the start of a new code period, if very few lines have been added or modified, it might be difficult to reach the desired level of code coverage or duplications. To prevent Quality Gate failure when there's little that can be done about it, Quality Gate conditions about duplications in new code and coverage on new code are ignored until the number of new lines is at least 20. An administrator can disable this in the general settings.
 overview.quality_gate.conditions_on_new_code=Only conditions on new code that are defined in the Quality Gate are checked. See the {link} associated to the project for details.
-overview.quality_gate.conditions.cayc.warning=This Quality Gate does not comply with Clean as You Code
-overview.quality_gate.conditions.cayc.details.no_link=A Clean as You Code quality gate ensures that only Clean Code passes it.
-overview.quality_gate.conditions.cayc.details=A Clean as You Code quality gate ensures that only Clean Code passes it. {link} to view this project's quality gate.
-overview.quality_gate.conditions.cayc.details.link=Click here 
+overview.quality_gate.conditions.cayc.warning=Quality gate {link} used by this project does not comply with Clean as You Code.
+overview.quality_gate.conditions.cayc.warning.no_link=The quality gate used by this project does not comply with Clean as You Code.
+overview.quality_gate.conditions.cayc.details=Fixing this quality gate will help you achieve a Clean Code state.
+overview.quality_gate.conditions.cayc.review=Review Quality Gate
 overview.quality_gate.conditions.cayc.link=Learn more: Clean as You Code
 overview.quality_gate.application.non_cayc.projects_x={0} project(s) in this application use a Quality Gate that does not comply with Clean as You Code
 overview.quality_gate.show_project_conditions_x=Show failed conditions for project {0}