Skip to content

fix(tools): show tools without languages when grouping by language - #2633

Closed
NopeCharon wants to merge 1 commit into
json-schema-org:mainfrom
NopeCharon:fix/2153-tools-without-language
Closed

NopeCharon wants to merge 1 commit into
json-schema-org:mainfrom
NopeCharon:fix/2153-tools-without-language

Conversation

@NopeCharon

Copy link
Copy Markdown

What kind of change does this PR introduce?

Bugfix

Issue Number:

Screenshots/videos:

No visual changes other than a new "Other" section at the bottom of the tools list when grouping by Language. With the "Validator" filter applied:

Group By: Tool Type Group By: Language
Before "125 Tools" "87 Tools" (15 validators missing)
After "90 Tools" "90 Tools" (15 validators listed under "Other")

If relevant, did you update the documentation?

Not needed, no documented behaviour changes.

Summary

On /tools, groupTools only put a tool in a group if it had at least one value for the attribute being grouped by. Tools without languages (49 of the 282 entries, for example online validators like jschon.dev, CLIs like ajv-cli, and most editors) were dropped when grouping by Language. With the Validator filter, 15 of the 90 validators disappeared as soon as the grouping was switched from Tool Type to Language.

Changes:

  • pages/tools/hooks/useToolsTransform.tsx: tools with no value for the grouped attribute go into an Other group (OTHER_GROUP), which is always sorted after the other groups. numberOfTools is now tools.length, because every tool lands in a group.
  • pages/tools/components/ToolingTable.tsx: the "N Tools" count added up the size of every group, so a tool listed under several languages or tooling types was counted once per group. That is why the same 90 validators showed as 125 in one view and 87 in the other. The count now uses the number of unique visible tools, so it's the same for every grouping, as the issue expects.
  • cypress/components/ToolingTable.cy.tsx: new component tests for the Other group and its position, for grouping by tooling type, and for the de-duplicated count. The tests fail on main and pass with this change.

Validation: yarn lint, yarn typecheck and the new spec pass, along with the existing tools-page specs (SearchBar, DropdownMenu, Tag, Badge). I also ran the dev server and checked /tools?groupBy=languages&toolingTypes=validator in Cypress against the real tooling-data.yaml. Both groupings show "90 Tools", "Other" is the last group, and "Load More" expands it to all 15 tools.

Does this PR introduce a breaking change?

No.

Checklist

Please ensure the following tasks are completed before submitting this pull request.

When the tools page was grouped by language, `groupTools` only placed a
tool in a group if it defined at least one value for the attribute being
grouped by. Tools without `languages` (49 of the 282 entries, such as
online validators, CLIs and editors) were silently dropped, so switching
the "Group By" option from "Tool Type" to "Language" made tools
disappear. With the "Validator" filter applied, 15 of the 90 validators
were missing.

Tools that have no value for the grouped attribute are now listed under
an "Other" group, which is always shown after all the other groups, so
every tool matching the filters stays visible regardless of how the list
is grouped. `numberOfTools` now simply reflects the number of tools
passed in, since every tool ends up in a group.

The "N Tools" count also summed the size of every group, so a tool
listed under several languages or tooling types was counted once per
group (the 90 validators were reported as 125 when grouped by tool type
and 87 when grouped by language). The count now uses the number of
unique visible tools, so it is the same for every grouping.

Add component tests covering the Other group, its position, grouping by
tooling type, and the de-duplicated tool count.
@NopeCharon
NopeCharon requested a review from a team as a code owner November 7, 2026 13:05
@github-project-automation github-project-automation Bot moved this to Ready to review in PR - Triage Group Nov 7, 2026
@github-actions

github-actions Bot commented Nov 7, 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 383223e

@codecov

codecov Bot commented Nov 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 66.69%. Comparing base (ff13109) to head (383223e).

Additional details and impacted files
@@             Coverage Diff              @@
##              main    #2633       +/-   ##
============================================
- Coverage   100.00%   66.69%   -33.31%     
============================================
  Files           31       38        +7     
  Lines          737     1273      +536     
  Branches       229      438      +209     
============================================
+ Hits           737      849      +112     
- Misses           0      424      +424     

☔ 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.

This branch was successfully deployed

1 active deployment
Preview — 383223ec Deployed Nov 7, 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: Done

Development

Successfully merging this pull request may close these issues.

🐛 Bug: Missing tools when grouping by Language due to undefined language metadata

2 participants