Redesign the ecosystem package registry as a filterable card grid - #254
Open
Zethson wants to merge 14 commits into
Open
Redesign the ecosystem package registry as a filterable card grid#254Zethson wants to merge 14 commits into
Zethson wants to merge 14 commits into
Conversation
The registry was a two-column table of name and description, which ignored most of what packages.json actually carries. Each package is now a card showing its logo (or a monogram tile), version, license, description, tags, and a link row built from the registry data: repository, docs, tutorials, PyPI/conda/CRAN/Bioconductor and the first publication DOI. Entries in the core-* categories get a badge so they are distinguishable from community submissions. Filtering is search over name, description and tags plus a row of the twelve most common tags. Registry tags are free-form, so variants such as "single-cell", "single cell" and "singlecell" are folded together through an alias map before they are counted. Tags on a card filter by that tag as well, injecting a chip when it is not one of the top twelve. Along the way: - Wrap the remote fetch in `try`, so a registry outage degrades to a link instead of failing the build. - Match the search query as a substring instead of compiling user input into a RegExp, which threw on input such as `(`. - Collapse duplicate outbound links; many entries point documentation_home and tutorials_home at the same URL. - Drop the <p> wrapping markdownify output, which nested paragraphs.
✅ Deploy Preview for jade-cajeta-1bcca0 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Deploy previews built with Netlify's default Hugo 0.97.2, from 2022, while production builds with `latest`, currently 0.164.0. Previews therefore did not reflect what gets published, and the `try` guard around the registry fetch failed to parse on the older version. Pin previews to 0.164.0, and drop `try`, which needs Hugo 0.141+, in favour of the plain nil check the template used before. The fallback markup stays, so an unreachable registry still renders a link rather than an empty section.
Now that deploy previews build with the same Hugo as production, the template can use `try` again: an unreachable registry falls back to a link instead of failing the build. Verified by pointing the fetch at a 404 and confirming the page still builds with the fallback markup. Note the resulting minimum Hugo version in the README.
Member
why would we want this? this sounds like intentionally introducing a bug? |
Wrapping the fetch in `try` traded a loud failure for a silent one: a transient outage would have published the page with all 118 packages replaced by a fallback line, on a green build, until whenever the next deploy happened. Failing the build keeps the last good page live, since the deploy step in gh-pages.yml only runs after a successful build, and puts a red X in front of someone who can act on it. Degrading gracefully is worth revisiting on its own, backed by a committed snapshot of packages.json so an outage means stale data rather than an empty section, but it does not belong in a redesign.
Member
Author
|
@flying-sheep actually, I think you're right. I wouldn't call it a bug per se but it's probably worse than just failing which gives us more information and something to handle. I'll revert this part. |
Zethson
commented
Aug 11, 2026
scverse/ecosystem-packages#392 replaces free-form tags with a controlled vocabulary, a primary category and a language, so the normalisation this template was doing can go: the alias map, the tag counting, the `>= 3` threshold and the top-12 slice are all deleted. The chip row is now the categories actually in use, biggest first, which is stable across registry updates rather than shifting whenever a package is added. Tags filter from the cards, since 45 of them would not fit in a chip row, and non-Python packages get a language badge. Needs scverse/ecosystem-packages#392 merged and redeployed first. Until then the live packages.json has no primary_category, and the chip row renders empty.
`latest` meant a Hugo release could break the build with no change in the repo, and that previews and production drifted apart — which is how previews ended up on 0.97.2 unnoticed. Both are 0.164.0 now, and moving version is a reviewable one-line change.
Hugo caches remote resources forever by default, and on Netlify it puts that cache in /opt/build/cache, which survives between builds. So the deploy preview kept serving a packages.json fetched before the schema change, and the rebuild the registry triggers when packages.json changes would have been a no-op there. Production was unaffected — the Actions runner starts cold — but the same staleness bit local builds twice while developing this.
Core here means core-framework and core-datastructure. core-infrastructure is the scverse repos themselves — governance, the website, this registry — so pinning those to the top of a package list would be misleading.
Prettier dropped the space inside `class="eco-card{{ if $e.core }} …"`,
so the twelve core cards rendered as one bogus `eco-cardeco-card--core`
class. They lost the card styling, and because the filter collects
`.eco-card`, they were never in the list to hide — every search returned
all twelve regardless of the query.
Putting the space before the conditional is stable under prettier.
Reduce the highlight to just the background wash, and keep the core
badge as it was.
Member
Author
|
@maltekuehl would it be possible for you to please glance 2-3 mins over this and tell me whether this is all fine? Notes:
Thank you! |
The auto-merge kept main's ecosystem table alongside the card grid that replaces it, so the packages layout is resolved as this branch's file with the table gone, wrapped for the sidebar the way main wraps it. Scope the contents to the page's own headings: the cards are <article> elements with an <h3> title each, so all 118 of them were being listed as sections.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The ecosystem registry on
/packages/#ecosystemwas a two-column table of name and description, which ignored most of what the registry actually carries. This turns it into a searchable card grid.Cards
Logo (or a monogram tile), version, license, description, tags, and a link row built from the registry fields: repository, docs, tutorials, PyPI / conda / CRAN / Bioconductor, and the first publication DOI. Packages in the
core-*categories get aCOREbadge; non-Python packages get a language badge.Filtering
Free-text search over name, description, tags, category and language, plus a chip row of the primary categories in use, biggest first. Tags filter from the cards themselves — there are 45 of them, too many for a chip row. Both vocabularies are controlled by the registry schema, so this template does no normalisation: no alias map, no frequency threshold, no top-N slice.
Depends on scverse/ecosystem-packages#392
That PR adds
primary_category, the controlledtagsenum andlanguage. It needs to merge and redeploy before this one — until then the livepackages.jsonhas noprimary_categoryand the chip row renders empty (the grid and search still work).Closes #106.
Also in here
latest.netlify.tomlpins them to 0.164.0.RegExp, so typing(threw and froze the filter. It now matches substrings against a prebuilt per-card index.documentation_homeandtutorials_homeat the same URL.