Skip to content

Commit fac580e

Browse files
committed
Fix sidebar responsive behavior and remove unused sidebar code
1 parent d646580 commit fac580e

File tree

3 files changed

+11
-35
lines changed

3 files changed

+11
-35
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: 1 addition & 30 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);
@@ -942,29 +939,3 @@ export const PanelInner = () => {
942939
</>
943940
);
944941
};
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-
};

components/workflow/workflow-toolbar.tsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ import {
4949
} from "@/components/ui/dropdown-menu";
5050
import { Input } from "@/components/ui/input";
5151
import { Label } from "@/components/ui/label";
52-
import { Sheet, SheetContent } from "@/components/ui/sheet";
52+
import { Sheet, SheetContent, SheetTitle } from "@/components/ui/sheet";
5353
import { api, type IntegrationType } from "@/lib/api-client";
5454
import { useSession } from "@/lib/auth-client";
5555
import { integrationsAtom } from "@/lib/integrations-store";
@@ -89,7 +89,7 @@ import { IntegrationsDialog } from "../settings/integrations-dialog";
8989
import { IntegrationIcon } from "../ui/integration-icon";
9090
import { WorkflowIcon } from "../ui/workflow-icon";
9191
import { UserMenu } from "../workflows/user-menu";
92-
import { PanelInner } from "./node-config-panel";
92+
import { NodeConfigPanel } from "./node-config-panel";
9393

9494
type WorkflowToolbarProps = {
9595
workflowId?: string;
@@ -849,7 +849,7 @@ function ToolbarActions({
849849
</ButtonGroup>
850850

851851
{/* Properties - Mobile Vertical (always visible) */}
852-
<ButtonGroup className="flex lg:hidden" orientation="vertical">
852+
<ButtonGroup className="flex md:hidden" orientation="vertical">
853853
<Button
854854
className="border hover:bg-black/5 dark:hover:bg-white/5"
855855
onClick={() => setShowPropertiesSheet(true)}
@@ -876,8 +876,9 @@ function ToolbarActions({
876876
{/* Properties Sheet - Mobile Only */}
877877
<Sheet onOpenChange={setShowPropertiesSheet} open={showPropertiesSheet}>
878878
<SheetContent className="w-full p-0 sm:max-w-full" side="bottom">
879+
<SheetTitle className="sr-only" />
879880
<div className="h-[80vh]">
880-
<PanelInner />
881+
<NodeConfigPanel />
881882
</div>
882883
</SheetContent>
883884
</Sheet>

0 commit comments

Comments
 (0)