Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix overflow problem on secret rotation modal

adilson5c672d88a181
diff --git a/frontend/src/components/secret-rotations-v2/CreateSecretRotationV2Modal.tsx b/frontend/src/components/secret-rotations-v2/CreateSecretRotationV2Modal.tsx
index ceafc951ab..0b1f7e8090 100644
--- a/frontend/src/components/secret-rotations-v2/CreateSecretRotationV2Modal.tsx
+++ b/frontend/src/components/secret-rotations-v2/CreateSecretRotationV2Modal.tsx
@@ -124,7 +124,7 @@ export const CreateSecretRotationV2Modal = ({ onOpenChange, isOpen, ...props }:
subTitle={
selectedRotation ? undefined : "Select a provider to create a secret rotation for."
}
- bodyClassName="overflow-visible"
+ bodyClassName="overflow-x-hidden"
>
<Content
onComplete={() => {
diff --git a/frontend/src/components/secret-rotations-v2/EditSecretRotationV2Modal.tsx b/frontend/src/components/secret-rotations-v2/EditSecretRotationV2Modal.tsx
index e9efc27f2e..010fef1de2 100644
--- a/frontend/src/components/secret-rotations-v2/EditSecretRotationV2Modal.tsx
+++ b/frontend/src/components/secret-rotations-v2/EditSecretRotationV2Modal.tsx
@@ -18,7 +18,7 @@ export const EditSecretRotationV2Modal = ({ secretRotation, onOpenChange, ...pro
<ModalContent
title={<SecretRotationV2ModalHeader isConfigured type={secretRotation.type} />}
className="max-w-2xl"
- bodyClassName="overflow-visible"
+ bodyClassName="overflow-x-visible"
>
<SecretRotationV2Form
onComplete={() => onOpenChange(false)}
diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2Form.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2Form.tsx
index c11b448dae..b491b62e9c 100644
--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2Form.tsx
+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2Form.tsx
@@ -2,8 +2,6 @@ import { useState } from "react";
import { FormProvider, useForm } from "react-hook-form";
import { Tab } from "@headlessui/react";
import { zodResolver } from "@hookform/resolvers/zod";
-import { twMerge } from "tailwind-merge";
-
import { createNotification } from "@app/components/notifications";
import { SecretRotationV2ConfigurationFields } from "@app/components/secret-rotations-v2/forms/SecretRotationV2ConfigurationFields";
import { SecretRotationV2DetailsFields } from "@app/components/secret-rotations-v2/forms/SecretRotationV2DetailsFields";
@@ -167,53 +165,55 @@ export const SecretRotationV2Form = ({
};
return (
- <form className={twMerge(isFinalStep && "max-h-[70vh] overflow-y-auto")}>
- <FormProvider {...formMethods}>
- <Tab.Group selectedIndex={selectedTabIndex} onChange={setSelectedTabIndex}>
- <Tab.List className="-pb-1 mb-6 w-full border-b-2 border-mineshaft-600">
- {FORM_TABS.map((tab, index) => (
- <Tab
- onClick={async (e) => {
- e.preventDefault();
- const isEnabled = await isTabEnabled(index);
- setSelectedTabIndex((prev) => (isEnabled ? index : prev));
- }}
- className={({ selected }) =>
- `-mb-[0.14rem] whitespace-nowrap ${index > selectedTabIndex ? "opacity-30" : ""} px-4 py-2 text-sm font-medium outline-hidden disabled:opacity-60 ${
- selected
- ? "border-b-2 border-mineshaft-300 text-mineshaft-200"
- : "text-bunker-300"
- }`
- }
- key={tab.key}
- >
- {index + 1}. {tab.name}
- </Tab>
- ))}
- </Tab.List>
- <Tab.Panels>
- <Tab.Panel>
- <SecretRotationV2ConfigurationFields
- isUpdate={Boolean(secretRotation)}
- environments={environments}
- />
- </Tab.Panel>
- <Tab.Panel>
- <SecretRotationV2ParametersFields />
- </Tab.Panel>
- <Tab.Panel>
- <SecretRotationV2SecretsMappingFields />
- </Tab.Panel>
- <Tab.Panel>
- <SecretRotationV2DetailsFields />
- </Tab.Panel>
- <Tab.Panel>
- <SecretRotationV2ReviewFields />
- </Tab.Panel>
- </Tab.Panels>
- </Tab.Group>
- </FormProvider>
- <div className="flex w-full flex-row-reverse justify-between gap-4 pt-4">
+ <form className="flex max-h-[70vh] flex-col">
+ <div className="min-h-0 flex-1 overflow-y-auto">
+ <FormProvider {...formMethods}>
+ <Tab.Group selectedIndex={selectedTabIndex} onChange={setSelectedTabIndex}>
+ <Tab.List className="-pb-1 mb-6 w-full border-b-2 border-mineshaft-600">
+ {FORM_TABS.map((tab, index) => (
+ <Tab
+ onClick={async (e) => {
+ e.preventDefault();
+ const isEnabled = await isTabEnabled(index);
+ setSelectedTabIndex((prev) => (isEnabled ? index : prev));
+ }}
+ className={({ selected }) =>
+ `-mb-[0.14rem] whitespace-nowrap ${index > selectedTabIndex ? "opacity-30" : ""} px-4 py-2 text-sm font-medium outline-hidden disabled:opacity-60 ${
+ selected
+ ? "border-b-2 border-mineshaft-300 text-mineshaft-200"
+ : "text-bunker-300"
+ }`
+ }
+ key={tab.key}
+ >
+ {index + 1}. {tab.name}
+ </Tab>
+ ))}
+ </Tab.List>
+ <Tab.Panels>
+ <Tab.Panel>
+ <SecretRotationV2ConfigurationFields
+ isUpdate={Boolean(secretRotation)}
+ environments={environments}
+ />
+ </Tab.Panel>
+ <Tab.Panel>
+ <SecretRotationV2ParametersFields />
+ </Tab.Panel>
+ <Tab.Panel>
+ <SecretRotationV2SecretsMappingFields />
+ </Tab.Panel>
+ <Tab.Panel>
+ <SecretRotationV2DetailsFields />
+ </Tab.Panel>
+ <Tab.Panel>
+ <SecretRotationV2ReviewFields />
+ </Tab.Panel>
+ </Tab.Panels>
+ </Tab.Group>
+ </FormProvider>
+ </div>
+ <div className="flex w-full flex-shrink-0 flex-row-reverse justify-between gap-4 pt-4">
<Button
onClick={handleNext}
isLoading={isSubmitting}
diff --git a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/shared/SqlCredentialsRotationParametersFields.tsx b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/shared/SqlCredentialsRotationParametersFields.tsx
index e5b8628462..aea5d0d5a1 100644
--- a/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/shared/SqlCredentialsRotationParametersFields.tsx
+++ b/frontend/src/components/secret-rotations-v2/forms/SecretRotationV2ParametersFields/shared/SqlCredentialsRotationParametersFields.tsx
@@ -77,7 +77,7 @@ export const SqlCredentialsRotationParametersFields = () => {
/>
<NoticeBannerV2 title="Example Create User Statement">
<p className="mb-3 text-sm text-mineshaft-300">
- Infisical requires two database users to be created for rotation.
+ Infisical requires two database users to be created for rotation. 111
</p>
<p className="mb-3 text-sm text-mineshaft-300">
These users are intended to be solely managed by Infisical. Altering their login after
@@ -87,11 +87,9 @@ export const SqlCredentialsRotationParametersFields = () => {
Below is an example statement for creating the required users. You may need to modify it
to suit your needs.
</p>
- <p className="mb-3 text-sm">
- <pre className="max-h-40 overflow-y-auto rounded-sm border border-mineshaft-700 bg-mineshaft-800 p-2 whitespace-pre-wrap text-mineshaft-300">
- {rotationOption!.template.createUserStatement}
- </pre>
- </p>
+ <pre className="mb-3 max-h-40 overflow-auto rounded-sm border border-mineshaft-700 bg-mineshaft-800 p-2 text-sm break-words whitespace-pre-wrap text-mineshaft-300">
+ {rotationOption!.template.createUserStatement}
+ </pre>
</NoticeBannerV2>
</TabPanel>
<TabPanel value={ParameterTab.Advanced}>
diff --git a/frontend/src/components/v2/NoticeBannerV2/NoticeBannerV2.tsx b/frontend/src/components/v2/NoticeBannerV2/NoticeBannerV2.tsx
index bde5853e55..87c8a48bfa 100644
--- a/frontend/src/components/v2/NoticeBannerV2/NoticeBannerV2.tsx
+++ b/frontend/src/components/v2/NoticeBannerV2/NoticeBannerV2.tsx
@@ -14,7 +14,7 @@ export const NoticeBannerV2 = ({ title, children, className, titleClassName }: P
return (
<div
className={twMerge(
- "flex flex-col rounded-r border-l-2 border-l-primary bg-mineshaft-300/5 px-4 py-2.5",
+ "flex min-w-0 flex-col rounded-r border-l-2 border-l-primary bg-mineshaft-300/5 px-4 py-2.5",
className
)}
>