From d2af3a96117cd8f0e64f2033e3313b53c804326c Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Mon, 18 May 2026 12:05:43 +0200 Subject: [PATCH 1/5] Improve arrow behavior in function details list --- cmd/templates/detailed.html | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/cmd/templates/detailed.html b/cmd/templates/detailed.html index 9a8220a..6fd3b00 100644 --- a/cmd/templates/detailed.html +++ b/cmd/templates/detailed.html @@ -87,6 +87,34 @@ border-left: 5px solid #ff5a2b; } + details summary { + display: flex; + align-items: center; + cursor: pointer; + list-style: none; + } + + details summary::-webkit-details-marker { + display: none; + } + + details summary::before { + content: "▶"; + margin-right: 0.5em; + font-size: 0.85em; + transition: transform 0.2s; + flex-shrink: 0; + } + + details[open] summary::before { + transform: rotate(90deg); + } + + details summary h2 { + display: inline; + margin: 0; + } + @media (prefers-color-scheme: dark) { body { background: #3e3e3e; @@ -102,6 +130,9 @@ .summary .percentage { color: #efefef; } + details summary h2 { + color: #efefef; + } .progress-bar { background: #525252; } From fa40bea394ce7ce4b69f76b73da072a1ed502715 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Mon, 18 May 2026 12:10:41 +0200 Subject: [PATCH 2/5] Center coverage percentage in the progress bar --- cmd/templates/aggregate.html | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/cmd/templates/aggregate.html b/cmd/templates/aggregate.html index bfa7b2c..4895c2a 100644 --- a/cmd/templates/aggregate.html +++ b/cmd/templates/aggregate.html @@ -45,6 +45,7 @@ } .bar { + position: relative; height: 18px; background: #efefef; border-radius: 9px; @@ -54,11 +55,18 @@ .bar-inner { background: #30ba78; height: 100%; - color: #0c322c; + } + + .bar-label { + position: absolute; + top: 0; + left: 0; + width: 100%; text-align: center; + line-height: 18px; font-size: 0.9em; font-weight: bold; - line-height: 18px; + color: #0c322c; } tr:nth-child(even) { @@ -86,6 +94,8 @@ } .bar-inner { background: #008657; + } + .bar-label { color: #efefef; } th { @@ -130,9 +140,8 @@

Total Coverage

{{.CalledCount}}
-
- {{printf "%.1f" .CoveragePct}}% -
+
+ {{printf "%.1f" .CoveragePct}}%
From 3849c1fe2a875604e9d061c50bb3bb9ae46ed3e1 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Mon, 18 May 2026 12:23:38 +0200 Subject: [PATCH 3/5] Unify styles for called and uncalled labels --- cmd/templates/detailed.html | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/cmd/templates/detailed.html b/cmd/templates/detailed.html index 6fd3b00..9f27b6e 100644 --- a/cmd/templates/detailed.html +++ b/cmd/templates/detailed.html @@ -61,8 +61,6 @@ } .function-list li { - padding: 0.6em; - border-radius: 5px; font-family: monospace; white-space: nowrap; overflow: hidden; @@ -75,6 +73,13 @@ box-shadow: 0 2px 4px rgba(0, 0, 0, 0.08); } + .called, + .uncalled { + padding: 0.2em 0.5em; + border-radius: 5px; + margin-right: 0.5em; + } + .called { background: #d4edda; color: #025937; @@ -87,6 +92,12 @@ border-left: 5px solid #ff5a2b; } + .function-list li.called, + .function-list li.uncalled { + padding: 0.6em; + margin-right: 0; + } + details summary { display: flex; align-items: center; From aad533b270afc3b2ec99dfd1709de46cd884c608 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Mon, 18 May 2026 12:31:28 +0200 Subject: [PATCH 4/5] Remove duplicate coverage percentage --- cmd/templates/detailed.html | 44 +++++++++++++++++++++++-------------- 1 file changed, 28 insertions(+), 16 deletions(-) diff --git a/cmd/templates/detailed.html b/cmd/templates/detailed.html index 9f27b6e..e2d16a8 100644 --- a/cmd/templates/detailed.html +++ b/cmd/templates/detailed.html @@ -29,29 +29,39 @@ border: 1px solid #ddd; } - .summary .percentage { - font-size: 1.8em; - font-weight: bold; - color: #0c322c; + .progress-bar-wrap { + display: flex; + align-items: center; + gap: 0.75em; + margin-top: 1em; } .progress-bar { + position: relative; background: #e9ecef; border-radius: 50px; overflow: hidden; - height: 30px; - margin-top: 1em; + height: 25px; + flex: 1; } .progress-bar-inner { background: #30ba78; height: 100%; - color: #fff, text-align: center; - line-height: 30px; - font-weight: bold; transition: width 0.5s; } + .progress-bar-label { + position: absolute; + top: 0; + left: 0; + width: 100%; + text-align: center; + line-height: 25px; + font-weight: bold; + color: #0c322c; + } + .function-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); @@ -138,9 +148,6 @@ background: #1d1d1d; border-color: #525252; } - .summary .percentage { - color: #efefef; - } details summary h2 { color: #efefef; } @@ -150,6 +157,9 @@ .progress-bar-inner { background: #008657; } + .progress-bar-label { + color: #efefef; + } .called { background: #0c322c; color: #c0efde; @@ -172,10 +182,12 @@

Image: {{.ImageName}}

Total Functions: {{.TotalCount}}

Called Functions: {{.CalledCount}}

Uncalled Functions: {{.UncalledCount}}

-

Coverage: {{printf "%.1f" .CoveragePercentage}}%

-
-
{{printf "%.2f" - .CoveragePercentage}}%
+
+ Coverage: +
+
+ {{printf "%.1f" .CoveragePercentage}}% +
From 3229d69ba6bc45e001ad9865a28536cff3202da9 Mon Sep 17 00:00:00 2001 From: Emil Miler Date: Mon, 18 May 2026 12:39:39 +0200 Subject: [PATCH 5/5] Remove bottom border in results table --- cmd/templates/aggregate.html | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cmd/templates/aggregate.html b/cmd/templates/aggregate.html index 4895c2a..27a658f 100644 --- a/cmd/templates/aggregate.html +++ b/cmd/templates/aggregate.html @@ -30,12 +30,11 @@ th, td { padding: 0.7em 1em; - border-bottom: 1px solid #ddd; text-align: left; } th { - background: #f4f4f4; + background: #efefef; cursor: pointer; user-select: none; } @@ -70,7 +69,7 @@ } tr:nth-child(even) { - background-color: #f9f9f9; + background-color: #fafafa; } th.sort-asc::after {