fix(base): match inline-embed placeholder skeleton to seeded 3 col / 1 row shape

The placeholder rendered a default 10×6 BaseTableSkeleton while
waiting on the create-base API, then swapped to the real table once
the response landed. Because the inline-embed flow now seeds
Title + Text 1 + Text 2 with one default row, the real table is 3×1
— the swap visibly collapsed a large fake table down to a small
empty one. The scroll didn't jump (initialOffset takes care of that)
but the flicker was jarring.

Re-introduce rows + columns props on BaseTableSkeleton (default still
10 / 6 so other call sites are unaffected) and pass rows=1 columns=3
from the inline-embed placeholder so the swap is visually stable.
This commit is contained in:
Philipinho
2026-04-28 11:34:08 +01:00
parent dac65914ed
commit edc7143f77
2 changed files with 27 additions and 11 deletions
@@ -74,9 +74,12 @@ export function BaseEmbedView({ node }: NodeViewProps) {
let content: React.ReactNode;
if (pendingKey) {
// Slash command inserted the embed and is awaiting the server's
// assigned pageId — render the same skeleton BaseTable shows
// during its own initial load so the swap is visually a no-op.
content = <BaseTableSkeleton />;
// assigned pageId. Match the shape the create endpoint will
// return for an inline-embed (Title + Text 1 + Text 2, one
// empty row — see BaseService.create's `defaults`) so the swap
// to the real table doesn't visibly collapse a large fake table
// down to a small empty one.
content = <BaseTableSkeleton rows={1} columns={3} />;
} else if (!pageId) {
content = (
<Box p="md">