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
adjust styles for table (#8963)
Shahmir Varqha6ca62c810f85
diff --git a/frontend/src/components/data-table/TableBottomBar.tsx b/frontend/src/components/data-table/TableBottomBar.tsxindex 8b8a0aaecc..695aff8d63 100644--- a/frontend/src/components/data-table/TableBottomBar.tsx+++ b/frontend/src/components/data-table/TableBottomBar.tsx@@ -4,6 +4,7 @@import type { RowSelectionState, Table } from "@tanstack/react-table";import { useLocale } from "react-aria";import type { GetRowIds } from "@/plugins/impl/DataTablePlugin";+import { cn } from "@/utils/cn";import { Events } from "@/utils/events";import { prettyNumber } from "@/utils/numbers";import { Button } from "../ui/button";@@ -22,6 +23,7 @@ interface TableBottomBarProps<TData> {showPageSizeSelector?: boolean;tableLoading?: boolean;part?: string;+ className?: string;}export const TableBottomBar = <TData,>({@@ -34,6 +36,7 @@ export const TableBottomBar = <TData,>({showPageSizeSelector,tableLoading,part,+ className,}: TableBottomBarProps<TData>) => {const { locale } = useLocale();const handleSelectAllRows = (value: boolean) => {@@ -147,7 +150,10 @@ export const TableBottomBar = <TData,>({return (<divpart={part}- className="flex lg:grid lg:grid-cols-[1fr_auto_1fr] items-center shrink-0 pt-1"+ className={cn(+ "flex lg:grid lg:grid-cols-[1fr_auto_1fr] items-center shrink-0",+ className,+ )}><div className="flex flex-col text-sm text-muted-foreground px-2 shrink-0"><div className="flex items-center gap-1">{renderTotal()}</div>diff --git a/frontend/src/components/data-table/TableTopBar.tsx b/frontend/src/components/data-table/TableTopBar.tsxindex 941fb95460..048d98b84d 100644--- a/frontend/src/components/data-table/TableTopBar.tsx+++ b/frontend/src/components/data-table/TableTopBar.tsx@@ -69,43 +69,39 @@ export const TableTopBar: React.FC<TableTopBarProps> = ({}return (- <div className="flex items-center h-10 px-2 border-b gap-3">- {/* always-visible search */}+ <div className="flex items-center h-10 px-2 border-b gap-2">{onSearchQueryChange && enableSearch && (- <div className="flex items-center">- <div className="flex items-center gap-1 rounded-full border px-2 w-56">- <SearchIcon className="w-4 h-4 text-muted-foreground shrink-0" />- <input- ref={inputRef}- type="text"- className="h-6 border-none bg-transparent focus:outline-hidden text-sm w-full min-w-0"- value={internalValue}- onKeyDown={(e) => {- if (e.key === "Escape") {- setInternalValue("");- inputRef.current?.blur();- }- }}- onChange={(e) => setInternalValue(e.target.value)}- placeholder="Search..."- />- {reloading && <Spinner size="small" />}- {internalValue && (- <Button- variant="text"- size="xs"- className="h-5 w-5 p-0 shrink-0"- onClick={() => setInternalValue("")}- >- <XIcon className="w-3 h-3 text-muted-foreground" />- </Button>- )}- </div>+ <div className="flex flex-1 items-center gap-1 px-2 rounded-sm focus-within:ring-1 focus-within:ring-border transition-shadow">+ <SearchIcon className="w-4 h-4 text-muted-foreground shrink-0" />+ <input+ ref={inputRef}+ type="text"+ className="h-6 border-none bg-transparent focus:outline-hidden text-sm w-full min-w-0"+ value={internalValue}+ onKeyDown={(e) => {+ if (e.key === "Escape") {+ setInternalValue("");+ inputRef.current?.blur();+ }+ }}+ onChange={(e) => setInternalValue(e.target.value)}+ placeholder="Search..."+ />+ {reloading && <Spinner size="small" />}+ {internalValue && (+ <Button+ variant="text"+ size="xs"+ className="h-5 w-5 p-0 shrink-0"+ onClick={() => setInternalValue("")}+ >+ <XIcon className="w-3 h-3 text-muted-foreground" />+ </Button>+ )}</div>)}- {/* actions grouped together */}- <div className="flex items-center gap-1 shrink-0">+ <div className="flex items-center shrink-0">{showChartBuilder && (<Buttonvariant="text"@@ -117,7 +113,7 @@ export const TableTopBar: React.FC<TableTopBarProps> = ({onClick={toggleDisplayHeader}><ChartSplineIcon className="w-3.5 h-3.5" />- Chart Builder+ Visualize</Button>)}{showTableExplorer && togglePanel && (@@ -131,7 +127,7 @@ export const TableTopBar: React.FC<TableTopBarProps> = ({onClick={() => togglePanel(PANEL_TYPES.ROW_VIEWER)}><PanelRightIcon className="w-3.5 h-3.5" />- Table Explorer+ Explorer</Button>)}{downloadAs && <ExportMenu downloadAs={downloadAs} />}diff --git a/frontend/src/components/data-table/column-explorer-panel/column-explorer.tsx b/frontend/src/components/data-table/column-explorer-panel/column-explorer.tsxindex deceb030ea..a6ae51dee9 100644--- a/frontend/src/components/data-table/column-explorer-panel/column-explorer.tsx+++ b/frontend/src/components/data-table/column-explorer-panel/column-explorer.tsx@@ -72,7 +72,7 @@ export const ColumnExplorerPanel = ({});return (- <div className="mt-5 mb-3">+ <div className="mb-3"><span className="text-xs font-semibold ml-2 flex">{prettifyRowColumnCount(totalRows, totalColumns, locale)}<CopyClipboardIcondiff --git a/frontend/src/components/data-table/data-table.tsx b/frontend/src/components/data-table/data-table.tsxindex f726a66345..fd09ecf52f 100644--- a/frontend/src/components/data-table/data-table.tsx+++ b/frontend/src/components/data-table/data-table.tsx@@ -317,6 +317,7 @@ const DataTableInternal = <TData,>({</div><TableBottomBarpart="table-footer"+ className="border-t border-border pt-1.5 pb-0.5"totalColumns={totalColumns}pagination={pagination}selection={selection}diff --git a/frontend/src/components/data-table/range-focus/cell-selection-stats.tsx b/frontend/src/components/data-table/range-focus/cell-selection-stats.tsxindex 36fd19a41f..bd61ebc1f5 100644--- a/frontend/src/components/data-table/range-focus/cell-selection-stats.tsx+++ b/frontend/src/components/data-table/range-focus/cell-selection-stats.tsx@@ -34,7 +34,9 @@ export const CellSelectionStats = <TData,>({if (dataCellCount < 2) {return (<Tooltip content="Select multiple cells to see stats">- <span className={cn("text-sm text-muted-foreground italic", className)}>+ <span+ className={cn("text-xs text-muted-foreground/80 italic", className)}+ >No selection</span></Tooltip>diff --git a/frontend/src/components/data-table/row-viewer-panel/row-viewer.tsx b/frontend/src/components/data-table/row-viewer-panel/row-viewer.tsxindex 8a202ed947..e701027638 100644--- a/frontend/src/components/data-table/row-viewer-panel/row-viewer.tsx+++ b/frontend/src/components/data-table/row-viewer-panel/row-viewer.tsx@@ -247,7 +247,7 @@ export const RowViewerPanel: React.FC<RowViewerPanelProps> = ({return (<div- className="flex flex-col gap-3 mt-4 focus:outline-hidden"+ className="flex flex-col gap-3 focus:outline-hidden"ref={panelRef}tabIndex={-1}onKeyDown={handleKeyDown}diff --git a/frontend/src/components/data-table/table-explorer-panel/table-explorer-panel.tsx b/frontend/src/components/data-table/table-explorer-panel/table-explorer-panel.tsxindex d3bb0ab79f..ed86a30e29 100644--- a/frontend/src/components/data-table/table-explorer-panel/table-explorer-panel.tsx+++ b/frontend/src/components/data-table/table-explorer-panel/table-explorer-panel.tsx@@ -42,7 +42,7 @@ export interface TableExplorerPanelProps {}const tabTriggerClassName =- "text-xs uppercase tracking-wide font-semibold cursor-pointer transition-colors";+ "text-[13px] uppercase tracking-wide font-semibold cursor-pointer transition-colors";const activeClassName = "text-primary";const inactiveClassName = "hover:text-foreground";@@ -110,7 +110,7 @@ export const TableExplorerPanel: React.FC<TableExplorerPanelProps> = ({<Tabsvalue={resolvedTab}onValueChange={(value) => onTabChange(value as PanelType)}- className="h-full flex flex-col min-w-[350px]"+ className="flex flex-col min-w-[350px]"><Fill name={SlotNames.CONTEXT_AWARE_PANEL_HEADER}><div className="flex items-center gap-1">diff --git a/frontend/src/components/editor/chrome/panels/context-aware-panel/context-aware-panel.tsx b/frontend/src/components/editor/chrome/panels/context-aware-panel/context-aware-panel.tsxindex 7b1078965c..1aac027641 100644--- a/frontend/src/components/editor/chrome/panels/context-aware-panel/context-aware-panel.tsx+++ b/frontend/src/components/editor/chrome/panels/context-aware-panel/context-aware-panel.tsx@@ -101,7 +101,7 @@ export const ContextAwarePanel: React.FC = () => {const renderBody = () => {return (<div className="pb-7 mb-4 h-full overflow-auto">- <div className="p-3 border-b flex justify-between items-center">+ <div className="px-3 py-2 border-b flex justify-between items-center">{renderModeToggle()}<Slot name={SlotNames.CONTEXT_AWARE_PANEL_HEADER} /><Button