From 4dde3aec669cfa680649f7ecd8a4a166876c1e77 Mon Sep 17 00:00:00 2001 From: Andre Padez Date: Thu, 19 Feb 2026 12:34:05 +0000 Subject: [PATCH] workspace panel drag commented --- .../components/Workspace/PanelSlot.tsx | 53 ++++++++----------- .../components/Workspace/WorkspaceView.tsx | 5 +- 2 files changed, 24 insertions(+), 34 deletions(-) diff --git a/src/workspaces/components/Workspace/PanelSlot.tsx b/src/workspaces/components/Workspace/PanelSlot.tsx index 7c860768..8c3685c1 100644 --- a/src/workspaces/components/Workspace/PanelSlot.tsx +++ b/src/workspaces/components/Workspace/PanelSlot.tsx @@ -1,5 +1,4 @@ -import { useCallback } from 'react'; -import { ArrowLeftRight, GripVertical } from 'lucide-react'; +import { ArrowLeftRight } from 'lucide-react'; import type { LayoutPanel, AppRegistry, PanelComponents } from './types'; import { useWorkspace } from './WorkspaceContext'; import { Card } from '../Card'; @@ -98,34 +97,23 @@ const SwapSourceIndicator = ({ panelId }: { panelId: string }) => { ); }; -const DragHandle = ({ panelId }: { panelId: string }) => { - const { setDragSourceId, dragSourceId } = useWorkspace(); - - const onPointerDown = useCallback( - (ev: React.PointerEvent) => { - ev.preventDefault(); - setDragSourceId(panelId); - }, - [panelId, setDragSourceId], - ); - - if (dragSourceId) return null; - - return ( -
- -
- ); -}; - -const DragSourceDimmer = ({ panelId }: { panelId: string }) => { - const { dragSourceId } = useWorkspace(); - if (dragSourceId !== panelId) return null; - return
; -}; +// TODO: drag-to-reposition needs work (visual feedback, edge cases) +// const DragHandle = ({ panelId }: { panelId: string }) => { +// const { setDragSourceId, dragSourceId } = useWorkspace(); +// const onPointerDown = useCallback((ev: React.PointerEvent) => { ev.preventDefault(); setDragSourceId(panelId); }, [panelId, setDragSourceId]); +// if (dragSourceId) return null; +// return ( +//
+// +//
+// ); +// }; +// +// const DragSourceDimmer = ({ panelId }: { panelId: string }) => { +// const { dragSourceId } = useWorkspace(); +// if (dragSourceId !== panelId) return null; +// return
; +// }; export const PanelSlot = ({ panel, registry, components, interactive, isLastPanel, onSetApp, onSplit, onRemove }: PanelSlotProps) => { const PanelComponent = components?.[panel.id]; @@ -144,8 +132,9 @@ export const PanelSlot = ({ panel, registry, components, interactive, isLastPane <> - - + {/* TODO: re-enable when drag-to-reposition is polished */} + {/* */} + {/* */} ) : null; diff --git a/src/workspaces/components/Workspace/WorkspaceView.tsx b/src/workspaces/components/Workspace/WorkspaceView.tsx index 5d68958d..3e298a6e 100644 --- a/src/workspaces/components/Workspace/WorkspaceView.tsx +++ b/src/workspaces/components/Workspace/WorkspaceView.tsx @@ -4,7 +4,8 @@ import type { DropPosition } from './layout-utils'; import { splitPanel, removePanel, setApp, updateSizes, swapPanels, movePanel, countPanels } from './layout-utils'; import { WorkspaceProvider } from './WorkspaceContext'; import { WorkspaceRenderer } from './WorkspaceRenderer'; -import { DragOverlay } from './DragOverlay'; +// TODO: re-enable when drag-to-reposition is polished +// import { DragOverlay } from './DragOverlay'; type WorkspaceViewProps = { workspace: WorkspaceDefinition | null; @@ -104,7 +105,7 @@ export const WorkspaceView = ({ workspace, layout, onLayoutChange, registry }: W onRemove={handleRemove} onResized={handleResized} /> - + {/* */} ); };