You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maka.apache.org by as...@apache.org on 2026/09/14 05:21:51 UTC

(maka) branch fix/transcript-viewport-mounting updated: perf(ui): use span highlighting for transcript code blocks

This is an automated email from the ASF dual-hosted git repository.

Astro-Han pushed a commit to branch fix/transcript-viewport-mounting
in repository https://gitbox.apache.org/repos/asf/maka.git


The following commit(s) were added to refs/heads/fix/transcript-viewport-mounting by this push:
     new 82d807be88 perf(ui): use span highlighting for transcript code blocks
82d807be88 is described below

commit 82d807be88dd3383398b381133ee8d8260bd961a
Author: AstroHan <le...@outlook.com>
AuthorDate: Mon Sep 14 13:21:39 2026 +0800

    perf(ui): use span highlighting for transcript code blocks
---
 packages/ui/src/markdown-body.tsx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/packages/ui/src/markdown-body.tsx b/packages/ui/src/markdown-body.tsx
index 2f3afdda3e..2fd5a8c14d 100644
--- a/packages/ui/src/markdown-body.tsx
+++ b/packages/ui/src/markdown-body.tsx
@@ -252,6 +252,9 @@ function MarkdownCode(props: {
       <CodeBlock
         code={props.code}
         language={props.language}
+        // Span highlighting avoids the higher CSS Highlight paint cost during
+        // transcript scrolling, including when virtualized code blocks remount.
+        highlightMode="spans"
         // Markdown fences are block content. Astryx defaults to fit-content
         // with a 400px floor, which leaves short-code fences visibly narrow
         // even when the surrounding transcript has room to stay readable.


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@maka.apache.org
For additional commands, e-mail: commits-help@maka.apache.org