From: Philippe Perrin Date: Fri, 16 Apr 2021 12:48:03 +0000 (+0200) Subject: SONAR-12082 Fix broken layout on rules page X-Git-Tag: 8.9.0.43852~96 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=9e0d06262a0bb9bc262f228688c7989e92fea486;p=sonarqube.git SONAR-12082 Fix broken layout on rules page --- diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx index aa85dcf6644..4c4cd01d70e 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/App.tsx @@ -595,27 +595,29 @@ export class App extends React.PureComponent {
- {this.state.openRule ? ( - - - {this.state.usingPermalink - ? translate('coding_rules.see_all') - : translate('coding_rules.return_to_list')} - - ) : ( - this.renderBulkButton() - )} - {!this.state.usingPermalink && ( - - )} +
+ {this.state.openRule ? ( + + + {this.state.usingPermalink + ? translate('coding_rules.see_all') + : translate('coding_rules.return_to_list')} + + ) : ( + this.renderBulkButton() + )} + {!this.state.usingPermalink && ( + + )} +
diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx index d07f5e43566..a9bd55566d3 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/BulkChange.tsx @@ -100,7 +100,6 @@ export default class BulkChange extends React.PureComponent { return ( <> diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx b/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx index 4c4d8b9ed4d..c8b1ce624c0 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/PageActions.tsx @@ -33,7 +33,7 @@ export interface PageActionsProps { export default function PageActions(props: PageActionsProps) { return ( -
+
- + - + + selectedIndex={0} + /> +
@@ -315,10 +319,14 @@ exports[`should render correctly: loading 1`] = ` - +
+ +
@@ -447,28 +455,32 @@ exports[`should render correctly: open rule 1`] = ` - - - coding_rules.return_to_list - - + + coding_rules.return_to_list + + + selectedIndex={0} + /> + @@ -531,16 +543,20 @@ exports[`should render correctly: using permalink 1`] = ` - - - coding_rules.see_all - + + + coding_rules.see_all + + diff --git a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/BulkChange-test.tsx.snap b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/BulkChange-test.tsx.snap index 89150cbd13d..45021122b8d 100644 --- a/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/BulkChange-test.tsx.snap +++ b/server/sonar-web/src/main/js/apps/coding-rules/components/__tests__/__snapshots__/BulkChange-test.tsx.snap @@ -63,7 +63,6 @@ exports[`should not a disabled button when edition is not possible 1`] = ` exports[`should render correctly 1`] = `