]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-19628 Rules created from a template don't show their description in tab
authorstanislavh <stanislav.honcharov@sonarsource.com>
Thu, 23 Nov 2023 14:43:23 +0000 (15:43 +0100)
committersonartech <sonartech@sonarsource.com>
Fri, 24 Nov 2023 20:02:44 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/coding-rules/components/RuleDetailsDescription.tsx
server/sonar-web/src/main/js/components/rules/MoreInfoRuleDescription.tsx
server/sonar-web/src/main/js/components/rules/RuleTabViewer.tsx

index 57a2fa0360234b97a8cc4322212d61de3f2046b5..832d94bfbcc7f7d8a01e7e0c9c59b246d62a9cd0 100644 (file)
@@ -223,15 +223,6 @@ export default class RuleDetailsDescription extends React.PureComponent<Props, S
 
     return (
       <div className="js-rule-description">
-        {defaultSection && (
-          <CodeSyntaxHighlighter
-            className="coding-rules-detail-description markdown"
-            key={defaultSection.key}
-            htmlAsString={sanitizeString(defaultSection.content)}
-            language={ruleDetails.lang}
-          />
-        )}
-
         {hasDescriptionSection && !defaultSection && (
           <>
             {introductionSection && (
@@ -241,11 +232,11 @@ export default class RuleDetailsDescription extends React.PureComponent<Props, S
                 language={ruleDetails.lang}
               />
             )}
-
-            <RuleTabViewer ruleDetails={ruleDetails} />
           </>
         )}
 
+        <RuleTabViewer ruleDetails={ruleDetails} />
+
         {ruleDetails.isExternal && (
           <div className="coding-rules-detail-description rule-desc markdown">
             {translateWithParameters('issue.external_issue_description', ruleDetails.name)}
index 1b5f3e2521568ab7af7f866b48860b587c73c712..c27e5551f2c4ae8fc93c1001a6c1af55fbfaf73a 100644 (file)
@@ -61,7 +61,7 @@ export default class MoreInfoRuleDescription extends React.PureComponent<Props,
     } = this.props;
 
     return (
-      <div className="padded rule-desc">
+      <div className="sw-my-6 rule-desc">
         {displayEducationalPrinciplesNotification && (
           <Alert variant="info">
             <p className="little-spacer-bottom little-spacer-top">
index f8db72459ddb588e41582f8df9277443d4ed2bdc..abf0cfba14937536c4a0ada17ac15a4d7a388ff6 100644 (file)
@@ -331,7 +331,7 @@ export class RuleTabViewer extends React.PureComponent<RuleTabViewerProps, State
 
         <div
           aria-labelledby={getTabId(selectedTab.value)}
-          className="sw-flex sw-flex-col sw-py-6"
+          className="sw-flex sw-flex-col"
           id={getTabPanelId(selectedTab.value)}
           role="tabpanel"
         >