Skip to content

Website resize col width - #5963

Closed
jhauga wants to merge 9 commits into
github:mainfrom
jhauga:website-resize-col-width
Closed

jhauga wants to merge 9 commits into
github:mainfrom
jhauga:website-resize-col-width

Conversation

@jhauga

@jhauga jhauga commented Oct 29, 2026

Copy link
Copy Markdown
Contributor

Pull Request Checklist

  • I have read and followed the CONTRIBUTING.md guidelines.
  • I have read and followed the Guidance for submissions involving paid services.
  • My contribution adds a new instruction, prompt, agent, skill, workflow, or canvas extension file in the correct directory.
  • The file follows the required naming convention.
  • The content is clearly structured and follows the example format.
  • I have tested my instructions, prompt, agent, skill, workflow, or canvas extension with GitHub Copilot.
      • Website feature
  • I have run npm start and verified that README.md is up to date.
  • I am targeting the main branch for this pull request.

Description

Demo

Note

Minified version of site. Enough to get the gist across

Instructions at 50 per page, 1848px, dark: below the end of the filter list, the cards continue in three columns across the catalog frame

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.

  • A new useCatalogSplit hook 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 a ResizeObserver for 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.
  • Each page's card markup moves, unchanged, into a local render function that both grids use, so git diff -w --color-moved shows it as a move.
  • The wide grid renders inside <section id="catalog">, after the filters and the side grid, so pagination focus and the Section's 1280px cap cover it. It reuses .gridFrame for 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.
  • The centering is CSS only: :nth-child selectors 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.mjs now 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 build passes (1,572 pages).
  • npm run --prefix website a11y: 24 routes, dark and light, 0 violations (at the default page size, which does not split).
  • The website regression scripts in website/scripts pass: page-width (now also at 50 per page, where it checks the wide frame), plugin-install, reading-catalog, resource-card-layout, and site-refinement.
  • Playwright checks on all six pages (766 of 766): no split at 6 per page; at 20, 50, and 100 per page every side row starts above the end of the filter list and the side grid reaches it; a short last wide row is centered on pages before the last (one and two cards both seen) and left-aligned on the last page; frame edges from 1000 to 2560px; the wide frame starting on the catalog's bottom edge with one gridline there; no horizontal overflow; the stacked layout at 1000px with the same card order; Show more and Show less, a filter and Clear all, page 2; focus kept on the same link or button when a resize moves its card to the other grid, in both directions; and no console errors.
  • tsc --noEmit shows no new errors (the same 30 as main).

Type of Contribution

  • New instruction file.
  • New prompt file.
  • New agent file.
  • New plugin.
  • New skill file.
  • New agentic workflow.
  • New canvas extension.
  • Update to existing instruction, prompt, agent, plugin, skill, workflow, or canvas extension.
  • Other (please specify): Website feature request

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

jhauga and others added 7 commits October 27, 2026 20:04
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>
Copilot AI balanced review requested due to automatic review settings October 29, 2026 03:43
@jhauga
jhauga requested a review from a team as a code owner October 29, 2026 03:43
@github-actions github-actions Bot added new-submission PR adds at least one new contribution website-update PR touches website content or code labels Oct 29, 2026
@github-actions

github-actions Bot commented Oct 29, 2026 •

Copy link
Copy Markdown
Contributor

🚦 Submission status: 👀 Ready for review

Risk tier: merge-risk:medium — New or substantially changed resource without privileged execution
Required to merge: passing submission-gate checks plus 1 approval from reviewers with write access.

Why this tier
  • Adds 1 file(s), e.g. website/src/components/brand/useCatalogSplit.ts
  • Changes 1627 lines (low-risk limit is 40)

Automated checks

Check Status Details
Line endings ✅ Passed Passed · logs
Spelling ✅ Passed Passed · logs
Contributor reputation ✅ Passed Passed · logs
Duplicate resource scan ✅ Passed Passed · logs
PR quality signal ⏭️ Skipped Skipped by its workflow · logs

Review

  • Approvals: 0/1
  • Assigned reviewer: not assigned yet — comment /request-review to ask for one
  • Review target date: not set
  • Still needed: 1 more approval(s)
  • No staffed reviewer pool owns these files yet; any reviewer with write access counts as the domain reviewer.

Commands

Command Who What it does
/rerun-checks PR author, maintainers Re-runs failed or incomplete checks and re-evaluates this gate
/request-review PR author, maintainers Asks the review rotation to assign a reviewer (adds needs-reviewer)

Updated for 5fe942d · gate run · This comment is maintained automatically — see submission gate docs.

@github-actions github-actions Bot added ready-for-review Submission passed intake validation and is ready for maintainer review and removed awaiting-automation labels Oct 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 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

Copilot AI balanced review requested due to automatic review settings October 29, 2026 03:51
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
@github-actions github-actions Bot added awaiting-automation ready-for-review Submission passed intake validation and is ready for maintainer review and removed ready-for-review Submission passed intake validation and is ready for maintainer review awaiting-automation labels Oct 29, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No active review issues remain for the catalog layout changes.

No open issues 🎉

1 resolved since last review

Review effort: Balanced

Copilot AI balanced review requested due to automatic review settings October 29, 2026 03:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The review reports no active issues with the catalog layout changes.

No open issues 🎉

Review effort: Balanced

@aaronpowell aaronpowell closed this Nov 2, 2026
@aaronpowell

Copy link
Copy Markdown
Contributor

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.

@jhauga
jhauga deleted the website-resize-col-width branch November 2, 2026 00:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

merge-risk:medium new-submission PR adds at least one new contribution ready-for-review Submission passed intake validation and is ready for maintainer review website-update PR touches website content or code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants