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) diff --git a/lib/skunk/generators/html/templates/skunk_overview.html.erb b/lib/skunk/generators/html/templates/skunk_overview.html.erb index cee421a..c4d87da 100644 --- a/lib/skunk/generators/html/templates/skunk_overview.html.erb +++ b/lib/skunk/generators/html/templates/skunk_overview.html.erb @@ -195,6 +195,24 @@ font-weight: bold; } + /* Sortable Table Headers */ + .table-header { + cursor: pointer; + user-select: none; + } + + .table-header:hover { + text-decoration: underline; + } + + .table-header-asc::after { + content: " ▲"; + } + + .table-header-desc::after { + content: " ▼"; + } + /* Mobile Card Layout */ @media screen and (max-width: 800px) { .skunk-results thead { @@ -257,15 +275,15 @@

Skunk Analysis

- +
- - - - - - + + + + + + @@ -279,7 +297,7 @@ <%= item.skunk_score %>
FileSkunk ScoreChurn × CostChurnCostCoverageFileSkunk ScoreChurn × CostChurnCostCoverage
- + <%= item.churn_times_cost %> @@ -304,5 +322,45 @@

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

+ + - + \ No newline at end of file