Skip to content

Commit 5b6d89c

Browse files
committed
Multiple fixes for column width
1 parent b66d777 commit 5b6d89c

1 file changed

Lines changed: 35 additions & 18 deletions

File tree

telemetry/ui/src/components/routes/app/StepList.tsx

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,8 @@ const CommonTableRow = (props: {
158158
});
159159
}
160160
e.stopPropagation();
161-
}}>
161+
}}
162+
>
162163
{props.children}
163164
</TableRow>
164165
);
@@ -233,7 +234,8 @@ const ActionTableRow = (props: {
233234
setCurrentHoverIndex={setCurrentHoverIndex}
234235
setCurrentSelectedIndex={setCurrentSelectedIndex}
235236
appID={props.appID}
236-
partitionKey={props.partitionKey}>
237+
partitionKey={props.partitionKey}
238+
>
237239
<TableCell className="text-gray-500 w-12 max-w-12 min-w-12">
238240
<div className="flex flex-row items-center">
239241
<RecursionDepthPadding depth={props.depth}>
@@ -251,7 +253,8 @@ const ActionTableRow = (props: {
251253
/>
252254
</div>
253255
<div
254-
className={`${props.minimized ? 'w-32' : 'w-72 max-w-72'} flex flex-row justify-start gap-1 items-center`}>
256+
className={`${props.minimized ? 'w-32' : 'w-72 max-w-72'} flex flex-row justify-start gap-1 items-center`}
257+
>
255258
<Chip
256259
label={isStreaming ? 'stream' : 'action'}
257260
chipType={isStreaming ? 'stream' : 'action'}
@@ -276,6 +279,7 @@ const ActionTableRow = (props: {
276279
</div>
277280
</div>
278281
</TableCell>
282+
{props.minimized && <TableCell colSpan={3} />}
279283
{!props.minimized && (
280284
<>
281285
<TableCell className="h-[1px] px-0" colSpan={1}>
@@ -500,23 +504,26 @@ const LinkSubTable = (props: {
500504
currentSelectedIndex={currentSelectedIndex}
501505
step={props.step}
502506
setCurrentHoverIndex={setCurrentHoverIndex}
503-
setCurrentSelectedIndex={setCurrentSelectedIndex}>
507+
setCurrentSelectedIndex={setCurrentSelectedIndex}
508+
>
504509
<TableCell colSpan={1} className="">
505510
<RecursionDepthPadding depth={props.depth}>
506511
<Icon className={`h-5 w-5 ${iconColor} -ml-1`} />
507512
</RecursionDepthPadding>
508513
</TableCell>
509514
<TableCell
510515
colSpan={1}
511-
className={`${normalText} w-48 min-w-48 max-w-48 truncate pl-9`}>
516+
className={`${normalText} w-48 min-w-48 max-w-48 truncate pl-9`}
517+
>
512518
<div
513519
className="z-50 truncate"
514520
onClick={(e) => {
515521
navigate(
516522
`/project/${props.projectId}/${subApp.child.partition_key || 'null'}/${subApp.child.app_id}`
517523
);
518524
e.stopPropagation();
519-
}}>
525+
}}
526+
>
520527
<span className="hover:underline">{subApp.child.app_id}</span>
521528
</div>
522529
</TableCell>
@@ -547,7 +554,7 @@ const LinkSubTable = (props: {
547554
/>
548555
</TableCell>
549556
)}
550-
{/* <TableCell colSpan={1} /> */}
557+
<TableCell colSpan={1} />
551558
</CommonTableRow>
552559
{subApplicationIsExpanded ? (
553560
<SelfLoadingSubApplicationContainer
@@ -643,9 +650,11 @@ const StepSubTableRow = (props: {
643650
currentSelectedIndex={currentSelectedIndex}
644651
step={props.step}
645652
setCurrentHoverIndex={setCurrentHoverIndex}
646-
setCurrentSelectedIndex={setCurrentSelectedIndex}>
653+
setCurrentSelectedIndex={setCurrentSelectedIndex}
654+
>
647655
<TableCell
648-
className={` ${lightText} w-10 min-w-10 ${props.displaySpanID ? '' : 'text-opacity-0'}`}>
656+
className={` ${lightText} w-10 min-w-10 ${props.displaySpanID ? '' : 'text-opacity-0'}`}
657+
>
649658
<RecursionDepthPadding depth={props.depth}>
650659
<span>{spanIDUniqueToAction}</span>
651660
</RecursionDepthPadding>
@@ -654,12 +663,14 @@ const StepSubTableRow = (props: {
654663
<>
655664
<TableCell
656665
onClick={onClick}
657-
className={`${normalText} ${props.minimized ? 'w-32 min-w-32' : 'w-72 max-w-72'} flex flex-col`}>
666+
className={`${normalText} ${props.minimized ? 'w-32 min-w-32' : 'w-72 max-w-72'} flex flex-col`}
667+
>
658668
<div className="flex flex-row gap-1 items-center">
659669
{[...Array(depth).keys()].map((i) => (
660670
<Icon
661671
key={i}
662-
className={`${i === depth - 1 ? 'opacity-0' : 'opacity-0'} text-lg text-gray-600 w-4 flex-shrink-0`}></Icon>
672+
className={`${i === depth - 1 ? 'opacity-0' : 'opacity-0'} text-lg text-gray-600 w-4 flex-shrink-0`}
673+
></Icon>
663674
))}
664675
<Chip
665676
label={
@@ -715,15 +726,16 @@ const StepSubTableRow = (props: {
715726
className="flex justify-start overflow-hidden pl-20"
716727
onClick={(e) => {
717728
e.stopPropagation();
718-
}}>
729+
}}
730+
>
719731
<RenderedField
720732
value={(props.model as AttributeModel).value}
721733
defaultExpanded={true} // no real need for default expanded
722734
/>
723735
</div>
724736
)}
725737
</TableCell>
726-
{props.displayAnnotations && <TableCell className="" />}
738+
{props.displayAnnotations && <TableCell className="" colSpan={2} />}
727739
</>
728740
) : (
729741
<TableCell colSpan={5}></TableCell>
@@ -1111,11 +1123,13 @@ const WaterfallPiece: React.FC<{
11111123
onClick={(e) => {
11121124
props.setSubActionExpanded?.(!props.isSubActionExpanded);
11131125
e.stopPropagation();
1114-
}}>
1126+
}}
1127+
>
11151128
<div
11161129
className={`${props.isHighlighted ? 'bg-transparent' : props.bgColor} opacity-50 h-1 px-0 rounded-sm flex flex-row justify-center items-center`}
11171130
onMouseEnter={() => setIsHovered(true)}
1118-
onMouseLeave={() => setIsHovered(false)}>
1131+
onMouseLeave={() => setIsHovered(false)}
1132+
>
11191133
<SubActionIcon
11201134
className={`hover:scale-125 transform-none cursor-pointer h-4 w-4 rounded-full text-gray-700 ${props.isHighlighted ? props.bgColor : 'bg-white'}`}
11211135
/>
@@ -1132,7 +1146,8 @@ const WaterfallPiece: React.FC<{
11321146
style={{
11331147
left: `calc(${leftPositionPercentage}% - 20px)`,
11341148
width: `calc(${widthPercentage}% + 40px)` // 20px buffer on each side
1135-
}}></div>
1149+
}}
1150+
></div>
11361151

11371152
{
11381153
<div
@@ -1146,7 +1161,8 @@ const WaterfallPiece: React.FC<{
11461161
left: isCloseToEnd
11471162
? `auto`
11481163
: `calc(${leftPositionPercentage}% + ${widthPercentage}%)`
1149-
}}>
1164+
}}
1165+
>
11501166
{hoverItem}
11511167
</div>
11521168
}
@@ -1803,7 +1819,8 @@ const ParentLink = (props: {
18031819
<TableCell colSpan={2} className="text-gray-500">
18041820
<div className="flex flex-row gap-1 items-center pl-5">
18051821
<Link
1806-
to={`/project/${props.projectId}/${props.parentPointer.partition_key}/${props.parentPointer.app_id}`}>
1822+
to={`/project/${props.projectId}/${props.parentPointer.partition_key}/${props.parentPointer.app_id}`}
1823+
>
18071824
<span className="hover:underline">{props.parentPointer.app_id}</span>
18081825
</Link>
18091826
<span>@</span>

0 commit comments

Comments
 (0)