Repository: Cloud-CV/EvalAI
Issue: Add Pagination to "All Challenges"

Right now, the All Challenges page in the frontend loads all challenges at once. This causes slow loading and makes the page heavy when there are many challenges.

I’d like to add pagination so only 20 challenges are shown at a time, with numbered navigation (Previous, 1, 2, 3, …, Next). This will make the page faster and easier to use.

**Affected Components**

Frontend:
frontend_v2/src/app/components/challengelist/challengelist.component.ts
frontend_v2/src/app/components/challengelist/challengelist.component.html
frontend_v2/src/app/components/challengelist/challengelist.component.scss

Backend (if needed):
apps/challenges/views.py — to add pagination support to challenge list APIs.

**Proposed Approach**

Frontend:
Add numbered pagination to the All Challenges page using Angular.
Show 20 challenges per page.
Update API calls to use ?page= and ?page_size= parameters.
Add smooth scroll to top when changing pages.
Show a loading indicator while switching pages.
Keep pagination separate for “Ongoing”, “Upcoming”, and “Past” tabs.

Backend:
Use Django REST Framework pagination in challenge list APIs.
Add a custom pagination class like this:

class ChallengePagination(PageNumberPagination):
    page_size = 20
    page_size_query_param = 'page_size'
    max_page_size = 100


**Why This Is Needed**
Reduces page load time.
Minimizes API load.
Makes browsing challenges **smoother.**
Keeps the UI consistent across tabs.

Please assign this issue to me if it seems reasonable.

I was looking into this issue and had one architectural question before proceeding.

From what I can tell, the `/challenges/all` page is still rendered by the legacy AngularJS frontend under `frontend/`, and `frontend_v2` doesn’t seem to be wired to that route yet. Because of this, changes made only in `frontend_v2/src/app/components/challengelist` may not affect the currently active All Challenges page.

Just wanted to confirm the intended direction:

• Should pagination be added to the existing legacy challenge list page, or  
• Is the expectation that `/challenges/all` is now (or soon will be) handled by `frontend_v2`, with pagination implemented there?

Clarifying this upfront would help avoid duplicating work or making changes that don’t surface in the UI.


Hey @bhudevbhanpuriya @irvincardoza,

I noticed you both are interested in this issue. Would you be open to working together on it?

@irvincardoza - your question about the frontend architecture is spot-on. I was wondering the same thing.
@bhudevbhanpuriya - your implementation plan looks solid.

I'm interested in contributing to this as well. A few options:

If you want to collaborate:
- We could split the work (backend/frontend)
- Or work together and review each other's code
- First step would be figuring out which frontend handles that route

If you're already working on it:
- No problem, just let me know and I'll find another issue

If you're not actively on it right now:
- I can start investigating and share what I find
Let me know what works for you. Happy to coordinate however makes sense.
Thanks!

Hello @bhudevbhanpuriya , I’d like to work on this issue. I’m happy to help clarify the frontend route and contribute accordingly. Please let me know. Thanks!

Hi @itschetna, just an updatethis issue has been resolved from my side. I’ll be pushing the pull request in around 15 minutes, so please feel free to move ahead with another issue. Thanks!

@parthcode22 , looks like you have already solved the issue, went over the pr and it looks great!