Repository navigation
Conversation
Rows that start beside the filter sidebar keep their two columns. Once a row would start below the end of the filter list, the remaining cards continue in a grid across the whole catalog frame (three columns in the 1280px frame). Applies to the five resource catalogs and the Learning Hub. - useCatalogSplit measures where the filter list ends and splits the cards - each page's card markup moves into a render function both grids share - wide grid CSS in the six modules - page-width-regression.mjs includes the new frame in its frame rule Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Split by count: 14 cards (seven rows) stay beside the filters and the rest move to the wide grid, shifted to the nearest even count that fills every wide row (16 for 100 per page). Lists of 14 or fewer, including the default 6, never split. - useCatalogSplit no longer measures the layout, so resize, zoom, and font loads no longer move cards between grids, the scrollbar feedback loop is gone, and the server render matches the default page. - Render the wide grid inside <section id="catalog">, so pagination focus, the plugin-install regression's #catalog scope, and the Section's 1280px cap cover it. The wide frame takes .catalog's gutter inset instead of its own max() formula. - Extensions picks its eager image by identity instead of a page index. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… 100 Replace the 14-card split with one keyed on the page size: 8 cards (four rows) stay beside the filters at 20 and 50 per page and 10 (five rows) at 100, so full pages leave 12, 42, or 90 cards for the wide grid and every wide row fills in two or three columns. 6 per page never splits. A shorter last page or filtered list moves the cut by at most one row to keep the wide rows full. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rows - Pages of 20, 50, and 100 split where the filter list ends again: a row stays beside the filters while it starts above the list's end, so pages with short filter lists widen sooner. 6 per page never splits. - useCatalogSplit measures again, with the review fixes: it grows or cuts one whole row at a time, starts at Infinity so stacked layouts never mount a wide grid, keeps the split when a change would only undo the previous one (the scrollbar loop), and watches the filter groups. - On every page but the last, a short last row in the three-column wide grid is centered: one card under the middle column, or two cards shifted half a column. CSS only, with :nth-child, a container query on the wide frame, and relative positioning. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…0 per page - A card that changes grids remounts, so a resize or zoom that moved a focused card dropped focus to the page. useCatalogSplit now notes the focused card and control before the split changes and refocuses the same control afterwards, unless focus has moved on. The catalogs pass it a ref for the wide grid. - page-width-regression.mjs also loads the six catalogs at 50 per page. 6 per page never splits, so the wide frame selector matched nothing and the frame rule never saw the wide grid. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🚦 Submission status: 👀 Ready for reviewRisk tier: Why this tier
Automated checks
Review
Commands
Updated for |
There was a problem hiding this comment.
🟡 Changes recommended
The column-count logic mistakes a single filtered card for a one-column grid after the filter is cleared, leaving a side-column slot empty and moving remaining cards into the wide grid.
1 open issue
What changed in this PR
This PR widens website catalog grids below the filter sidebar, making better use of desktop space on larger result pages while preserving the default six-item and stacked layouts.
Changes:
- Adds a shared measurement hook to split cards between side and full-width grids and restore focus when cards move.
- Updates six catalogs and their styles, including centering incomplete wide rows before the last page.
- Extends page-width regression checks to cover split grids at 50 items per page.
| File | Description |
|---|---|
website/src/components/brand/useCatalogSplit.ts |
Adds split measurement, resize handling, and focus restoration. |
website/src/components/brand/styles/skills.module.css |
Styles wide skill rows and their borders. |
website/src/components/brand/styles/plugins.module.css |
Styles wide plugin rows and their borders. |
website/src/components/brand/styles/learning-hub-copilot-app.module.css |
Styles wide article rows and their borders. |
website/src/components/brand/styles/instructions.module.css |
Styles wide instruction rows and their borders. |
website/src/components/brand/styles/extensions.module.css |
Styles wide extension rows and their borders. |
website/src/components/brand/styles/agents.module.css |
Styles wide agent rows and their borders. |
website/src/components/brand/SkillsCatalog.tsx |
Integrates split grids with shared skill-card rendering. |
website/src/components/brand/PluginsCatalog.tsx |
Integrates split grids with shared plugin-card rendering. |
website/src/components/brand/LearningHubIndex.tsx |
Integrates split grids into the Articles list. |
website/src/components/brand/InstructionsCatalog.tsx |
Integrates split grids with shared instruction-card rendering. |
website/src/components/brand/ExtensionsCatalog.tsx |
Integrates split grids with shared extension-card rendering. |
website/src/components/brand/AgentsCatalog.tsx |
Integrates split grids with shared agent-card rendering. |
website/scripts/page-width-regression.mjs |
Checks wide frames, alignment, and overflow at larger page sizes. |
Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
|
We won't be accepting this PR - the change to go from a two to three column span results in a jarring UI layout where items are no longer aligned in the consistent columns. It also deviates a bit too far from the design from GitHub brand. |

Pull Request Checklist
npm startand verified thatREADME.mdis up to date.mainbranch for this pull request.Description
Demo
Note
Minified version of site. Enough to get the gist across
ctrl + clickinstructions resource, then pick 50 from Resource page size and scroll past the filters.More screenshots from the same run, in the support branch's
resize-col-harness/:Widen catalog grids below the filter sidebar
On the Agents, Extensions, Instructions, Plugins, and Skills catalogs and the Learning Hub's Articles list, pages of 20, 50, or 100 no longer stay in two columns all the way down. Rows that start beside the filter sidebar keep their two columns. Once a row would start below the end of the filter list, the rest continue in a grid that spans the whole catalog frame, rail included: three columns in the 1280px frame, and two below a 1408px window. So a page whose filter list is short widens sooner. The default 6 per page is unchanged.
If that wide grid's last row is short on any page but the last, it is centered: one card sits under the middle column, and two cards shift half a column, so the middle card's sides above meet the middle of their top edges. The last page keeps its last row at the left, to mark the end of the list. The order stays A-Z across each row. Phones and tablets are unchanged, because the sidebar stacks above the cards there.
useCatalogSplithook measures where the filter list ends and splits the page's cards into those beside it and those below. It measures in a layout effect after every render (page, page size, sort, filter, and Show more changes) and on aResizeObserverfor the side grid and the filter groups, grows or cuts one whole row at a time, and keeps the split steady when a change would only undo the previous one (the vertical scrollbar can otherwise flip it back and forth). A card that changes grids remounts, so when a resize or zoom moves a focused card, the hook puts focus back on the same control.git diff -w --color-movedshows it as a move.<section id="catalog">, after the filters and the side grid, so pagination focus and the Section's 1280px cap cover it. It reuses.gridFramefor its top gridline and the dark-mode Install menu hook, takes.catalog's gutter inset below 120rem, and draws its right edge beside a last row that is not full.:nth-childselectors pick out a short last row, a container query on the wide frame tells three columns from two, and relative positioning shifts the cards (a transform would make each shifted card a stacking context around its Install menu).page-width-regression.mjsnow lists the wide frame in its frame selector and also loads the six catalogs at 50 per page (6 per page never splits), so the 1280px frame rule and its overflow check cover the wide grid.Testing
npm run --prefix website buildpasses (1,572 pages).npm run --prefix website a11y: 24 routes, dark and light, 0 violations (at the default page size, which does not split).website/scriptspass:page-width(now also at 50 per page, where it checks the wide frame),plugin-install,reading-catalog,resource-card-layout, andsite-refinement.tsc --noEmitshows no new errors (the same 30 asmain).Type of Contribution
By submitting this pull request, I confirm that my contribution abides by the Code of Conduct and will be licensed under the MIT License.
🤖 Generated with Claude Code