Skip to content

fix(tools): correct Bowtie column sorting - #2612

Open
Arya-AV wants to merge 2 commits into
json-schema-org:mainfrom
Arya-AV:fix-bowtie-column-sorting
Open

Arya-AV wants to merge 2 commits into
json-schema-org:mainfrom
Arya-AV:fix-bowtie-column-sorting

Conversation

@Arya-AV

@Arya-AV Arya-AV commented Oct 29, 2026 •

Copy link
Copy Markdown

What kind of change does this PR introduce?

Bug fix: Corrects the Bowtie column sorting behaviour on the Tools page and improves the sorting indicators and icons.

Issue Number:

Screenshots/videos:

The updated sorting behaviour was manually tested on the local website:

  • Ascending: Tools with Bowtie reports appear first, with alphabetical ordering (A–Z) within each group.
  • Descending: Tools without Bowtie reports appear first, with reverse alphabetical ordering (Z–A) within each group.
Screenshot 2026-10-30 090004 Screenshot 2026-10-30 090034

If relevant, did you update the documentation?

Not applicable. No documentation changes were required.

Summary

This PR fixes the Bowtie column sorting behaviour on the Tools page.

The changes include:

  • Uses getBowtieData() to group tools based on Bowtie report availability.
  • Adds secondary alphabetical sorting using localeCompare() so that tools within each group are also sorted according to the selected direction.
  • Ensures both the group order and alphabetical order reverse correctly when toggling between ascending and descending.
  • Corrects the sorting indicator arrows in TableSortableColumnHeader (ChevronUp for ascending and ChevronDown for descending).
  • Replaces the existing SVG icon imports and usages with Lucide Info and ExternalLink icons.

Does this PR introduce a breaking change?

No. These changes do not introduce any breaking changes.

Checklist

@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
built with Refined Cloudflare Pages Action

⚡ Cloudflare Pages Deployment

Name Status Preview Last Commit
website ✅ Ready (View Log) Visit Preview 17dd384

@codecov

codecov Bot commented Oct 29, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.00%. Comparing base (25be3b2) to head (17dd384).

Additional details and impacted files
@@            Coverage Diff            @@
##              main     #2612   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           31        31           
  Lines          737       737           
  Branches       229       229           
=========================================
  Hits           737       737           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Arya-AV

Arya-AV commented Oct 29, 2026

Copy link
Copy Markdown
Author

Hi @kunalverma2512 , I've addressed the PR validation feedback, and all checks are now passing. I'm happy to make any further changes if needed.

@kunalverma2512

Copy link
Copy Markdown
Contributor

Hi @Arya-AV, thanks for putting the PR together so quickly! The getBowtieData() check works really well to separate the tools with reports.

I was testing out the sorting logic and just noticed a couple of small things while checking the behavior.
When toggling between ascending and descending, the tools within the Bowtie group stay in the same order because sortBowtieTools returns 0 when both tools have Bowtie data. If we add a secondary alphabetical sort with localeCompare on the name or ID, it will make sure the rows inside actually flip between A to Z and Z to A.
Also, for the arrow icon in TableSortableColumnHeader, ascending usually points up (ChevronUp) and descending points down (ChevronDown), but right now ascending is set to ChevronDown.

Once those two are in place, it should be good to go! Also, as a small friendly tip, it might be great to update your PR description with all the changes you made, including replacing the inline SVG with Lucide icons, because maintainers usually really appreciate having that clear summary during the final review.

Really nice progress on this!

@Arya-AV

Arya-AV commented Oct 30, 2026

Copy link
Copy Markdown
Author

Thanks for the feedback!!@kunalverma2512 ,I've addressed both suggestions by adding secondary alphabetical sorting within each Bowtie group and correcting the sort indicator directions. I've also replaced the existing SVG icons with Lucide icons and updated the PR description with a summary of all the changes.
I've pushed the updates to the PR.

@kunalverma2512

Copy link
Copy Markdown
Contributor

Hi @Arya-AV, tested the latest changes and everything looks great! The sorting behavior and the updated icons work really smoothly now. You can also share your update in the Slack channel so the maintainers can see the work. Really enjoyed collaborating with you to solve this bug!

This branch was successfully deployed

1 active deployment
Preview — 17dd3844 Deployed Oct 30, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Ready to review

Development

Successfully merging this pull request may close these issues.

🐛 Bug: Bowtie column sorting on Tools page does not sort or reverse rows

2 participants