From f07598eac85e9e2ffcd8e5cea122e1151a71a9f6 Mon Sep 17 00:00:00 2001 From: FoxxMD Date: Fri, 9 Oct 2026 19:19:57 +0000 Subject: [PATCH] feat(ui): Optimize layout for transform step diff/input * Use collapsible overlay for diff * Layout as tabs for better space usage --- src/client/components/TransformSteps.tsx | 46 +++++++++++++++--------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/src/client/components/TransformSteps.tsx b/src/client/components/TransformSteps.tsx index 0b287293..81d31b4f 100644 --- a/src/client/components/TransformSteps.tsx +++ b/src/client/components/TransformSteps.tsx @@ -1,4 +1,4 @@ -import { Heading, Icon, Span, Stack, Text, Timeline} from '@chakra-ui/react'; +import { Heading, Box, Icon, Span, Stack, Text, Timeline, Tabs} from '@chakra-ui/react'; import React, { Fragment, useMemo } from "react"; import { BsExclamationTriangle, BsSkipForward, BsStoplights } from "react-icons/bs"; import { MdMusicNote } from "react-icons/md"; @@ -112,6 +112,8 @@ export const diffElements = (original: JsonPlayObject, steps: LifecycleStep[]): } } else if (patchElm !== undefined) { diffElements.push(patchElm); + } else { + diffElements.push(null); } } @@ -176,6 +178,19 @@ export const TransformSteps = (props: LifeycleStepsTimelineProps) => { } } } + + let inputsElm: React.JSX.Element | undefined = undefined; + if(inputs !== undefined && inputs.length > 0) { + inputsElm = ( + + {inputs.map((y, inputsIndex) => )} + + ); + } + let diffElm: React.JSX.Element | undefined = undefined; + if(diffs[index] !== null) { + diffElm = {diffs[index]} + } return @@ -194,22 +209,19 @@ export const TransformSteps = (props: LifeycleStepsTimelineProps) => { disableUntil="md" unmountOnExit timeline> - {error !== undefined && error !== null ? : null} - - {diffs[index] !== null ? ( - - Diff - {diffs[index]} - ) : null} - {inputs !== undefined && inputs.length > 0 ? ( - - Inputs - - {inputs.map((y, inputsIndex) => { - return - })} - ) : null} - + {error !== undefined && error !== null ? : null} + + + Inputs + Diff + + + {inputsElm ?? No Inputs recorded} + + + {diffElm ?? No diff recorded or Play was identical after transform} + + -- 2.51.2