From 2acd51439b141af346d4103f0ed12d0726714713 Mon Sep 17 00:00:00 2001 From: poonam <223526221+poonambhagaur61-tech@users.noreply.github.com> Date: Sat, 12 Sep 2026 11:34:52 +0530 Subject: [PATCH 1/9] Add sorting to Skunk HTML report --- .../html/templates/skunk_overview.html.erb | 81 ++++++++++++++++--- 1 file changed, 72 insertions(+), 9 deletions(-) diff --git a/lib/skunk/generators/html/templates/skunk_overview.html.erb b/lib/skunk/generators/html/templates/skunk_overview.html.erb index cee421a..bf9dc2a 100644 --- a/lib/skunk/generators/html/templates/skunk_overview.html.erb +++ b/lib/skunk/generators/html/templates/skunk_overview.html.erb @@ -195,6 +195,29 @@ font-weight: bold; } + /* Sortable Table Headers */ + .table-header { + cursor: pointer; + user-select: none; + } + + .table-header:hover { + text-decoration: underline; + } + + .sort-type { + display: inline-block; + margin-left: 0.4rem; + } + + .table-header-asc::after { + content: " ▲"; + } + + .table-header-desc::after { + content: " ▼"; + } + /* Mobile Card Layout */ @media screen and (max-width: 800px) { .skunk-results thead { @@ -257,15 +280,15 @@

Skunk Analysis

- +
- - - - - - + + + + + + @@ -279,7 +302,7 @@ <%= item.skunk_score %> - + From 58b266fdb577579559eb63ad8277d59ce98ffb13 Mon Sep 17 00:00:00 2001 From: poonam <223526221+poonambhagaur61-tech@users.noreply.github.com> Date: Wed, 23 Sep 2026 20:15:42 +0530 Subject: [PATCH 3/9] Update lib/skunk/generators/html/templates/skunk_overview.html.erb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Juan Vásquez --- lib/skunk/generators/html/templates/skunk_overview.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/skunk/generators/html/templates/skunk_overview.html.erb b/lib/skunk/generators/html/templates/skunk_overview.html.erb index 026a10c..b3c5c1a 100644 --- a/lib/skunk/generators/html/templates/skunk_overview.html.erb +++ b/lib/skunk/generators/html/templates/skunk_overview.html.erb @@ -358,7 +358,7 @@ otherHeader.classList.remove("active", "table-header-asc", "table-header-desc"); }); - header.classList.add("active", ascending ? "table-header-asc" : "table-header-desc"); + header.classList.add(ascending ? "table-header-asc" : "table-header-desc"); rows .sort((rowA, rowB) => compareRows(rowA, rowB, columnIndex, ascending)) From c4eb72e257fc65fea9127b45906136676995efd5 Mon Sep 17 00:00:00 2001 From: poonam <223526221+poonambhagaur61-tech@users.noreply.github.com> Date: Wed, 23 Sep 2026 20:15:58 +0530 Subject: [PATCH 4/9] Update lib/skunk/generators/html/templates/skunk_overview.html.erb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Juan Vásquez --- lib/skunk/generators/html/templates/skunk_overview.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/skunk/generators/html/templates/skunk_overview.html.erb b/lib/skunk/generators/html/templates/skunk_overview.html.erb index b3c5c1a..f984862 100644 --- a/lib/skunk/generators/html/templates/skunk_overview.html.erb +++ b/lib/skunk/generators/html/templates/skunk_overview.html.erb @@ -355,7 +355,7 @@ const rows = Array.from(tbody.querySelectorAll(".table-row")); headers.forEach((otherHeader) => { - otherHeader.classList.remove("active", "table-header-asc", "table-header-desc"); + otherHeader.classList.remove("table-header-asc", "table-header-desc"); }); header.classList.add(ascending ? "table-header-asc" : "table-header-desc"); From 4ee654127810c90b72f043c6d1697646e27789dd Mon Sep 17 00:00:00 2001 From: poonam <223526221+poonambhagaur61-tech@users.noreply.github.com> Date: Wed, 23 Sep 2026 20:16:16 +0530 Subject: [PATCH 5/9] Update lib/skunk/generators/html/templates/skunk_overview.html.erb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Juan Vásquez --- .../html/templates/skunk_overview.html.erb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/skunk/generators/html/templates/skunk_overview.html.erb b/lib/skunk/generators/html/templates/skunk_overview.html.erb index f984862..31a458a 100644 --- a/lib/skunk/generators/html/templates/skunk_overview.html.erb +++ b/lib/skunk/generators/html/templates/skunk_overview.html.erb @@ -283,12 +283,12 @@
FileSkunk ScoreChurn × CostChurnCostCoverageFileSkunk ScoreChurn × CostChurnCostCoverage
- + <%= item.churn_times_cost %> @@ -304,5 +327,45 @@

