📌 Description
src/components/MyCommitmentsGrid.tsx and src/components/MarketplaceGrid.tsx
render potentially large lists of commitment cards (MyCommitmentCard.tsx,
MarketplaceCard.tsx). The cards are not memoized and the grids re-render fully
on filter/sort changes, which causes jank as result sets grow — the
design/dashboard-overview/responsive-layouts.md and marketplace specs assume
smooth scrolling and filtering.
This issue improves large-list rendering performance via memoization and
windowing.
Goal: filtering and scrolling large commitment/marketplace lists stays
smooth, with cards memoized and off-screen rows not paying render cost.
🎯 Requirements and Context
- Wrap
MyCommitmentCard.tsx and MarketplaceCard.tsx in React.memo with
stable props/keys.
- Memoize derived filtered/sorted lists (
useMemo) in the grid components.
- Add list virtualization/windowing for large result sets (lightweight,
dependency-conscious; document any new dependency).
- Preserve existing skeleton/empty states
(MyCommitmentsGridSkeleton.tsx, MarketplaceGridSkeleton.tsx).
- Measure before/after with a large mock dataset.
🛠️ Suggested Execution
1. Create a branch
git checkout -b feature/grid-perf-virtualization
2. Implement changes
- Update the grid + card components as above.
- Add
tests/components/MyCommitmentsGrid.perf.test.tsx asserting memoized cards
do not re-render when unrelated state changes.
3. Test and commit
- Run
npm test.
- Edge cases: empty list, single item, very large list, rapid filter toggling.
Example commit message
perf: memoize and virtualize MyCommitments and Marketplace grids
✅ Guidelines
- Minimum 95% test coverage on changed rendering logic.
- Clear documentation of measured improvement and any new dependency.
- Timeframe: 96 hours.
🏷️ Labels
type-performance · area-frontend · type-testing · MAYBE REWARDED · GRANTFOX OSS · OFFICIAL CAMPAIGN
💬 Community & Support
- Join the CommitLabs contributor Discord: https://discord.gg/WV7tdYkJk
- Introduce yourself before starting to avoid duplicate work.
- Maintainers triage actively and review fast.
📌 Description
src/components/MyCommitmentsGrid.tsxandsrc/components/MarketplaceGrid.tsxrender potentially large lists of commitment cards (
MyCommitmentCard.tsx,MarketplaceCard.tsx). The cards are not memoized and the grids re-render fullyon filter/sort changes, which causes jank as result sets grow — the
design/dashboard-overview/responsive-layouts.mdand marketplace specs assumesmooth scrolling and filtering.
This issue improves large-list rendering performance via memoization and
windowing.
🎯 Requirements and Context
MyCommitmentCard.tsxandMarketplaceCard.tsxinReact.memowithstable props/keys.
useMemo) in the grid components.dependency-conscious; document any new dependency).
(
MyCommitmentsGridSkeleton.tsx,MarketplaceGridSkeleton.tsx).🛠️ Suggested Execution
1. Create a branch
2. Implement changes
tests/components/MyCommitmentsGrid.perf.test.tsxasserting memoized cardsdo not re-render when unrelated state changes.
3. Test and commit
npm test.Example commit message
✅ Guidelines
🏷️ Labels
type-performance·area-frontend·type-testing·MAYBE REWARDED·GRANTFOX OSS·OFFICIAL CAMPAIGN💬 Community & Support