From 490e129a59e964fc32435c876d8c08c34ef6cbdd Mon Sep 17 00:00:00 2001 From: Amrit Borah Date: Tue, 21 May 2024 12:47:33 +0530 Subject: [PATCH 1/3] fix: add key to component --- src/components/CIPipelineN/PreBuild.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/CIPipelineN/PreBuild.tsx b/src/components/CIPipelineN/PreBuild.tsx index 1e2f7e9f58..1147dcc52e 100644 --- a/src/components/CIPipelineN/PreBuild.tsx +++ b/src/components/CIPipelineN/PreBuild.tsx @@ -223,5 +223,5 @@ export function PreBuild({ presetPlugins, sharedPlugins, mandatoryPluginsMap, is ) } - return renderComponent() + return {renderComponent()} } From 7446a08b53e1924dc05989c0ad3374fa86bc94f6 Mon Sep 17 00:00:00 2001 From: Amrit Borah Date: Tue, 21 May 2024 18:17:17 +0530 Subject: [PATCH 2/3] feat: open input variables in post/pre-build by default --- src/components/CIPipelineN/VariableContainer.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/CIPipelineN/VariableContainer.tsx b/src/components/CIPipelineN/VariableContainer.tsx index 87f26a5ee7..d1c2a27de1 100644 --- a/src/components/CIPipelineN/VariableContainer.tsx +++ b/src/components/CIPipelineN/VariableContainer.tsx @@ -7,7 +7,7 @@ import { ReactComponent as AlertTriangle } from '../../assets/icons/ic-alert-tri import { pipelineContext } from '../workflowEditor/workflowEditor' export const VariableContainer = ({ type }: { type: PluginVariableType }) => { - const [collapsedSection, setCollapsedSection] = useState(true) + const [collapsedSection, setCollapsedSection] = useState(type !== PluginVariableType.INPUT) const { formData, selectedTaskIndex, activeStageName, formDataErrorObj } = useContext(pipelineContext) const variableLength = formData[activeStageName].steps[selectedTaskIndex].pluginRefStepDetail[ From 7d54f4dff9d9ac529f3de36ca8809ae0611945a2 Mon Sep 17 00:00:00 2001 From: Amrit Borah Date: Tue, 21 May 2024 19:05:40 +0530 Subject: [PATCH 3/3] chore: make props readonly using React.FC type --- src/components/CIPipelineN/PreBuild.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/CIPipelineN/PreBuild.tsx b/src/components/CIPipelineN/PreBuild.tsx index 1147dcc52e..e8a6c4d4ea 100644 --- a/src/components/CIPipelineN/PreBuild.tsx +++ b/src/components/CIPipelineN/PreBuild.tsx @@ -19,7 +19,7 @@ import { importComponentFromFELibrary } from '../common' import { pipelineContext } from '../workflowEditor/workflowEditor' const isRequired = importComponentFromFELibrary('isRequired', null, 'function') -export function PreBuild({ presetPlugins, sharedPlugins, mandatoryPluginsMap, isJobView }: PreBuildType) { +export const PreBuild: React.FC = ({ presetPlugins, sharedPlugins, mandatoryPluginsMap, isJobView }) => { const { formData, isCdPipeline,