]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-21104 Allow scrolling for rule activation modal
authorJeremy Davis <jeremy.davis@sonarsource.com>
Tue, 5 Dec 2023 15:00:56 +0000 (16:00 +0100)
committersonartech <sonartech@sonarsource.com>
Wed, 6 Dec 2023 20:02:46 +0000 (20:02 +0000)
server/sonar-web/src/main/js/apps/coding-rules/components/ActivationFormModal.tsx

index 01771fdf72ac28c06e9725738ba395ad8062c4fe..048795a0195367fb4dd3c89a28c710443e844a48 100644 (file)
@@ -92,12 +92,15 @@ export default function ActivationFormModal(props: Readonly<Props>) {
     setParams({ ...params, [name]: value });
   };
 
+  const makeScrollable = (rule.params?.length ?? 0) > 1;
+
   return (
     <Modal
       headerTitle={modalHeader}
       onClose={props.onClose}
       loading={submitting}
-      isOverflowVisible
+      isOverflowVisible={!makeScrollable}
+      isScrollable={makeScrollable}
       primaryButton={
         <ButtonPrimary disabled={submitting || activeInAllProfiles} form={FORM_ID} type="submit">
           {isUpdateMode ? translate('save') : translate('coding_rules.activate')}
@@ -105,7 +108,7 @@ export default function ActivationFormModal(props: Readonly<Props>) {
       }
       secondaryButtonLabel={translate('cancel')}
       body={
-        <form id={FORM_ID} onSubmit={handleFormSubmit}>
+        <form className="sw-pb-10" id={FORM_ID} onSubmit={handleFormSubmit}>
           {!isUpdateMode && activeInAllProfiles && (
             <FlagMessage className="sw-mb-2" variant="info">
               {translate('coding_rules.active_in_all_profiles')}