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
improvement: removed border and and fix tooltips when multi-column view (#3649)
Shahmir Varqha88c660a3ca12
diff --git a/frontend/src/components/editor/Cell.tsx b/frontend/src/components/editor/Cell.tsxindex 2444bcc2c8..db845506d0 100644--- a/frontend/src/components/editor/Cell.tsx+++ b/frontend/src/components/editor/Cell.tsx@@ -59,6 +59,7 @@ import { HideCodeButton } from "./code/readonly-python-code";import { useResizeObserver } from "@/hooks/useResizeObserver";import type { LanguageAdapterType } from "@/core/codemirror/language/types";import { Events } from "@/utils/events";+import { TooltipProvider } from "@/components/ui/tooltip";/*** Imperative interface of the cell.@@ -583,149 +584,157 @@ const CellComponent = ();return (- <CellActionsContextMenu- cellId={cellId}- config={cellConfig}- status={status}- getEditorView={getEditorView}- hasOutput={hasOutput}- hasConsoleOutput={hasConsoleOutput}- name={name}- >- <SortableCell- tabIndex={-1}- ref={cellRef}- data-status={status}- onBlur={closeCompletionHandler}- onKeyDown={resumeCompletionHandler}+ <TooltipProvider>+ <CellActionsContextMenucellId={cellId}- canMoveX={canMoveX}- title={cellTitle()}+ config={cellConfig}+ status={status}+ getEditorView={getEditorView}+ hasOutput={hasOutput}+ hasConsoleOutput={hasConsoleOutput}+ name={name}>- <div- className={className}- id={HTMLId}- ref={cellContainerRef}- data-cell-id={cellId}- data-cell-name={name}+ <SortableCell+ tabIndex={-1}+ ref={cellRef}+ data-status={status}+ onBlur={closeCompletionHandler}+ onKeyDown={resumeCompletionHandler}+ cellId={cellId}+ canMoveX={canMoveX}+ title={cellTitle()}>- {cellOutput === "above" && outputArea}- <div className={cn("tray")} data-hidden={isMarkdownCodeHidden}>- <div className="absolute right-2 -top-4 z-10">- <CellToolbar- edited={edited}- appClosed={appClosed}+ <div+ className={className}+ id={HTMLId}+ ref={cellContainerRef}+ data-cell-id={cellId}+ data-cell-name={name}+ >+ {cellOutput === "above" && outputArea}+ <div className={cn("tray")} data-hidden={isMarkdownCodeHidden}>+ <div className="absolute right-2 -top-4 z-10">+ <CellToolbar+ edited={edited}+ appClosed={appClosed}+ status={status}+ cellConfig={cellConfig}+ needsRun={needsRun}+ hasOutput={hasOutput}+ hasConsoleOutput={hasConsoleOutput}+ cellActionDropdownRef={cellActionDropdownRef}+ cellId={cellId}+ name={name}+ getEditorView={getEditorView}+ onRun={handleRun}+ />+ </div>+ <div+ className={cn(+ "absolute flex flex-col gap-[2px] justify-center h-full left-[-34px] z-20",+ isMarkdownCodeHidden && hasOutputAbove && "-top-7",+ isMarkdownCodeHidden && hasOutputBelow && "-bottom-8",+ isMarkdownCodeHidden &&+ isCellButtonsInline &&+ "-left-[3.8rem]",+ )}+ >+ <CreateCellButton+ tooltipContent={renderShortcut("cell.createAbove")}+ appClosed={appClosed}+ onClick={appClosed ? undefined : createAbove}+ />+ <div className="flex-1" />+ <CreateCellButton+ tooltipContent={renderShortcut("cell.createBelow")}+ appClosed={appClosed}+ onClick={appClosed ? undefined : createBelow}+ />+ </div>+ <CellEditor+ theme={theme}+ showPlaceholder={showPlaceholder}+ allowFocus={allowFocus}+ id={cellId}+ code={code}+ config={cellConfig}status={status}- cellConfig={cellConfig}- needsRun={needsRun}+ serializedEditorState={serializedEditorState}+ runCell={handleRun}+ updateCellCode={updateCellCode}+ setEditorView={(ev) => {+ editorView.current = ev;+ }}+ createNewCell={createNewCell}+ deleteCell={deleteCell}+ focusCell={focusCell}+ moveCell={moveCell}+ moveToNextCell={moveToNextCell}+ updateCellConfig={updateCellConfig}+ clearSerializedEditorState={clearSerializedEditorState}+ userConfig={userConfig}+ editorViewRef={editorView}+ editorViewParentRef={editorViewParentRef}+ hidden={!isCellCodeShown}hasOutput={hasOutput}- hasConsoleOutput={hasConsoleOutput}- cellActionDropdownRef={cellActionDropdownRef}- cellId={cellId}- name={name}- getEditorView={getEditorView}- onRun={handleRun}- />- </div>- <div- className={cn(- "absolute flex flex-col gap-[2px] justify-center h-full left-[-34px] z-20",- isMarkdownCodeHidden && hasOutputAbove && "-top-7",- isMarkdownCodeHidden && hasOutputBelow && "-bottom-8",- isMarkdownCodeHidden && isCellButtonsInline && "-left-[3.8rem]",- )}- >- <CreateCellButton- tooltipContent={renderShortcut("cell.createAbove")}- appClosed={appClosed}- onClick={appClosed ? undefined : createAbove}- />- <div className="flex-1" />- <CreateCellButton- tooltipContent={renderShortcut("cell.createBelow")}- appClosed={appClosed}- onClick={appClosed ? undefined : createBelow}+ temporarilyShowCode={temporarilyShowCode}+ languageAdapter={languageAdapter}+ setLanguageAdapter={setLanguageAdapter}/>+ <div+ className={cn(+ "shoulder-right z-20",+ isMarkdownCodeHidden && cellOutput === "below" && "top-14",+ )}+ >+ {!isCellStatusInline && cellStatusComponent}+ <div className="flex gap-2 items-end">+ <CellDragHandle />+ {isCellStatusInline && cellStatusComponent}+ </div>+ </div>+ <div className="shoulder-bottom hover-action">+ {canDelete && isCellCodeShown && (+ <DeleteButton+ appClosed={appClosed}+ status={status}+ onClick={() => {+ if (!loading && !appClosed) {+ deleteCell({ cellId });+ }+ }}+ />+ )}+ </div></div>- <CellEditor- theme={theme}- showPlaceholder={showPlaceholder}- allowFocus={allowFocus}- id={cellId}- code={code}- config={cellConfig}- status={status}- serializedEditorState={serializedEditorState}- runCell={handleRun}- updateCellCode={updateCellCode}- setEditorView={(ev) => {- editorView.current = ev;+ {cellOutput === "below" && outputArea}+ <ConsoleOutput+ consoleOutputs={consoleOutputs}+ stale={consoleOutputStale}+ cellName={name}+ onRefactorWithAI={handleRefactorWithAI}+ onSubmitDebugger={(text, index) => {+ setStdinResponse({+ cellId,+ response: text,+ outputIndex: index,+ });+ sendStdin({ text });}}- createNewCell={createNewCell}- deleteCell={deleteCell}- focusCell={focusCell}- moveCell={moveCell}- moveToNextCell={moveToNextCell}- updateCellConfig={updateCellConfig}- clearSerializedEditorState={clearSerializedEditorState}- userConfig={userConfig}- editorViewRef={editorView}- editorViewParentRef={editorViewParentRef}- hidden={!isCellCodeShown}- hasOutput={hasOutput}- temporarilyShowCode={temporarilyShowCode}- languageAdapter={languageAdapter}- setLanguageAdapter={setLanguageAdapter}+ cellId={cellId}+ debuggerActive={debuggerActive}/>- <div- className={cn(- "shoulder-right z-20",- isMarkdownCodeHidden && cellOutput === "below" && "top-14",- )}- >- {!isCellStatusInline && cellStatusComponent}- <div className="flex gap-2 items-end">- <CellDragHandle />- {isCellStatusInline && cellStatusComponent}- </div>- </div>- <div className="shoulder-bottom hover-action">- {canDelete && isCellCodeShown && (- <DeleteButton- appClosed={appClosed}- status={status}- onClick={() => {- if (!loading && !appClosed) {- deleteCell({ cellId });- }- }}- />- )}- </div></div>- {cellOutput === "below" && outputArea}- <ConsoleOutput- consoleOutputs={consoleOutputs}- stale={consoleOutputStale}- cellName={name}- onRefactorWithAI={handleRefactorWithAI}- onSubmitDebugger={(text, index) => {- setStdinResponse({ cellId, response: text, outputIndex: index });- sendStdin({ text });- }}- cellId={cellId}- debuggerActive={debuggerActive}- />- </div>- {isCollapsed && (- <CollapsedCellBanner- onClick={() => expandCell({ cellId })}- count={collapseCount}- cellId={cellId}- />- )}- </SortableCell>- </CellActionsContextMenu>+ {isCollapsed && (+ <CollapsedCellBanner+ onClick={() => expandCell({ cellId })}+ count={collapseCount}+ cellId={cellId}+ />+ )}+ </SortableCell>+ </CellActionsContextMenu>+ </TooltipProvider>);};diff --git a/frontend/src/components/editor/cell/CellStatus.tsx b/frontend/src/components/editor/cell/CellStatus.tsxindex 5f99c7f5bc..db40ad2fbd 100644--- a/frontend/src/components/editor/cell/CellStatus.tsx+++ b/frontend/src/components/editor/cell/CellStatus.tsx@@ -83,7 +83,7 @@ export const CellStatusComponent: React.FC<CellStatusComponentProps> = ({{lastRanTime}</div>}- usePortal={false}+ usePortal={true}><divclassName="cell-status-icon cell-status-stale"@@ -109,7 +109,7 @@ export const CellStatusComponent: React.FC<CellStatusComponentProps> = ({{lastRanTime}</div>}- usePortal={false}+ usePortal={true}><divclassName="cell-status-icon cell-status-disabled"@@ -134,7 +134,7 @@ export const CellStatusComponent: React.FC<CellStatusComponentProps> = ({{lastRanTime}</div>}- usePortal={false}+ usePortal={true}><divclassName="cell-status-icon cell-status-stale"@@ -162,7 +162,7 @@ export const CellStatusComponent: React.FC<CellStatusComponentProps> = ({{lastRanTime}</div>}- usePortal={false}+ usePortal={true}><divclassName="cell-status-icon cell-status-stale"@@ -188,7 +188,7 @@ export const CellStatusComponent: React.FC<CellStatusComponentProps> = ({{lastRanTime}</div>}- usePortal={false}+ usePortal={true}><divclassName={"cell-status-icon elapsed-time running"}@@ -213,7 +213,7 @@ export const CellStatusComponent: React.FC<CellStatusComponentProps> = ({{lastRanTime}</div>}- usePortal={false}+ usePortal={true}><divclassName="cell-status-icon cell-status-queued"@@ -257,7 +257,7 @@ export const CellStatusComponent: React.FC<CellStatusComponentProps> = ({return (<div className="cell-status-icon flex items-center gap-2">- <Tooltip content={title} usePortal={false}>+ <Tooltip content={title} usePortal={true}><divclassName="cell-status-stale"data-testid="cell-status"@@ -274,7 +274,7 @@ export const CellStatusComponent: React.FC<CellStatusComponentProps> = ({{lastRanTime}</div>}- usePortal={false}+ usePortal={true}><divclassName={"elapsed-time hover-action"}@@ -304,7 +304,7 @@ export const CellStatusComponent: React.FC<CellStatusComponentProps> = ({{lastRanTime}</div>}- usePortal={false}+ usePortal={true}><divclassName={"cell-status-icon elapsed-time hover-action"}diff --git a/frontend/src/components/editor/columns/cell-column.tsx b/frontend/src/components/editor/columns/cell-column.tsxindex e6a3ad83ce..850f8eef69 100644--- a/frontend/src/components/editor/columns/cell-column.tsx+++ b/frontend/src/components/editor/columns/cell-column.tsx@@ -25,7 +25,7 @@ export const Column = memo((props: Props) => {"flex flex-col gap-5",// box-content is needed so the column is width=contentWidth, but not affected by paddingprops.width === "columns" &&- "w-contentWidth box-content min-h-[100px] border-2 border-t-0 border-[var(--slate-3)] rounded-b-lg px-11 py-6",+ "w-contentWidth box-content min-h-[100px] px-11 py-6",)}>{props.children}