Skip to content

Feat: Implement Server-Side Pagination and Explore page (#1175)#1193

Open
desireddymohithreddy0925 wants to merge 2 commits into
komalharshita:mainfrom
desireddymohithreddy0925:feat/issue-1175-explore-page
Open

Feat: Implement Server-Side Pagination and Explore page (#1175)#1193
desireddymohithreddy0925 wants to merge 2 commits into
komalharshita:mainfrom
desireddymohithreddy0925:feat/issue-1175-explore-page

Conversation

@desireddymohithreddy0925

Copy link
Copy Markdown

Summary

This PR addresses issue #1175 by adding a new "Explore All" page that provides users with a comprehensive view of the entire project catalog. By implementing server-side pagination, filtering, and sorting directly in the Flask backend, we avoid overwhelming the client browser or sending the full JSON payload on every page load. The frontend features a newly created Jinja2 template (explore.html) which leverages the existing layout architecture but introduces a new sticky sidebar containing robust filter options (Search, Level, Interest, Time, Sort) alongside pagination controls at the bottom of the grid.

Related Issue

Closes #1175

Type of Change

  • Bug fix — resolves a broken behaviour
  • Feature — adds new functionality
  • Data — adds new projects to data/projects.json
  • Documentation — updates docs, README, or code comments only
  • Style — CSS or visual changes only, no logic change
  • Refactor — restructures code without changing behaviour
  • Test — adds or updates tests

What Was Changed

File Change made
src/routes/main_routes.py Added a new @main.route("/explore") endpoint. Extracts page, per_page, search, level, interest, time, and sort parameters from the query string. Loops through load_all_projects() to apply the filtering logic, applies python's native sort() method based on user preference, and finally uses list slicing [start_idx:end_idx] to paginate the result set before serving to Jinja2.
src/templates/explore.html Created a brand new Jinja2 template that mimics the site's layout. Removed the hero/landing elements and added a 2-column layout: a <form method="GET"> sidebar for filters on the left, and the dynamic project-card results grid on the right. Added Previous/Next pagination controls that preserve active filters in the URL.
src/templates/index.html Added an "Explore All" link to both the mobile navigation menu and the footer menu so users can easily reach the new page.
tests/test_basic.py Implemented test_explore_route() to assert that a GET /explore?page=1&per_page=5 returns a HTTP 200 OK status and properly renders the project cards within the bounds of pagination parameters.

How to Test This PR

  1. Clone this branch: git checkout feat/issue-1175-explore-page
  2. Install dependencies: pip install -r requirements.txt
  3. Run the app: python app.py
  4. Open your browser and navigate to the home page.
  5. Click Explore All from the footer or the mobile menu.
  6. Verify the sidebar filters work as expected (e.g. search for "API", select Level "Beginner" and click "Apply Filters").
  7. Click "Next" on the pagination block at the bottom and confirm the URL query parameters update properly (e.g., ?page=2&level=beginner&...).

Expected test output:

28 passed, 0 failed out of 28 tests

Test Results

============================= test session starts ==============================
platform darwin -- Python 3.x.x, pytest-x.x.x, pluggy-x.x.x
rootdir: /Users/desireddymohithreddy/GSSOC2026DevPath/DevPathMRD
collected 28 items                                                             

tests/test_basic.py ............................                         [100%]

============================== 28 passed in 0.14s ==============================

Self-Review Checklist

  • I have read CONTRIBUTING.md and followed all guidelines
  • My branch name follows the convention: feat/, fix/, docs/, data/, style/, test/
  • I have run python tests/test_basic.py and all 28 tests pass
  • I have run flake8 . locally and there are no errors
  • I have not introduced any print() or console.log() debug statements
  • Every new function I wrote has a docstring
  • I have not modified files outside the scope of the linked issue
  • If I changed the UI, I tested it at 375px (mobile) and 1280px (desktop)
  • If I added a project to the dataset, it has all required JSON fields

Notes for Reviewer

None

…a#1175)

- Added /explore route in main_routes.py with pagination, sorting and filtering support
- Created explore.html Jinja2 template using the existing design system
- Updated site navigation to link to Explore All page
- Added test_explore_route to tests/test_basic.py
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

@komalharshita

Copy link
Copy Markdown
Owner

@desireddymohithreddy0925 kindly resolve the merge conflicts

@github-actions github-actions Bot added the data label Jul 18, 2026
@desireddymohithreddy0925

Copy link
Copy Markdown
Author

@komalharshita done mam

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature]: Server-Side Pagination and Filtering for "Explore All" page

2 participants