-
Notifications
You must be signed in to change notification settings - Fork 1
feat(catalogue): public catalogue UI #22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request introduces a public-facing catalogue interface for browsing collection items, though there's a discrepancy with the PR description which mentions volunteer management features that aren't present in the code. The main additions include a complete data fetching layer using React Query, reusable UI components for displaying items, and a search/filter interface for the catalogue.
Key Changes:
- Implemented API client for public items endpoint with filtering capabilities (search, platform, on-floor status, ordering)
- Created reusable catalogue UI components (ItemCard, ItemList, CatalogueSearchBar) using CSS Grid for responsive layout
- Added CataloguePage with search, filter, and real-time data fetching via React Query
- Upgraded Vitest from v2.1.8 to v4.0.16 (major version jump)
Reviewed changes
Copilot reviewed 16 out of 18 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
frontend/src/vite-env.d.ts |
Defines TypeScript types for Vite environment variables, specifically VITE_API_BASE_URL |
frontend/tsconfig.app.json |
Added explicit reference to vite-env.d.ts for environment variable type safety |
frontend/.env.example |
Example configuration for API base URL environment variable |
frontend/src/lib/types.ts |
Added PublicCollectionItem interface for public API responses |
frontend/src/lib/filters.ts |
Defined ItemFilter interface for query parameters |
frontend/src/lib/constants.ts |
Added ordering options for catalogue sorting |
frontend/src/api/items.api.ts |
Implemented items API client with getAll method and query parameter handling |
frontend/src/api/index.ts |
Exported apiClient and items API for use across the app |
frontend/src/actions/useItems.ts |
Created React Query hook for fetching items with filters |
frontend/src/actions/index.ts |
Exported useItems hook |
frontend/src/components/items/ItemCard.tsx |
Display component for individual collection items with basic styling |
frontend/src/components/items/ItemList.tsx |
Grid-based container component for rendering multiple ItemCards |
frontend/src/components/items/CatalogueSearchBar.tsx |
Search and filter controls for catalogue (search, platform, ordering, on-floor status) |
frontend/src/components/items/index.ts |
Barrel export for all item-related components |
frontend/src/pages/public/CataloguePage.tsx |
Main catalogue page integrating search, filters, and item display with loading/error states |
frontend/src/App.tsx |
Added /catalogue route to application routing |
frontend/package.json |
Upgraded Vitest and related testing packages from v2.1.8 to v4.0.16 |
frontend/package-lock.json |
Updated dependency lockfile reflecting Vitest v4 and transitive dependencies |
Files not reviewed (1)
- frontend/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
Adds the basic component for admin to view volunteers and reject and approve volunteer applications.
Sets up basic API interface to access public read endpoints for items, and defines simple starting components for catalogue UI.
Related Issues
Relates to #19 as it pulls data from the defined endpoint.
Closes #9.
Changes
Adds useItems hook and API pathway for /public/items
Added basic component design for ItemCard and ItemList using CSS grid
Introduced shared search bar component with filters and API refreshment upon filter change
Testing
Currently not testable with public items API endpoint as it is still a work in progress at #19.
Screenshots / UI (if applicable)
After: