Skip to content

Commit 21ff0a2

Browse files
committed
Tweaked some styles on the timeline
1 parent dbaf622 commit 21ff0a2

File tree

1 file changed

+11
-5
lines changed
  • apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam

1 file changed

+11
-5
lines changed

apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -942,6 +942,8 @@ function TimelineView({
942942
getTreeProps={getTreeProps}
943943
parentClassName="h-full scrollbar-hide"
944944
renderNode={({ node, state, index, virtualizer, virtualItem }) => {
945+
const isTopSpan = node.id === events[0]?.id;
946+
945947
return (
946948
<Timeline.Row
947949
key={index}
@@ -988,7 +990,7 @@ function TimelineView({
988990
{(ms) => (
989991
<motion.div
990992
className={cn(
991-
"-ml-1 size-[0.3125rem] rounded-full border bg-background-bright",
993+
"-ml-[0.1562rem] size-[0.3125rem] rounded-full border bg-background-bright",
992994
eventBorderClassName(node.data)
993995
)}
994996
layoutId={`${node.id}-${event.name}`}
@@ -1025,6 +1027,7 @@ function TimelineView({
10251027
: nanosecondsToMilliseconds(duration - node.data.offset)
10261028
}
10271029
node={node}
1030+
fadeLeft={isTopSpan && queuedDuration !== undefined}
10281031
/>
10291032
</>
10301033
) : (
@@ -1036,7 +1039,7 @@ function TimelineView({
10361039
{(ms) => (
10371040
<motion.div
10381041
className={cn(
1039-
"-ml-1 size-3 rounded-full border-2 border-background-bright",
1042+
"-ml-0.5 size-3 rounded-full border-2 border-background-bright",
10401043
eventBackgroundClassName(node.data)
10411044
)}
10421045
layoutId={node.id}
@@ -1222,15 +1225,18 @@ function PulsingDot() {
12221225
function SpanWithDuration({
12231226
showDuration,
12241227
node,
1228+
fadeLeft,
12251229
...props
1226-
}: Timeline.SpanProps & { node: TraceEvent; showDuration: boolean }) {
1230+
}: Timeline.SpanProps & { node: TraceEvent; showDuration: boolean; fadeLeft: boolean }) {
12271231
return (
12281232
<Timeline.Span {...props}>
12291233
<motion.div
12301234
className={cn(
1231-
"relative flex h-4 w-full min-w-0.5 items-center rounded-sm",
1232-
eventBackgroundClassName(node.data)
1235+
"relative flex h-4 w-full min-w-0.5 items-center",
1236+
eventBackgroundClassName(node.data),
1237+
fadeLeft ? "rounded-r-sm bg-gradient-to-r from-black/50 to-transparent" : "rounded-sm"
12331238
)}
1239+
style={{ backgroundSize: "20px 100%", backgroundRepeat: "no-repeat" }}
12341240
layoutId={node.id}
12351241
>
12361242
{node.data.isPartial && (

0 commit comments

Comments
 (0)