HTML export should contain expandable tables
The LINQPad output window allows tables to be collapsed/expanded. Especially in nested tables this is very useful. Having everything expanded makes it difficult to read the tables.
The HTML export should have the same expand/collapse feature.
Both the export from LINQPad GUI as well as LPRun html should accept two different dump levels. One for the actual data and one for the default expand level when the html file is loaded into browser.
-
Anonymous commented
I just add a simple script like this to the bottom of the body of the exported HTML document. Maybe LINQPad could do the same?
<script>
const triangleUp = "\u25B2";
const triangleDown = "\u25BC";for (const typeheader of document.getElementsByClassName("typeheader")) {
const arrow = document.createElement("span");
arrow.style.cursor = "pointer";
arrow.style.marginRight = "0.2em";
arrow.innerText = triangleUp;const row = typeheader.parentNode;
arrow.onclick = () => {
[].slice.call(row.parentNode.childNodes, 1).forEach(e => e.style.display = (e.style.display == "none" ? "table-row" : "none"));
arrow.innerText = (arrow.innerText == triangleUp ? triangleDown : triangleUp);
}typeheader.prepend(arrow);
}
</script>