Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(portal): show tooltip on sonata predefined mapping api use cases #308

Merged
merged 1 commit into from
Dec 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
import { useNewApiMappingStore } from "@/stores/newApiMapping.store";
import { EnumRightType } from "@/utils/types/common.type";
import { IRequestMapping } from "@/utils/types/component.type";
import { Flex, Tooltip } from "antd";
import { Flex } from "antd";
import clsx from "clsx";
import { isEqual, cloneDeep, set } from "lodash";
import { useMemo } from "react";
import { LocationSelector } from "../LocationSelector";
import styles from "./index.module.scss";
import { AutoGrowingInput } from "@/components/form";
import { Text } from "@/components/Text";

export function SourceInput({
item,
Expand Down Expand Up @@ -54,7 +55,12 @@ export function SourceInput({
/>
) : <div className={styles.bloater}></div>}

<Tooltip title={item.source}>
{!item.customizedField && (
<Text.LightMedium ellipsis
className={styles.requestMappingItemWrapper}
style={{ padding: 7 }}>{item.source}</Text.LightMedium>
)}
{item.customizedField && (
<AutoGrowingInput
data-testid="sourceInput"
variant="filled"
Expand Down Expand Up @@ -87,7 +93,7 @@ export function SourceInput({
}
}}
/>
</Tooltip>
)}
</Flex>
);
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import { useNewApiMappingStore } from "@/stores/newApiMapping.store";
import { EnumRightType } from "@/utils/types/common.type";
import { IResponseMapping } from "@/utils/types/component.type";
import { Flex, Tooltip } from "antd";
import { Flex } from "antd";
import { Text } from '@/components/Text'
import clsx from "clsx";
import { LocationSelector } from "../LocationSelector";
import styles from "./index.module.scss";
Expand Down Expand Up @@ -40,7 +41,12 @@ export function TargetInput({
/>
) : <div className={styles.bloater}></div>}

<Tooltip title={item?.target}>
{!item.customizedField && (
<Text.LightMedium ellipsis
className={styles.input}
style={{ padding: 7, minHeight: 36, borderRadius: 4, width: '100%' }}>{item.target}</Text.LightMedium>
)}
{item.customizedField && (
<AutoGrowingInput
data-testid="targetInput"
disabled={!item.customizedField}
Expand All @@ -61,7 +67,7 @@ export function TargetInput({
// setActiveSonataResponse(undefined);
}}
/>
</Tooltip>
)}
</Flex>
);
}
Loading