From 8cdeb2d2edaa345d08348a4e7bcac8973454f030 Mon Sep 17 00:00:00 2001 From: Aaron Powell Date: Wed, 24 Jun 2026 09:47:39 +1000 Subject: [PATCH] Consolidate listing pages with unified grid cards and modal system (#2101) * Prototype extension details modal - Add detail popup modal for extension cards with full metadata and gallery - Implement image gallery with thumbnail strip and main image selection - Add modal styling and positioning in global.css - Connect card click handlers to open modal with extension data Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Fix accessibility issues with modal focus restoration - Add missing listing-cards-page class to agents.astro page root - Pass focusable button element to openCardDetailsModal instead of article - Fixes focus restoration for keyboard users when closing modal - Applied fix across all listing pages (agents, instructions, hooks, plugins, skills, workflows) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> * Address remaining PR review feedback - Fix extension modal ARIA state by setting aria-current to "true" and removing it when inactive - Use focusable .resource-preview as modal trigger for extension thumbnail/click/keyboard paths - Extract shared multi-select helpers into pages/select-utils.ts and reuse across instructions/hooks/plugins/workflows - Remove unused card-model.ts to avoid dead/overlapping type definitions Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- website/src/pages/agents.astro | 6 +- website/src/pages/extensions.astro | 18 +- website/src/pages/hooks.astro | 6 +- website/src/pages/instructions.astro | 6 +- website/src/pages/plugins.astro | 6 +- website/src/pages/skills.astro | 6 +- website/src/pages/workflows.astro | 6 +- website/src/scripts/modal.ts | 115 +++++- website/src/scripts/pages/agents-render.ts | 102 +++--- website/src/scripts/pages/agents.ts | 84 ++++- website/src/scripts/pages/card-render.ts | 54 +++ .../src/scripts/pages/extensions-render.ts | 133 +++---- website/src/scripts/pages/extensions.ts | 318 +++++++++++++--- website/src/scripts/pages/hooks-render.ts | 104 +++--- website/src/scripts/pages/hooks.ts | 261 +++++++------ .../src/scripts/pages/instructions-render.ts | 53 ++- website/src/scripts/pages/instructions.ts | 109 ++++-- website/src/scripts/pages/plugins-render.ts | 46 ++- website/src/scripts/pages/plugins.ts | 155 +++++++- website/src/scripts/pages/select-utils.ts | 19 + website/src/scripts/pages/skills-render.ts | 100 +++-- website/src/scripts/pages/skills.ts | 250 ++++++++----- website/src/scripts/pages/workflows-render.ts | 45 ++- website/src/scripts/pages/workflows.ts | 166 ++++++--- website/src/styles/global.css | 346 ++++++++++++++++-- 25 files changed, 1777 insertions(+), 737 deletions(-) create mode 100644 website/src/scripts/pages/card-render.ts create mode 100644 website/src/scripts/pages/select-utils.ts diff --git a/website/src/pages/agents.astro b/website/src/pages/agents.astro index 128fc3dd..a43ae08d 100644 --- a/website/src/pages/agents.astro +++ b/website/src/pages/agents.astro @@ -1,18 +1,18 @@ --- import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro'; import agentsData from '../../public/data/agents.json'; -import Modal from '../components/Modal.astro'; import ContributeCTA from '../components/ContributeCTA.astro'; import EmbeddedPageData from '../components/EmbeddedPageData.astro'; import PageHeader from '../components/PageHeader.astro'; import BackToTop from '../components/BackToTop.astro'; +import Modal from '../components/Modal.astro'; import { renderAgentsHtml, sortAgents } from '../scripts/pages/agents-render'; const initialItems = sortAgents(agentsData.items, 'title'); --- -
+
@@ -42,8 +42,8 @@ const initialItems = sortAgents(agentsData.items, 'title');
- + - diff --git a/website/src/pages/hooks.astro b/website/src/pages/hooks.astro index 73733433..e74e5a26 100644 --- a/website/src/pages/hooks.astro +++ b/website/src/pages/hooks.astro @@ -1,10 +1,10 @@ --- import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro'; -import Modal from '../components/Modal.astro'; import ContributeCTA from '../components/ContributeCTA.astro'; import PageHeader from '../components/PageHeader.astro'; import EmbeddedPageData from '../components/EmbeddedPageData.astro'; import BackToTop from '../components/BackToTop.astro'; +import Modal from '../components/Modal.astro'; import hooksData from '../../public/data/hooks.json'; import { renderHooksHtml, sortHooks } from '../scripts/pages/hooks-render'; @@ -12,7 +12,7 @@ const initialItems = sortHooks(hooksData.items, 'title'); --- -
+
@@ -47,8 +47,8 @@ const initialItems = sortHooks(hooksData.items, 'title');
- +