Skip to content

Conversation

@Priyanshu2004-Singh
Copy link

Add Profile Like Feature & Top Contributors Ranking

Description

Added a client-side like feature to profiles and Top Contributors ranking in the sidebar, enhancing user engagement without adding server complexity.

Changes Made

  • Like Button: Added heart icon + count to profile cards
  • Live Ranking: Top 5 contributors shown in sidebar, updates in real-time
  • Persistence: Likes stored in localStorage with cross-tab sync
  • Accessible UI: Added proper ARIA attributes and keyboard support

Technical Details

  • Client-side storage using localStorage
  • Real-time updates via custom events
  • Cross-tab sync using native storage event
  • No backend changes required

Testing

  1. Click heart icon on any profile
  2. Check sidebar for updated ranking
  3. Open another tab - likes sync across tabs
  4. Verify localStorage in DevTools → Application → Local Storage

Screenshots

Screenshot 2025-10-13 at 10 18 30 AM 1. Profile card with like button 2. Sidebar showing top contributors 3. localStorage state in DevTools]

Checklist

  • Code follows project style
  • No console errors
  • Tested in multiple browsers
  • Responsive design maintained
  • Accessibility preserved

Note

This is a client-only implementation. If server-side persistence is needed, we can add API endpoints in a future PR.

@vercel
Copy link

vercel bot commented Oct 13, 2025

Someone is attempting to deploy a commit to the Shyam Tawli's projects Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great job, @Priyanshu2004-Singh! 🎉 Thank you for opening a pull request. Your contribution is valuable and we appreciate your efforts to improve our project.

Soon the maintainers/owner will review it and provide you with feedback/suggestions.

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.

1 participant