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
styles: change styles for staged AI cells (#6410)
Myles Scolnickd079a7e1c979
diff --git a/frontend/src/components/editor/Cell.tsx b/frontend/src/components/editor/Cell.tsxindex 0fbdf17827..d0b3bbfcd5 100644--- a/frontend/src/components/editor/Cell.tsx+++ b/frontend/src/components/editor/Cell.tsx@@ -573,9 +573,9 @@ const EditableCellComponent = ({ref={cellContainerRef}{...cellDomProps(cellId, cellData.name)}>- <StagedAICellBackground cellId={cellId} className="z-5" />{cellOutput === "above" && outputArea}<div className={cn("tray")} data-hidden={isMarkdownCodeHidden}>+ <StagedAICellBackground cellId={cellId} /><div className="absolute right-2 -top-4 z-10"><CellToolbaredited={cellData.edited}diff --git a/frontend/src/components/editor/ai/completion-handlers.tsx b/frontend/src/components/editor/ai/completion-handlers.tsxindex f7c62cc5be..ec414b66d6 100644--- a/frontend/src/components/editor/ai/completion-handlers.tsx+++ b/frontend/src/components/editor/ai/completion-handlers.tsx@@ -104,8 +104,10 @@ export const CompletionActionsCellFooter: React.FC<{size="xs"disabled={isLoading}onClick={onAccept}- className="h-6 text-(--grass-11) border-(--grass-7) bg-(--grass-3)/60- hover:bg-(--grass-4) dark:bg-(--grass-4)/80 dark:hover:bg-(--grass-3) rounded px-3 font-semibold"+ className="h-6 text-(--grass-11) border-(--grass-7) bg-(--grass-3)/60+ hover:bg-(--grass-3) dark:bg-(--grass-4)/80 dark:hover:bg-(--grass-3) rounded px-3 font-semibold+ active:bg-(--grass-5) dark:active:bg-(--grass-4)+ border-(--green-6) border hover:shadow-xs">Accept</Button>@@ -113,8 +115,10 @@ export const CompletionActionsCellFooter: React.FC<{variant="text"size="xs"onClick={onDecline}- className="h-6 text-(--red-10) border-(--red-7) bg-(--red-3)/60 hover:bg-(--red-4)- dark:bg-(--red-4)/80 dark:hover:bg-(--red-3) rounded px-3 font-semibold"+ className="h-6 text-(--red-10) border-(--red-7) bg-(--red-3)/60 hover:bg-(--red-3)+ dark:bg-(--red-4)/80 dark:hover:bg-(--red-3) rounded px-3 font-semibold+ active:bg-(--red-5) dark:active:bg-(--red-4)+ border-(--red-6) border hover:shadow-xs">Reject</Button>diff --git a/frontend/src/components/editor/cell/StagedAICell.tsx b/frontend/src/components/editor/cell/StagedAICell.tsxindex 7ce5aa0679..0806fb9d3a 100644--- a/frontend/src/components/editor/cell/StagedAICell.tsx+++ b/frontend/src/components/editor/cell/StagedAICell.tsx@@ -16,16 +16,7 @@ export const StagedAICellBackground: React.FC<{return null;}- return (- <div- className={cn(- "absolute h-full w-full pointer-events-none rounded-lg",- "shadow-[inset_0_0_0_1px_rgba(59,130,246,0.15),inset_0_0_12px_rgba(59,130,246,0.2),inset_0_0_24px_rgba(59,130,246,0.1)]",- "dark:shadow-[inset_0_0_0_1px_rgba(59,130,246,0.15),inset_0_0_12px_rgba(59,130,246,0.2),inset_0_0_24px_rgba(59,130,246,0.1)]",- className,- )}- />- );+ return <div className={cn("mo-ai-generated-cell", className)} />;};export const StagedAICellFooter: React.FC<{ cellId: CellId }> = ({diff --git a/frontend/src/css/app/Cell.css b/frontend/src/css/app/Cell.cssindex 7b6d2df41a..e75e965f15 100644--- a/frontend/src/css/app/Cell.css+++ b/frontend/src/css/app/Cell.css@@ -23,6 +23,17 @@outline: none;}+ &:has(.mo-ai-generated-cell)::before {+ content: "";+ position: absolute;+ inset: 0;+ border-radius: 10px;+ pointer-events: none;+ opacity: 0.5;+ box-shadow: 0px 0px 10px 0px var(--cyan-9);+ z-index: 1;+ }+&:focus-within {z-index: 20;}