- Tiptap Node extension (database-view) with attrs tableId/viewId/viewType/bridgeUrl - NodeViewWrapper dispatches on viewType: grid/table -> TableRenderer, other -> PlaceholderRenderer - TableRenderer (HTML table, TanStack Table v8 migration-ready - dep not yet installed) - InsertDatabaseModal (Mantine, 2-step: table -> view selection) - useDatabaseRealtimeUpdates SSE hook (EventSource + exponential backoff + React Query invalidation) - bridge-client.ts (axios wrapper, per-origin singleton, cookie Bearer passthrough) - Slash command /database registered in menu-items CommandGroups - DatabaseViewExtension wired in mainExtensions array - i18n: 22 keys added in en-US and fr-FR - 41 Vitest tests across 5 suites (extension schema, component dispatch, renderer states, modal steps, SSE hook) Upstream patches: extensions.ts (+2 lines), menu-items.ts (+4 lines), 2 translation files Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
27 lines
815 B
TypeScript
27 lines
815 B
TypeScript
import { Text, Stack, ThemeIcon } from "@mantine/core";
|
|
import { IconTableOff } from "@tabler/icons-react";
|
|
import { useTranslation } from "react-i18next";
|
|
import type { ViewType } from "../types/database-view.types";
|
|
|
|
interface PlaceholderRendererProps {
|
|
viewType: ViewType;
|
|
}
|
|
|
|
/**
|
|
* Displayed for viewType values not yet implemented (kanban, calendar).
|
|
* These renderers arrive in R3.1.d.
|
|
*/
|
|
export function PlaceholderRenderer({ viewType }: PlaceholderRendererProps) {
|
|
const { t } = useTranslation();
|
|
|
|
return (
|
|
<Stack align="center" py="xl" gap="xs">
|
|
<ThemeIcon variant="light" color="gray" size="lg">
|
|
<IconTableOff size={20} />
|
|
</ThemeIcon>
|
|
<Text size="sm" c="dimmed">
|
|
{t("database_view.placeholder.not_supported", { viewType })}
|
|
</Text>
|
|
</Stack>
|
|
);
|
|
}
|