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
add python cell to create cell context menu (#1725)
Akshay Agrawaldf6fc1d3e4da
diff --git a/frontend/src/components/editor/cell/CreateCellButton.tsx b/frontend/src/components/editor/cell/CreateCellButton.tsxindex 39be193677..7a99fbe83f 100644--- a/frontend/src/components/editor/cell/CreateCellButton.tsx+++ b/frontend/src/components/editor/cell/CreateCellButton.tsx@@ -9,7 +9,7 @@ import {ContextMenuItem,} from "@/components/ui/context-menu";import { MarkdownLanguageAdapter } from "@/core/codemirror/language/markdown";-import { MarkdownIcon } from "./code/icons";+import { MarkdownIcon, PythonIcon } from "./code/icons";import { SQLLanguageAdapter } from "@/core/codemirror/language/sql";import { cn } from "@/utils/cn";@@ -57,6 +57,19 @@ const CreateCellButtonContextMenu = (props: {<ContextMenu><ContextMenuTrigger>{children}</ContextMenuTrigger><ContextMenuContent>+ <ContextMenuItem+ key="python"+ onSelect={(evt) => {+ evt.stopPropagation();+ onClick({ code: "" });+ }}+ >+ <div className="mr-3">+ <PythonIcon />+ </div>+ Python cell+ </ContextMenuItem>+<ContextMenuItemkey="markdown"onSelect={(evt) => {