Skip to content

Commit 68e9499

Browse files
committed
1853 - add a Skeleton for properties that rely on a display condition
1 parent ad6c057 commit 68e9499

File tree

1 file changed

+12
-0
lines changed
  • client/src/pages/platform/workflow-editor/components/Properties

1 file changed

+12
-0
lines changed

client/src/pages/platform/workflow-editor/components/Properties/Property.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import {DEFAULT_SCHEMA} from '@/components/JsonSchemaBuilder/utils/constants';
22
import {SchemaRecordType} from '@/components/JsonSchemaBuilder/utils/types';
33
import RequiredMark from '@/components/RequiredMark';
44
import {Label} from '@/components/ui/label';
5+
import {Skeleton} from '@/components/ui/skeleton';
56
import {Tooltip, TooltipContent, TooltipTrigger} from '@/components/ui/tooltip';
67
import InputTypeSwitchButton from '@/pages/platform/workflow-editor/components/Properties/components/InputTypeSwitchButton';
78
import PropertyCodeEditor from '@/pages/platform/workflow-editor/components/Properties/components/PropertyCodeEditor/PropertyCodeEditor';
@@ -22,6 +23,7 @@ import deleteProperty from '@/pages/platform/workflow-editor/utils/deletePropert
2223
import getInputHTMLType from '@/pages/platform/workflow-editor/utils/getInputHTMLType';
2324
import saveProperty from '@/pages/platform/workflow-editor/utils/saveProperty';
2425
import {Option} from '@/shared/middleware/platform/configuration';
26+
import {useGetWorkflowNodeParameterDisplayConditionsQuery} from '@/shared/queries/platform/workflowNodeParameters.queries';
2527
import {ArrayPropertyType, PropertyAllType} from '@/shared/types';
2628
import {QuestionMarkCircledIcon} from '@radix-ui/react-icons';
2729
import {TooltipPortal} from '@radix-ui/react-tooltip';
@@ -738,6 +740,16 @@ const Property = ({
738740
return <></>;
739741
}
740742

743+
if (displayCondition && currentComponent?.displayConditions?.[displayCondition] && isFetchingDisplayConditions) {
744+
return (
745+
<div className="flex flex-col gap-y-2">
746+
<Skeleton className="h-6 w-1/4" />
747+
748+
<Skeleton className="h-10 w-full" />
749+
</div>
750+
);
751+
}
752+
741753
return (
742754
<li
743755
className={twMerge(

0 commit comments

Comments
 (0)