Skip to content

Add sorting to Skunk HTML report - #142

Open
poonambhagaur61-tech wants to merge 2 commits into
fastruby:mainfrom
poonambhagaur61-tech:sort-skunk-report
Open

poonambhagaur61-tech wants to merge 2 commits into
fastruby:mainfrom
poonambhagaur61-tech:sort-skunk-report

Conversation

@poonambhagaur61-tech

Copy link
Copy Markdown

This PR adds sortable columns to the Skunk HTML report.

  • Allows sorting by File, Skunk Score, Churn × Cost, Churn, Cost, and Coverage
  • Supports ascending and descending sorting
  • Displays the current sort direction
  • Keeps the existing default Skunk Score ordering

Tests: 88 runs, 126 assertions, 0 failures, 0 errors, 0 skips

@JuanVqz
JuanVqz self-requested a review September 14, 2026 17:25

@JuanVqz JuanVqz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @poonambhagaur61-tech, Thanks for taking the time to contribute. I reviewed and have some questions for the issue creator. Feel free to share your opinions as well.

As for me, the changes looks good in general, so, let's wait for him, but if no response we can decide what to do, thanks!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When loading the report, the arrow icons do not show up

Image

They should be visible like so; however, I'm unsure if they show a neutral hint or the actual initial sort preference. The reports start with:
Image

For the neutral hint, I added this .table-header::after { content: " ⇅"; opacity: .35 }

@fbuys,
Would you be happy with a neutral hint or more like an initial arrow that matches the actual pre-sorted order?
And, since you are around, what do you think about the sorting implementation? As for the code, I'd say it looks good, but as for what columns you want to be sorted, What are the criteria to follow, etc.?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the helpful feedback. I’ve updated the report to indicate the initial sort direction. Since the report is initially sorted by Skunk Score in descending order, the Skunk Score column now displays the descending arrow by default, while the other columns remain neutral until selected. I’ve also kept the existing numeric and alphabetical sorting behavior unchanged.

Please let me know if you have any further suggestions or would prefer a different sorting behavior. Thank you again for your guidance!

@JuanVqz
JuanVqz requested a review from fbuys September 15, 2026 20:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants