From b4a5d4c112174c7075f166017b467f8c2a3a8034 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Thu, 28 Nov 2024 13:07:12 -0500 Subject: [PATCH 1/2] Send Google Analytics Page Views on Single Page App history changes. --- invert-gradle-plugin/src/main/resources/META-INF/invert.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/invert-gradle-plugin/src/main/resources/META-INF/invert.js b/invert-gradle-plugin/src/main/resources/META-INF/invert.js index 7d54fe0..93ea637 100644 --- a/invert-gradle-plugin/src/main/resources/META-INF/invert.js +++ b/invert-gradle-plugin/src/main/resources/META-INF/invert.js @@ -80,7 +80,7 @@ window.render3dGraph = function (domElementId, graphDataJson, width, height) { // https://www.chartjs.org/docs/latest/getting-started/ window.renderChartJs = function (domElementId, graphDataJson, onClick) { - if (window.ForceGraph == undefined) { + if (window.Chart === undefined) { loadJsFileAsync("https://cdn.jsdelivr.net/npm/chart.js", function (obj) { const chartJsData = JSON.parse(graphDataJson) const ctx = document.getElementById(domElementId); @@ -92,7 +92,6 @@ window.renderChartJs = function (domElementId, graphDataJson, onClick) { onClick(label, value) } } - // chartJsData['type']='bar' chartJsData['options']['indexAxis'] = 'y' new Chart(ctx, chartJsData); }); From 73f334274ec97f036c132bfcbba0824d0655e630 Mon Sep 17 00:00:00 2001 From: Sam Edwards Date: Sat, 30 Nov 2024 14:51:09 -0500 Subject: [PATCH 2/2] WIP - Table Formatting --- .../jsMain/kotlin/ui/BootstrapComposables.kt | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/invert-report/src/jsMain/kotlin/ui/BootstrapComposables.kt b/invert-report/src/jsMain/kotlin/ui/BootstrapComposables.kt index 0bd6503..ca8ddc2 100644 --- a/invert-report/src/jsMain/kotlin/ui/BootstrapComposables.kt +++ b/invert-report/src/jsMain/kotlin/ui/BootstrapComposables.kt @@ -177,6 +177,18 @@ fun BootstrapTableRow( }) { cellValues.forEachIndexed { idx, cellValue -> Td({ + style { +// property("max-width", "350px") + +// property("word-wrap", "break-word") +// property("white-space", "normal") +// property("white-space", "nowrap") + if (!cellValue.startsWith("```")) { + property("word-break", "break-all") // Don't allow wrapping for code references + } +// property("overflow", "hidden") + } +// max-width: 150px; /* Set a maximum width for the cells */ if (idx == 0) { onClicked?.let { onClick { onClicked(idx) } @@ -235,6 +247,19 @@ fun BootstrapTable( var maxNumberOfRows by remember { mutableStateOf(maxResultsLimitConstant) } Table({ classes("table table-bordered table-striped table-hover table-sm".split(" ")) + style { + property("font-size", "0.6rem") +// : ; +// -overflow: ellipsis; +// white-space: nowrap; /* Prevents wrapping */ +// max-width: 150px; /* Set a maximum width for the cells */ +// : ; /* Adjust to make text smaller */ +// property("transform", "scale(0.7)") +// property("transform-origin", "top left") +// property("width", "100%") +// transform: scale(0.9); /* Adjust the scale factor as needed */ +// transform-origin: top left; /* Keeps the table aligned to its original position */ + } }) { var sortIdx by remember { mutableStateOf(sortByColumn) } var ascending by remember { mutableStateOf(sortAscending) }