A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
Revamp column UI with kanban-inspired design (#5772)
Trevor Manze4c0b013f693
diff --git a/frontend/src/components/editor/columns/cell-column.tsx b/frontend/src/components/editor/columns/cell-column.tsxindex 5113969aa6..ffd0b7c447 100644--- a/frontend/src/components/editor/columns/cell-column.tsx+++ b/frontend/src/components/editor/columns/cell-column.tsx@@ -34,6 +34,7 @@ export const Column = memo((props: Props) => {canMoveLeft={props.canMoveLeft}canMoveRight={props.canMoveRight}className="group/column"+ footer={props.footer}><ResizableComponentstartingWidth={getColumnWidth(props.index)}@@ -43,7 +44,6 @@ export const Column = memo((props: Props) => {>{props.children}</ResizableComponent>- {props.footer}</SortableColumn>);}@@ -94,7 +94,7 @@ const ResizableComponent = ({{renderResizeHandler(handleRefs.left)}<divref={resizableDivRef}- className="flex flex-col gap-5 box-content min-h-[100px] px-11 py-6 min-w-[500px] z-1"+ className="flex flex-col gap-5 box-content min-h-[100px] px-11 pt-3 pb-6 min-w-[500px] z-1"style={style}>{children}diff --git a/frontend/src/components/editor/columns/sortable-column.tsx b/frontend/src/components/editor/columns/sortable-column.tsxindex 350d0fe5d0..d7b162c37b 100644--- a/frontend/src/components/editor/columns/sortable-column.tsx+++ b/frontend/src/components/editor/columns/sortable-column.tsx@@ -2,9 +2,22 @@import { useSortable } from "@dnd-kit/sortable";import { CSS } from "@dnd-kit/utilities";-import { ChevronLeftIcon, ChevronRightIcon, PlusIcon, X } from "lucide-react";+import {+ ChevronLeftIcon,+ ChevronRightIcon,+ GripHorizontal,+ MoreHorizontal,+ PlusIcon,+ X,+} from "lucide-react";import React, { memo } from "react";import { Button } from "@/components/ui/button";+import {+ DropdownMenu,+ DropdownMenuContent,+ DropdownMenuItem,+ DropdownMenuTrigger,+} from "@/components/ui/dropdown-menu";import { Tooltip } from "@/components/ui/tooltip";import { useCellActions } from "@/core/cells/cells";import { cn } from "@/utils/cn";@@ -16,11 +29,12 @@ interface Props extends React.HTMLAttributes<HTMLDivElement> {canDelete: boolean;canMoveLeft: boolean;canMoveRight: boolean;+ footer?: React.ReactNode;}const SortableColumnInternal = React.forwardRef((- { columnId, canDelete, canMoveLeft, canMoveRight, ...props }: Props,+ { columnId, canDelete, canMoveLeft, canMoveRight, footer, ...props }: Props,ref: React.Ref<HTMLDivElement>,) => {const {@@ -51,7 +65,7 @@ const SortableColumnInternal = React.forwardRef(const { deleteColumn, moveColumn, addColumn } = useCellActions();- const buttonClasses = cn("h-full hover:bg-muted rounded-none");+ const buttonClasses = "hover:bg-[var(--gray-3)] aspect-square p-0 w-7 h-7";const handleScrollAppRight = () => {const app = document.getElementById("App");@@ -64,11 +78,11 @@ const SortableColumnInternal = React.forwardRef(};const dragHandle = (- <div className="h-6 group flex items-center rounded-t-lg border hover:border-border border-[var(--slate-3)] overflow-hidden bg-[var(--slate-1)]">+ <div className="px-2 pt-3 pb-0 group flex items-center rounded-t-lg overflow-hidden"><Tooltip content="Move column left" side="top" delayDuration={300}><Buttonvariant="text"- size="sm"+ size="xs"className={buttonClasses}onClick={() =>moveColumn({ column: columnId, overColumn: "_left_" })@@ -81,7 +95,7 @@ const SortableColumnInternal = React.forwardRef(<Tooltip content="Move column right" side="top" delayDuration={300}><Buttonvariant="text"- size="sm"+ size="xs"className={buttonClasses}onClick={() =>moveColumn({ column: columnId, overColumn: "_right_" })@@ -92,27 +106,33 @@ const SortableColumnInternal = React.forwardRef(</Button></Tooltip><div- className="flex gap-2 h-full flex-grow active:bg-accent cursor-grab"+ className="flex gap-2 h-full flex-grow cursor-grab active:cursor-grabbing items-center justify-center"+ data-testid="column-drag-spacer"{...attributes}{...listeners}- data-testid="column-drag-button"- />- {canDelete && (- <Tooltip content="Delete column" side="top" delayDuration={300}>- <Button- variant="text"- size="sm"- className="opacity-0 group-hover:opacity-70 group-hover:hover:opacity-100 text-destructive h-full hover:bg-destructive/20 rounded-none"+ >+ <GripHorizontal className="size-4 opacity-0 group-hover:opacity-50 transition-opacity duration-200" />+ </div>+ <DropdownMenu>+ <DropdownMenuTrigger asChild={true}>+ <Button variant="text" size="xs" className={buttonClasses}>+ <MoreHorizontal className="size-4" />+ </Button>+ </DropdownMenuTrigger>+ <DropdownMenuContent align="end">+ <DropdownMenuItemonClick={() => deleteColumn({ columnId })}+ disabled={!canDelete}>- <X className="size-4" />- </Button>- </Tooltip>- )}+ <X className="mr-2 size-4" />+ Delete column+ </DropdownMenuItem>+ </DropdownMenuContent>+ </DropdownMenu><Tooltip content="Add column" side="top" delayDuration={300}><Buttonvariant="text"- size="sm"+ size="xs"className={buttonClasses}onClick={() => {addColumn({ columnId });@@ -141,8 +161,11 @@ const SortableColumnInternal = React.forwardRef(isOver && "bg-accent/20", // Add a background color when dragging over)}>- {dragHandle}- {props.children}+ <div className="bg-[var(--slate-1)] rounded-lg">+ {dragHandle}+ {props.children}+ </div>+ {footer}</div>);},