You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
website-feature: add page size menu to catalogs and Learning Hub - #5111
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
Compressed site build of feature results (ctrl + click) at support repo.
ctrl + clickagent resource, then select from Resource page size to get directly to a demo
Add a page size menu to the catalog pages and the Learning Hub
Adds a "Resource page size" menu next to "Sort by" on the Agents, Extensions, Instructions, Plugins, and Skills catalogs and on the Learning Hub's Articles list. Readers can show 6 (the default and the previous fixed size), 25, 50, or 100 items per page. Changing the size returns to page 1, the same as changing the sort order or a filter.
New CatalogResourceSizeControl reuses the sort menu's markup and classes, so the two menus match on every page. A 1px rule separates them and is hidden below 48rem.
The trigger's accessible name includes the current size (for example "Skills per page: 6").
The fixed page sizes in the six components are replaced by state.
On the Learning Hub, the sort and page size menus are grouped in the Articles header. On phones that page keeps its existing design, where the Filters button replaces the menus.
Testing
npm run --prefix website build passes (1,248 pages).
npm run --prefix website a11y: 24 routes, dark and light, 0 violations.
Playwright checks on all six pages (150 of 150): default size, card and page counts for each size, return to page 1, size kept across sort and filter changes, unchanged toolbar and header heights, and phone layouts.
tsc --noEmit shows no new errors (the 26 existing ones are unchanged).
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.
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/CatalogResourceSizeControl.tsx
On page 2 or later, filter, sort, and size changes reset currentPage to 1, so this effect scrolls to #catalog and takes focus away from the control being used. It also overrides the size menu's closeMenu(true) focus restoration. InstructionsCatalog.tsx:210–220 introduces the same regression; the existing effects in Agents, Extensions, and Plugins also override focus for the new size menus.
Move the scroll/focus operation into each catalog's Pagination.onPageChange, following LearningHubIndex.tsx:875–890, and remove the unused previousPage refs and effect imports where applicable. Filter, sort, and size resets should leave focus on the active control.
Recommended (non-blocking): only the page-size menu implements these keyboard and dismissal handlers. The adjacent sort menus in CatalogSortControl.tsx:47-65 and LearningHubIndex.tsx:693-714 still use plain <details>. Opening Sort by and then Resource page size leaves both overlays open; Escape closes only the page-size menu, and arrow-key navigation differs between the two visually matching controls. Share the keyboard and dismissal behavior across the page-size control and both sort implementations so the toolbar menus behave consistently.
🧠 Review effort: Max
This branch has not been deployed
No deployments
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
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.
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 + clickagent resource, then select from Resource page size to get directly to a demoAdd a page size menu to the catalog pages and the Learning Hub
Adds a "Resource page size" menu next to "Sort by" on the Agents, Extensions, Instructions, Plugins, and Skills catalogs and on the Learning Hub's Articles list. Readers can show 6 (the default and the previous fixed size), 25, 50, or 100 items per page. Changing the size returns to page 1, the same as changing the sort order or a filter.
CatalogResourceSizeControlreuses the sort menu's markup and classes, so the two menus match on every page. A 1px rule separates them and is hidden below 48rem.Testing
npm run --prefix website buildpasses (1,248 pages).npm run --prefix website a11y: 24 routes, dark and light, 0 violations.tsc --noEmitshows no new errors (the 26 existing ones are unchanged).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.