From: Revanshu Paliwal Date: Mon, 14 Mar 2022 15:57:03 +0000 (+0100) Subject: SONAR-16095 correcting top alignment for why issue button X-Git-Tag: 9.4.0.54424~98 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4cd2466ed408d5664c88cc05ba6fd8a99f59d055;p=sonarqube.git SONAR-16095 correcting top alignment for why issue button --- diff --git a/server/sonar-web/src/main/js/components/issue/Issue.css b/server/sonar-web/src/main/js/components/issue/Issue.css index c80e5e125c5..672ec17f500 100644 --- a/server/sonar-web/src/main/js/components/issue/Issue.css +++ b/server/sonar-web/src/main/js/components/issue/Issue.css @@ -47,16 +47,17 @@ .issue-row { display: flex; margin-bottom: 5px; + align-items: flex-start; } .issue-row-meta { - flex-grow: 0; padding-right: 5px; white-space: nowrap; + margin-top: 2px; } .issue-message { - flex-grow: 1; + flex: 1; padding-left: var(--gridSize); padding-right: var(--gridSize); line-height: 18px; @@ -81,6 +82,7 @@ .issue-meta { line-height: 16px; font-size: var(--smallFontSize); + display: flex; } .issue-meta + .issue-meta { @@ -100,6 +102,7 @@ .issue-see-rule { border-bottom: none; font-size: var(--smallFontSize); + margin-top: 5px; } .issue-changelog { diff --git a/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx b/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx index ab6b244b800..dde2b281789 100644 --- a/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx +++ b/server/sonar-web/src/main/js/components/issue/components/IssueMessage.tsx @@ -51,30 +51,59 @@ export default function IssueMessage(props: IssueMessageProps) { const ruleEngine = engineName ? engineName : engine; return ( -
- {message} - {quickFixAvailable && ( - - SonarLint - - ) - }} - /> - } - mouseLeaveDelay={0.5}> - - - )} + <> +
+ {message} + {quickFixAvailable && ( + + SonarLint + + ) + }} + /> + } + mouseLeaveDelay={0.5}> + + + )} + {ruleStatus && (ruleStatus === RuleStatus.Deprecated || ruleStatus === RuleStatus.Removed) && ( + + + {translate('rules.status', ruleStatus)} + + + )} + {ruleEngine && ( + +
{ruleEngine}
+
+ )} + {manualVulnerability && ( + +
+ {translate('issue.manual_vulnerability')} +
+
+ )} +
{translate('issue.why_this_issue')} - {ruleStatus && (ruleStatus === RuleStatus.Deprecated || ruleStatus === RuleStatus.Removed) && ( - - - {translate('rules.status', ruleStatus)} - - - )} - {ruleEngine && ( - -
{ruleEngine}
-
- )} - {manualVulnerability && ( - -
- {translate('issue.manual_vulnerability')} -
-
- )} -
+ ); } diff --git a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.tsx.snap b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.tsx.snap index 47dd644ce43..dae61ae1c46 100644 --- a/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.tsx.snap +++ b/server/sonar-web/src/main/js/components/issue/components/__tests__/__snapshots__/IssueMessage-test.tsx.snap @@ -1,14 +1,16 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`should render correctly: default 1`] = ` -
- +
- Reduce the number of conditional operators (4) used in the expression - + + Reduce the number of conditional operators (4) used in the expression + +
issue.why_this_issue -
+ `; exports[`should render correctly: is deprecated rule 1`] = ` -
- +
- Reduce the number of conditional operators (4) used in the expression - + + Reduce the number of conditional operators (4) used in the expression + + + + rules.status.DEPRECATED + + +
issue.why_this_issue - - - rules.status.DEPRECATED - - -
+ `; exports[`should render correctly: is manual vulnerability 1`] = ` -
- +
- Reduce the number of conditional operators (4) used in the expression - + + Reduce the number of conditional operators (4) used in the expression + + +
+ issue.manual_vulnerability +
+
+
issue.why_this_issue - -
- issue.manual_vulnerability -
-
-
+ `; exports[`should render correctly: is removed rule 1`] = ` -
- +
- Reduce the number of conditional operators (4) used in the expression - + + Reduce the number of conditional operators (4) used in the expression + + + + rules.status.REMOVED + + +
issue.why_this_issue - - - rules.status.REMOVED - - -
+ `; exports[`should render correctly: with engine info 1`] = ` -
- +
- Reduce the number of conditional operators (4) used in the expression - + + Reduce the number of conditional operators (4) used in the expression + + +
+ js +
+
+
issue.why_this_issue - -
- js -
-
-
+ `; exports[`should render correctly: with engine name 1`] = ` -
- +
- Reduce the number of conditional operators (4) used in the expression - + + Reduce the number of conditional operators (4) used in the expression + + +
+ JS +
+
+
issue.why_this_issue - -
- JS -
-
-
+ `; exports[`should render correctly: with quick fix 1`] = ` -
- +
- Reduce the number of conditional operators (4) used in the expression - - - SonarLint - , + + Reduce the number of conditional operators (4) used in the expression + + + SonarLint + , + } } - } + /> + } + > + - } - > - - + +
issue.why_this_issue -
+ `;