Skip to content

Commit 3708723

Browse files
author
deepshekhardas
committed
Merge remote-tracking branch 'origin/pr-3319-fix' into fix-pr-3321
# Conflicts: # apps/webapp/app/components/primitives/Resizable.tsx # apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.logs/route.tsx # apps/webapp/app/routes/_app.orgs.$organizationSlug.projects.$projectParam.env.$envParam.runs.$runParam/route.tsx
2 parents 2dd9f37 + 393ec38 commit 3708723

4 files changed

Lines changed: 15 additions & 11 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"@trigger.dev/core": patch
3+
"@trigger.dev/sdk": patch
4+
---
5+
6+
Feat(webapp): animated resizable panel
7+
8+
Adds animated open/close transitions to Resizable panels using react-window-splitter built-in animation hooks. Includes new exports: RESIZABLE_PANEL_ANIMATION, collapsibleHandleClassName(), and useFrozenValue(). Converts inspector/detail side panels from conditionally-mounted to always-mounted collapsible panels across multiple routes (batches, runs, schedules, deployments, logs, waitpoints, bulk-actions).

apps/webapp/app/components/primitives/Resizable.tsx

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"use client";
22

33
import React, { useRef } from "react";
4-
import { PanelGroup, Panel, PanelResizer } from "@window-splitter/react";
4+
import { PanelGroup, Panel, PanelResizer } from "react-window-splitter";
55
import { cn } from "~/utils/cn";
66

77
const ResizablePanelGroup = ({ className, ...props }: React.ComponentProps<typeof PanelGroup>) => (
@@ -69,14 +69,10 @@ const ResizableHandle = ({
6969
</PanelResizer>
7070
);
7171

72-
// react-window-splitter drives the collapse animation through @react-spring/rafz,
73-
// which has timing/interaction issues with Firefox that produce visual glitches
74-
// (alternating frames, panels stuck at min, panelHasSpace invariant violations).
75-
// Disable the animation on Firefox; it works correctly in Chromium and Safari.
76-
const RESIZABLE_PANEL_ANIMATION =
77-
typeof navigator !== "undefined" && /firefox/i.test(navigator.userAgent)
78-
? undefined
79-
: ({ easing: "ease-in-out", duration: 300 } as const);
72+
const RESIZABLE_PANEL_ANIMATION = {
73+
easing: "ease-in-out" as const,
74+
duration: 200,
75+
};
8076

8177
const COLLAPSIBLE_HANDLE_CLASSNAME = "transition-opacity duration-200";
8278

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -413,7 +413,7 @@ function LogsList({
413413
const frozenLogId = useFrozenValue(selectedLogId);
414414
const frozenLog = useFrozenValue(selectedLog);
415415
const displayLogId = selectedLogId ?? frozenLogId;
416-
const displayLog = selectedLog ?? frozenLog ?? undefined;
416+
const displayLog = selectedLog ?? frozenLog;
417417

418418
const updateUrlWithLog = useCallback((logId: string | undefined) => {
419419
const url = new URL(window.location.href);

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,7 @@ function TraceView({
617617
? linkedRunIdBySpanId?.[selectedSpanId]
618618
: undefined;
619619
const frozenLinkedRunId = useFrozenValue(selectedSpanLinkedRunId);
620-
const displayLinkedRunId = (selectedSpanId ? selectedSpanLinkedRunId : frozenLinkedRunId) ?? undefined;
620+
const displayLinkedRunId = selectedSpanId ? selectedSpanLinkedRunId : frozenLinkedRunId;
621621

622622
return (
623623
<div className={cn("grid h-full max-h-full grid-cols-1 overflow-hidden")}>

0 commit comments

Comments
 (0)