viz: extend main code block to full height (#12944)

This commit is contained in:
qazal
2025-10-27 18:43:49 +08:00
committed by GitHub
parent 273b1f914d
commit e93c9bf6a7
2 changed files with 6 additions and 3 deletions

View File

@@ -241,6 +241,9 @@
max-height: 30vh;
padding: 8px;
}
pre.full-height code.hljs {
max-height: none;
}
#progress-message {
position: absolute;
z-index: 2;

View File

@@ -731,8 +731,8 @@ async function main() {
if (ret.length === 0) return;
renderDag(ret[currentRewrite].graph, ret[currentRewrite].changed_nodes ?? [], currentRewrite === 0);
// ** right sidebar code blocks
metadata.replaceChildren(codeBlock(step.code_line, "python", { loc:step.loc, wrap:true }),
codeBlock(ret[currentRewrite].uop, "python", { wrap:false }));
const codeElement = codeBlock(ret[currentRewrite].uop, "python", { wrap:false });
metadata.replaceChildren(codeBlock(step.code_line, "python", { loc:step.loc, wrap:true }), codeElement);
// ** rewrite steps
if (step.match_count >= 1) {
const rewriteList = metadata.appendChild(document.createElement("div"));
@@ -755,7 +755,7 @@ async function main() {
diffCode.className = "wrap";
}
}
}
} else codeElement.classList.add("full-height");
}
// **** collapse/expand