feat(editor): bump HTML iframe preview default height to 480px (MUL-2419) (#2842)

320px was too cramped for typical rendered HTML (charts, dashboards,
formatted documents). Matches the existing HTML attachment preview
height for visual consistency across both iframe surfaces.

Co-authored-by: Lambda <lambda@multica.ai>
Co-authored-by: multica-agent <github@multica.ai>
This commit is contained in:
Jiayuan Zhang
2026-05-19 19:15:03 +02:00
committed by GitHub
parent 591e47842d
commit 044f7f0cc6
3 changed files with 4 additions and 4 deletions

View File

@@ -29,7 +29,7 @@ interface CodeBlockIframeProps {
/** Iframe title for accessibility. */
title: string;
className?: string;
/** Tailwind height token; defaults to h-[320px]. */
/** Tailwind height token; defaults to h-[480px]. */
heightClassName?: string;
}
@@ -37,7 +37,7 @@ export function CodeBlockIframe({
html,
title,
className,
heightClassName = "h-[320px]",
heightClassName = "h-[480px]",
}: CodeBlockIframeProps) {
return (
<iframe

View File

@@ -18,7 +18,7 @@ import { CodeBlockIframe } from "../code-block-iframe";
// keystroke causes the iframe to re-load and flicker.
const PREVIEW_DEBOUNCE_MS = 200;
const HTML_PREVIEW_HEIGHT = "h-[320px]";
const HTML_PREVIEW_HEIGHT = "h-[480px]";
function useDebouncedValue<T>(value: T, delayMs: number): T {
const [debounced, setDebounced] = useState(value);

View File

@@ -22,7 +22,7 @@ import { useT } from "../i18n";
import { CodeBlockIframe } from "./code-block-iframe";
import { CodeBlockStatic } from "./code-block-static";
const CODE_BLOCK_IFRAME_HEIGHT = "h-[320px]";
const CODE_BLOCK_IFRAME_HEIGHT = "h-[480px]";
// Label shown in the code-block header. Not a translatable string — it's a
// language identifier (matches the `lang === "html"` token below).