Repository navigation
feat(Markdown, CodeBlock): contentWidth, collapsible code blocks, compact header - #1289
Merged
Merged
Conversation
Contributor
PR Analysis Report📚 Storybook PreviewView Storybook for this PR 🧪 Sandbox PreviewView Sandbox for this PR Modified ComponentsCodeBlock · View in Storybook
Markdown · View in Storybook
Bundle Size Summary
Accessibility AuditStatus: 3 accessibility violation(s) found — 1 critical, 2 serious. XDSCodeBlock - 1 issue(s)
XDSMarkdown - 2 issue(s)
Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
cixzhang
force-pushed
the
navi/feat/markdown-nits
branch
4 times, most recently
from
April 11, 2026 22:35
8dd7457 to
8feca7d
Compare
… line numbers CodeBlock: - Without line numbers: compact header padding, no border-bottom divider - With line numbers: unchanged (full padding + divider) Markdown: - New contentWidth prop — constrains prose content (paragraphs, headings, lists, blockquotes) to a readable width while tables and code blocks expand to the full container width - Uses CSS custom property (--xds-markdown-content-width) so it works without wrapper elements
cixzhang
force-pushed
the
navi/feat/markdown-nits
branch
from
April 11, 2026 22:49
8feca7d to
1688b2d
Compare
cixzhang
enabled auto-merge (squash)
April 11, 2026 22:51
josephfarina
added a commit
that referenced
this pull request
Apr 12, 2026
…ix Chat @example Found during Night Watch doc review (2026-04-12). - Fix XDSChatTokenizedText @example: remove blank lines and JS comments inside code block (reintroduced by #1249) - Add xds-chat-layout theming target to Chat.doc.mjs (new in #1249) - Add missing Markdown props: contentWidth, contentAlign, sources, citationStyle (from #1289, #1290) - Add missing CodeBlock props: isCollapsible, collapsibleThreshold - Add Thumbnail theming section (xds-thumbnail target) - Add Thumbnail common props: xstyle, className, style, data-testid - Add Thumbnail docsZh and docsDense translations - Add Thumbnail accessibility section Co-authored-by: Navi <[email protected]>
4 tasks done
cixzhang
added a commit
that referenced
this pull request
Apr 26, 2026
… line numbers (#1289) CodeBlock: - Without line numbers: compact header padding, no border-bottom divider - With line numbers: unchanged (full padding + divider) Markdown: - New contentWidth prop — constrains prose content (paragraphs, headings, lists, blockquotes) to a readable width while tables and code blocks expand to the full container width - Uses CSS custom property (--xds-markdown-content-width) so it works without wrapper elements Co-authored-by: Navi <[email protected]>
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
… line numbers (#1289) CodeBlock: - Without line numbers: compact header padding, no border-bottom divider - With line numbers: unchanged (full padding + divider) Markdown: - New contentWidth prop — constrains prose content (paragraphs, headings, lists, blockquotes) to a readable width while tables and code blocks expand to the full container width - Uses CSS custom property (--xds-markdown-content-width) so it works without wrapper elements Co-authored-by: Navi <[email protected]>
cixzhang
added a commit
that referenced
this pull request
Jun 21, 2026
… line numbers (#1289) CodeBlock: - Without line numbers: compact header padding, no border-bottom divider - With line numbers: unchanged (full padding + divider) Markdown: - New contentWidth prop — constrains prose content (paragraphs, headings, lists, blockquotes) to a readable width while tables and code blocks expand to the full container width - Uses CSS custom property (--xds-markdown-content-width) so it works without wrapper elements
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
Markdown
contentWidthprop (default: 680px) — constrains prose content (paragraphs, headings, lists, blockquotes) to a readable line width. Tables and code blocks expand to full container width.width: auto,min-width: contentWidth(dynamic),max-width: 100%isCollapsibleinstead ofmaxHeightCodeBlock
isCollapsibleprop withcollapsibleThreshold(default: 10 lines). Starts expanded; header becomes clickable to collapse the code body into just the header bar. Usesgrid-template-rowsanimation (same pattern as ToolCalls, SideNav, Attachments).<title> — <language>(filename first)XDSIcon chevronDown, matches ToolCalls convention (down = expanded, up = collapsed)marginInlineEnd: -8pxfor optical alignmentisolation: isolateon root for stacking contextReverted (for later)