feat(ports): filter by group, and shrink the cards - #18
Merged
Merged
Conversation
The list was built for four ports and does not survive forty. Every card carried a seven-line terminal mock, so scanning the page meant scrolling past a preview per port to reach the one you wanted — and the preview is redrawn full size on the port's own page, one click away, where there is room to actually read it. So the card drops to what distinguishes one port from another: the name, the blurb, the file it installs as, and a link to the repo. Four short lines, which lets the grid run narrower tracks and fit more per row. The page goes from 54kB to 25kB at five ports, and that saving is per port. The filter is one generated rule per group, which is what keeps it free of JavaScript: CSS cannot compare a checked radio against a section's group, but it can be told about each group by name, and the names come from the catalogue — so a new group filters itself. With "All" checked no rule matches and everything shows, which is also what happens where `:has()` is unavailable. It degrades to the page as it was. The radios sit off-screen rather than under display:none, because a hidden input is not focusable and the label is the only keyboard route to them.
rogeriojunior31
force-pushed
the
feat/filter-and-shrink-the-port-list
branch
from
August 7, 2026 01:20
2469a89 to
a6abc72
Compare
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 list was built for four ports and does not survive forty.
The cards
Every card carried a seven-line terminal mock, so scanning the page meant
scrolling past a preview per port to reach the one you wanted. The preview is
already redrawn full size on the port's own page, one click away, where there is
room to actually read it — on the index it was costing height and giving little.
So the card drops to what tells one port from another: name, blurb, the file it
installs as, and the repo link. Four short lines, which lets the grid run
narrower tracks and fit more per row.
54kB → 25kB at five ports, and the saving is per port.
The filter
One generated rule per group, which is what keeps it free of JavaScript: CSS
cannot compare a checked radio against a section's group, but it can be told
about each group by name — and the names come from the catalogue, so a new group
filters itself.
With "All" checked no rule matches and everything shows, which is also what
happens where
:has()is unavailable: the page degrades to exactly how it workstoday.
The radios sit off-screen rather than under
display:none— a hidden input isnot focusable, and the label is the only keyboard route to them. The filter only
renders when there is more than one group.
Checked
astro check0 errors, 56 tests, build clean. The generated CSS carries one ruleeach for
terminal,shellandeditor, and no preview markup remains in thecards.