This commit is contained in:
Waleed Latif
2026-03-05 19:38:51 -08:00
parent 4735245c8f
commit ff4b2f8c6a
5 changed files with 22 additions and 24 deletions

View File

@@ -42,7 +42,13 @@ export function CellRenderer({
}}
>
<span className={boolValue ? 'text-green-500' : 'text-[var(--text-tertiary)]'}>
{isNull ? <span className='text-[var(--text-muted)] italic'></span> : boolValue ? 'true' : 'false'}
{isNull ? (
<span className='text-[var(--text-muted)] italic'></span>
) : boolValue ? (
'true'
) : (
'false'
)}
</span>
</button>
)
@@ -51,7 +57,7 @@ export function CellRenderer({
if (isNull) {
return (
<span
className='text-[var(--text-muted)] italic cursor-text'
className='cursor-text text-[var(--text-muted)] italic'
onDoubleClick={(e) => {
e.stopPropagation()
onDoubleClick()
@@ -88,7 +94,7 @@ export function CellRenderer({
if (column.type === 'number') {
return (
<span
className='font-mono text-[12px] text-[var(--text-secondary)] cursor-text'
className='cursor-text font-mono text-[12px] text-[var(--text-secondary)]'
onDoubleClick={(e) => {
e.stopPropagation()
onDoubleClick()
@@ -123,7 +129,7 @@ export function CellRenderer({
} catch {
return (
<span
className='text-[var(--text-primary)] cursor-text'
className='cursor-text text-[var(--text-primary)]'
onDoubleClick={(e) => {
e.stopPropagation()
onDoubleClick()
@@ -160,7 +166,7 @@ export function CellRenderer({
return (
<span
className='text-[var(--text-primary)] cursor-text'
className='cursor-text text-[var(--text-primary)]'
onDoubleClick={(e) => {
e.stopPropagation()
onDoubleClick()

View File

@@ -57,7 +57,7 @@ export function InlineCellEditor({ value, column, onSave, onCancel }: InlineCell
onChange={(e) => setDraft(e.target.value)}
onKeyDown={handleKeyDown}
onBlur={handleSave}
className='h-full w-full border-none bg-transparent text-[13px] text-[var(--text-primary)] outline-none ring-1 ring-[var(--accent)] ring-inset rounded-[2px] px-[4px] py-[2px]'
className='h-full w-full rounded-[2px] border-none bg-transparent px-[4px] py-[2px] text-[13px] text-[var(--text-primary)] outline-none ring-1 ring-[var(--accent)] ring-inset'
/>
)
}

View File

@@ -34,18 +34,11 @@ export const TableRowCells = React.memo(function TableRowCells({
}: TableRowCellsProps) {
return (
<TableRow
className={cn(
'group hover:bg-[var(--surface-4)]',
isSelected && 'bg-[var(--surface-5)]'
)}
className={cn('group hover:bg-[var(--surface-4)]', isSelected && 'bg-[var(--surface-5)]')}
onContextMenu={(e) => onContextMenu(e, row)}
>
<TableCell>
<Checkbox
size='sm'
checked={isSelected}
onCheckedChange={() => onSelectRow(row.id)}
/>
<Checkbox size='sm' checked={isSelected} onCheckedChange={() => onSelectRow(row.id)} />
</TableCell>
{columns.map((column) => (
<TableCell key={column.name}>

View File

@@ -11,8 +11,8 @@ import {
TableHeader,
TableRow,
} from '@/components/emcn'
import { useUpdateTableRow } from '@/hooks/queries/tables'
import type { TableRow as TableRowType } from '@/lib/table'
import { useUpdateTableRow } from '@/hooks/queries/tables'
import { useContextMenu, useRowSelection, useTableData } from '../hooks'
import type { CellViewerData, EditingCell, QueryOptions } from '../lib/types'
import { ActionBar } from './action-bar'
@@ -60,8 +60,11 @@ export function TableViewer() {
const { selectedRows, handleSelectAll, handleSelectRow, clearSelection } = useRowSelection(rows)
const { contextMenu, handleRowContextMenu: baseHandleRowContextMenu, closeContextMenu } =
useContextMenu()
const {
contextMenu,
handleRowContextMenu: baseHandleRowContextMenu,
closeContextMenu,
} = useContextMenu()
const updateRowMutation = useUpdateTableRow({ workspaceId, tableId })
@@ -278,9 +281,7 @@ export function TableViewer() {
row={row}
columns={columns}
isSelected={selectedRows.has(row.id)}
editingColumnName={
editingCell?.rowId === row.id ? editingCell.columnName : null
}
editingColumnName={editingCell?.rowId === row.id ? editingCell.columnName : null}
onCellClick={handleCellClick}
onDoubleClick={handleCellDoubleClick}
onSave={handleInlineSave}

View File

@@ -178,9 +178,7 @@ export const googleDocsConnector: ConnectorConfig = {
oauth: {
required: true,
provider: 'google-docs',
requiredScopes: [
'https://www.googleapis.com/auth/drive',
],
requiredScopes: ['https://www.googleapis.com/auth/drive'],
},
configFields: [