Generated with Skunk v<%= @skunk_version %> on <%= @generated_at %>

+ + - + \ No newline at end of file From 3a2c8c876b47a39b81798d521b0914326e086412 Mon Sep 17 00:00:00 2001 From: poonam <223526221+poonambhagaur61-tech@users.noreply.github.com> Date: Tue, 15 Sep 2026 22:06:12 +0530 Subject: [PATCH 2/9] Show initial Skunk Score sort direction --- lib/skunk/generators/html/templates/skunk_overview.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/skunk/generators/html/templates/skunk_overview.html.erb b/lib/skunk/generators/html/templates/skunk_overview.html.erb index bf9dc2a..026a10c 100644 --- a/lib/skunk/generators/html/templates/skunk_overview.html.erb +++ b/lib/skunk/generators/html/templates/skunk_overview.html.erb @@ -284,7 +284,7 @@
FileSkunk ScoreSkunk Score Churn × Cost Churn Cost
- - - - - - + + + + + + From 219eef6e0abf96de38e8f371e992988f139a9436 Mon Sep 17 00:00:00 2001 From: poonam <223526221+poonambhagaur61-tech@users.noreply.github.com> Date: Wed, 23 Sep 2026 20:16:30 +0530 Subject: [PATCH 6/9] Update lib/skunk/generators/html/templates/skunk_overview.html.erb MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Juan Vásquez --- lib/skunk/generators/html/templates/skunk_overview.html.erb | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/skunk/generators/html/templates/skunk_overview.html.erb b/lib/skunk/generators/html/templates/skunk_overview.html.erb index 31a458a..c4d87da 100644 --- a/lib/skunk/generators/html/templates/skunk_overview.html.erb +++ b/lib/skunk/generators/html/templates/skunk_overview.html.erb @@ -205,11 +205,6 @@ text-decoration: underline; } - .sort-type { - display: inline-block; - margin-left: 0.4rem; - } - .table-header-asc::after { content: " ▲"; } From a817b7b1d7a65293e9f0034aec369583f4a268f3 Mon Sep 17 00:00:00 2001 From: poonam <223526221+poonambhagaur61-tech@users.noreply.github.com> Date: Wed, 23 Sep 2026 20:22:42 +0530 Subject: [PATCH 7/9] Update changelog for sortable HTML report --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91c4480..67d0401 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,9 @@ # Changelog +## main [(unreleased)](https://github.com/fastruby/skunk/compare/v0.5.4...HEAD) + +* [FEATURE: Add sortable columns to the Skunk HTML report](https://github.com/fastruby/skunk/pull/142) +* [ENHANCEMENT: Support SimpleCov 1.0](https://github.com/fastruby/skunk/pull/140) +* BUGFIX: Pin path_expander < 2.0 for Ruby 2.7 compatibility All notable changes to this project will be documented in this file. From 4500783c2d8cf031c1ffa7e42a95adca24724c48 Mon Sep 17 00:00:00 2001 From: poonam <223526221+poonambhagaur61-tech@users.noreply.github.com> Date: Wed, 23 Sep 2026 22:22:59 +0530 Subject: [PATCH 8/9] Update CHANGELOG.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Juan Vásquez --- CHANGELOG.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 67d0401..91c4480 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,4 @@ # Changelog -## main [(unreleased)](https://github.com/fastruby/skunk/compare/v0.5.4...HEAD) - -* [FEATURE: Add sortable columns to the Skunk HTML report](https://github.com/fastruby/skunk/pull/142) -* [ENHANCEMENT: Support SimpleCov 1.0](https://github.com/fastruby/skunk/pull/140) -* BUGFIX: Pin path_expander < 2.0 for Ruby 2.7 compatibility All notable changes to this project will be documented in this file. From 601384eafdf2b233e4b9c4d7834897a54b865459 Mon Sep 17 00:00:00 2001 From: poonam <223526221+poonambhagaur61-tech@users.noreply.github.com> Date: Wed, 23 Sep 2026 22:23:09 +0530 Subject: [PATCH 9/9] Update CHANGELOG.md MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Juan Vásquez --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 91c4480..2828776 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## main [(unreleased)](https://github.com/fastruby/skunk/compare/v0.5.4...HEAD) +* [FEATURE: Add sortable columns to the Skunk HTML report](https://github.com/fastruby/skunk/pull/142) * [ENHANCEMENT: Support SimpleCov 1.0](https://github.com/fastruby/skunk/pull/140) * BUGFIX: Pin path_expander < 2.0 for Ruby 2.7 compatibility * [FEATURE: Add `--formats` CLI flag to select report formats (json, html, console)](https://github.com/fastruby/skunk/pull/130)
FileSkunk ScoreChurn × CostChurnCostCoverageFileSkunk ScoreChurn × CostChurnCostCoverage