From 356e8e726bd69347c174a83513c0261e9402e225 Mon Sep 17 00:00:00 2001 From: Brian Love Date: Wed, 8 Jul 2026 21:06:00 -0700 Subject: [PATCH] docs: clarify markdown table renderer overrides --- apps/website/content/docs/chat/guides/markdown.mdx | 4 ++++ .../markdown/views/markdown-table.component.spec.ts | 10 +--------- 2 files changed, 5 insertions(+), 9 deletions(-) diff --git a/apps/website/content/docs/chat/guides/markdown.mdx b/apps/website/content/docs/chat/guides/markdown.mdx index 2c616fac7..713714179 100644 --- a/apps/website/content/docs/chat/guides/markdown.mdx +++ b/apps/website/content/docs/chat/guides/markdown.mdx @@ -195,6 +195,10 @@ The most common mistake is providing `'code'` as an override key — it does not | `'table-row'` | Table row (``) | | `'table-cell'` | Table header or data cell (`` / ``) | + +The built-in `'table'` renderer emits native ``, ``, and `` elements directly so streamed rows stay attached to the same browser table. Override the `'table'` key when you need to change the built-in table structure. The `'table-row'` and `'table-cell'` keys remain available for custom renderers or direct row/cell rendering, but the default table renderer does not dispatch its child rows through those registry entries. + + ## Theming Markdown Components All built-in markdown view components consume the same `--tplane-chat-*` and `--a2ui-*` CSS custom properties as the rest of the chat UI. No extra tokens are needed — changing the active theme automatically re-styles markdown output. See the [chat theming guide](/docs/chat/guides/theming) for the full token reference. diff --git a/libs/chat/src/lib/markdown/views/markdown-table.component.spec.ts b/libs/chat/src/lib/markdown/views/markdown-table.component.spec.ts index 335e9e6ad..757a68dbd 100644 --- a/libs/chat/src/lib/markdown/views/markdown-table.component.spec.ts +++ b/libs/chat/src/lib/markdown/views/markdown-table.component.spec.ts @@ -6,8 +6,6 @@ import { Component, signal } from '@angular/core'; import { views } from '@threadplane/render'; import type { MarkdownTableCellNode, MarkdownTableNode, MarkdownTableRowNode } from '@cacheplane/partial-markdown'; import { MarkdownTableComponent } from './markdown-table.component'; -import { MarkdownTableRowComponent } from './markdown-table-row.component'; -import { MarkdownTableCellComponent } from './markdown-table-cell.component'; import { MARKDOWN_VIEW_REGISTRY } from '../markdown-view-registry'; function makeTableNode(overrides: Partial = {}): MarkdownTableNode { @@ -55,13 +53,7 @@ describe('MarkdownTableComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [HostComponent], - providers: [{ - provide: MARKDOWN_VIEW_REGISTRY, - useValue: views({ - 'table-row': MarkdownTableRowComponent, - 'table-cell': MarkdownTableCellComponent, - }), - }], + providers: [{ provide: MARKDOWN_VIEW_REGISTRY, useValue: views({}) }], }); });