Skip to content

Commit 807d271

Browse files
committed
Fix sidebar responsive behavior and remove unused sidebar code
1 parent bb953b6 commit 807d271

File tree

3 files changed

+12
-36
lines changed

3 files changed

+12
-36
lines changed

app/workflows/[workflowId]/page.tsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,11 @@ const WorkflowEditor = ({ params }: WorkflowPageProps) => {
588588
</button>
589589
)}
590590
</div>
591-
<NodeConfigPanel />
591+
592+
{/* Desktop: Docked sidebar - now resizable */}
593+
<div className="flex size-full flex-col bg-background">
594+
<NodeConfigPanel />
595+
</div>
592596
</div>
593597
)}
594598
</div>

components/workflow/node-config-panel.tsx

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import {
55
Eye,
66
EyeOff,
77
FileCode,
8-
MenuIcon,
98
RefreshCw,
109
Trash2,
1110
} from "lucide-react";
@@ -47,9 +46,7 @@ import {
4746
updateNodeDataAtom,
4847
} from "@/lib/workflow-store";
4948
import { findActionById } from "@/plugins";
50-
import { Panel } from "../ai-elements/panel";
5149
import { IntegrationsDialog } from "../settings/integrations-dialog";
52-
import { Drawer, DrawerContent, DrawerTrigger } from "../ui/drawer";
5350
import { IntegrationSelector } from "../ui/integration-selector";
5451
import { Tabs, TabsContent, TabsList, TabsTrigger } from "../ui/tabs";
5552
import { ActionConfig } from "./config/action-config";
@@ -143,7 +140,7 @@ const MultiSelectionPanel = ({
143140
};
144141

145142
// biome-ignore lint/complexity/noExcessiveCognitiveComplexity: Complex UI logic with multiple conditions
146-
export const PanelInner = () => {
143+
export const NodeConfigPanel = () => {
147144
const [selectedNodeId] = useAtom(selectedNodeAtom);
148145
const [selectedEdgeId] = useAtom(selectedEdgeAtom);
149146
const [nodes] = useAtom(nodesAtom);
@@ -941,30 +938,4 @@ export const PanelInner = () => {
941938
/>
942939
</>
943940
);
944-
};
945-
export const NodeConfigPanel = () => {
946-
return (
947-
<>
948-
{/* Mobile: Drawer */}
949-
<div className="md:hidden">
950-
<Drawer>
951-
<DrawerTrigger asChild>
952-
<Panel position="bottom-right">
953-
<Button className="h-8 w-8" size="icon" variant="ghost">
954-
<MenuIcon className="size-4" />
955-
</Button>
956-
</Panel>
957-
</DrawerTrigger>
958-
<DrawerContent>
959-
<PanelInner />
960-
</DrawerContent>
961-
</Drawer>
962-
</div>
963-
964-
{/* Desktop: Docked sidebar - now resizable */}
965-
<div className="hidden size-full flex-col bg-background md:flex">
966-
<PanelInner />
967-
</div>
968-
</>
969-
);
970-
};
941+
};

components/workflow/workflow-toolbar.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ import {
5151
} from "@/components/ui/dropdown-menu";
5252
import { Input } from "@/components/ui/input";
5353
import { Label } from "@/components/ui/label";
54-
import { Sheet, SheetContent } from "@/components/ui/sheet";
54+
import { Sheet, SheetContent, SheetTitle } from "@/components/ui/sheet";
5555
import { api, type IntegrationType } from "@/lib/api-client";
5656
import { useSession } from "@/lib/auth-client";
5757
import { integrationsAtom } from "@/lib/integrations-store";
@@ -91,7 +91,7 @@ import { IntegrationsDialog } from "../settings/integrations-dialog";
9191
import { IntegrationIcon } from "../ui/integration-icon";
9292
import { WorkflowIcon } from "../ui/workflow-icon";
9393
import { UserMenu } from "../workflows/user-menu";
94-
import { PanelInner } from "./node-config-panel";
94+
import { NodeConfigPanel } from "./node-config-panel";
9595

9696
type WorkflowToolbarProps = {
9797
workflowId?: string;
@@ -854,7 +854,7 @@ function ToolbarActions({
854854
</ButtonGroup>
855855

856856
{/* Properties - Mobile Vertical (always visible) */}
857-
<ButtonGroup className="flex lg:hidden" orientation="vertical">
857+
<ButtonGroup className="flex md:hidden" orientation="vertical">
858858
<Button
859859
className="border hover:bg-black/5 dark:hover:bg-white/5"
860860
onClick={() => setShowPropertiesSheet(true)}
@@ -881,8 +881,9 @@ function ToolbarActions({
881881
{/* Properties Sheet - Mobile Only */}
882882
<Sheet onOpenChange={setShowPropertiesSheet} open={showPropertiesSheet}>
883883
<SheetContent className="w-full p-0 sm:max-w-full" side="bottom">
884+
<SheetTitle className="sr-only" />
884885
<div className="h-[80vh]">
885-
<PanelInner />
886+
<NodeConfigPanel />
886887
</div>
887888
</SheetContent>
888889
</Sheet>

0 commit comments

Comments
 (0)