Skip to content

Improve performance #5186

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

Open
wants to merge 6 commits into
base: gh-pages
Choose a base branch
from

Conversation

Andaughters
Copy link

This PR adds several performance optimizations to the Up For Grabs website, making it faster and more responsive for all users.

Performance Improvements

  1. Pagination

    • Implemented page-based navigation for projects
    • Only loads a limited number of projects per page (30)
    • Added accessible pagination controls with keyboard support
    • Significantly reduces initial page load time
  2. LocalStorage Caching

    • Projects are cached in the browser's localStorage
    • Instant loading on repeat visits
    • Background refresh of cache to ensure content stays current
    • Cache expiry after 1 hour to maintain data freshness
  3. Lazy Loading

    • Added IntersectionObserver-based lazy loading for project stats
    • Content loads only when scrolled into view
    • Reduces initial resource usage and API calls
  4. Event Optimization

    • Implemented debounced scroll and resize event handlers
    • Reduced performance impact of DOM operations
    • Smoother scrolling experience
  5. CSS & UX Improvements

    • Added smooth transitions for pagination controls
    • Improved visual feedback during loading and transitions
    • Made pagination controls fully accessible with ARIA attributes

These improvements significantly enhance the user experience, especially for users on slower connections or devices, and make the site feel much more responsive while reducing server load.

@shiftbot
Copy link
Contributor

shiftbot commented May 4, 2025

👋 I'm a robot checking the state of this pull request to save the human reviewers time. I don't see any changes under _data/projects/ so I don't have any feedback here.

As you make changes to this pull request, I'll re-run these checks.

Copy link

netlify bot commented May 4, 2025

Deploy Preview for up-for-grabs-test-bench ready!

Name Link
🔨 Latest commit 985efb2
🔍 Latest deploy log https://app.netlify.com/sites/up-for-grabs-test-bench/deploys/6817d80e280b1d00089bb8c4
😎 Deploy Preview https://deploy-preview-5186--up-for-grabs-test-bench.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants