Skip to content

Commit

Permalink
fix: showing description on intermediate page & visual 0 height bug f…
Browse files Browse the repository at this point in the history
…or extra fields
  • Loading branch information
alashchev17 committed Dec 10, 2024
1 parent 19e26a7 commit 76b3b95
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { toPascalCase } from "../../../utils/toPascalCase";
import { formatProjectName } from "../../../utils/formatProjectName";
import { CustomInputField } from "../CustomFieldsAndWidgets";
import { Link } from "../../Link";
import { useGetIntegrationDataByPathQuery } from "../../../hooks/useGetIntegrationDataByPathQuery";

const validateSnakeCase = (value: string) => {
const snakeCaseRegex = /^[a-z]+(_[a-z]+)*$/;
Expand Down Expand Up @@ -60,6 +61,10 @@ export const IntermediateIntegration: FC<IntegrationCmdlineProps> = ({
const [commandName, setCommandName] = useState("");
const [errorMessage, setErrorMessage] = useState("");

const { integration: relatedIntegration } = useGetIntegrationDataByPathQuery(
integration.integr_config_path[0],
);

const handleCommandNameChange: ChangeEventHandler<HTMLInputElement> = (
event,
) => {
Expand Down Expand Up @@ -89,6 +94,11 @@ export const IntermediateIntegration: FC<IntegrationCmdlineProps> = ({
: toPascalCase(integrationType)}
</Flex>
</Heading>
{relatedIntegration.data?.integr_schema.description && (
<Text size="2" color="gray">
{relatedIntegration.data.integr_schema.description}
</Text>
)}
<Text size="2" color="gray">
Please, choose where you want to setup your integration
</Text>
Expand Down
4 changes: 2 additions & 2 deletions src/features/Integrations/renderIntegrationFormField.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,10 +91,10 @@ export const renderIntegrationFormField = ({
style={{
width: "100%",
opacity: isFieldVisible ? 1 : 0,
transform: isFieldVisible ? "translateY(0px)" : "translateY(-10px)",
height: isFieldVisible ? "auto" : 0,
visibility: isFieldVisible ? "visible" : "hidden",
transition: "opacity 0.3s ease-in-out, tranform 0.3s ease-in-out",
position: isFieldVisible ? "inherit" : "absolute",
transition: "opacity 0.3s ease-in-out",
}}
>
<DataList.Label>
Expand Down

0 comments on commit 76b3b95

Please sign in to comment.