Skip to content
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

🚀 Enhance Course Library with Filtering & Search Integration #41

Merged
merged 5 commits into from
Apr 11, 2025

Conversation

TristanHourtoulle
Copy link
Member

🚀 PR: Enhance Course Library with Filtering & Search Integration

📝 Description

This PR introduces a fully integrated filtering and search system to the Library page, providing a smoother and more powerful experience for users to navigate through their courses.


✅ What’s Included

  • 💡 Display all user courses in a structured and sortable DataTable
  • 🎯 Add dynamic filtering by:
    • Subject
    • Level
    • Title
  • 🔁 Allow users to reset active filters individually
  • 🔍 Add a search bar with real-time input that works seamlessly with filters
  • 🧠 Extract a centralized applyCourseFilter() function to handle combined filtering + search logic

⚙️ Technical Overview

  • applyCourseFilter() returns only courses that match both the active filter and search string
  • Triggers automatically via useEffect() on userCourses, filter, or search updates
  • Fully modular: SearchBar, FilterCourses, and DataTable are independent components

📸 UX Highlights

  • Filters update results immediately
  • Search bar filters across title/subject/level
  • Search + Filter combination is fully supported
  • Reset options improve usability

🧪 To Test

  • Filtering by subject, level, title
  • Free-text search
  • Combined filtering + search
  • Resetting filters and/or search
  • Correct table rendering

📦 Commits

  • feat: can display in a table all courses from the user
  • feat: handle filter input
  • feat: add reset filter option if we have an active filter
  • feat: add search input on list (works WITH filter btn)

@khalidbelk
Copy link
Member

LGTM ! Tested locally and works smoothly. Well done 🚀 @TristanHourtoulle

@khalidbelk khalidbelk merged commit c0fa2c6 into dev Apr 11, 2025
3 checks passed
@khalidbelk khalidbelk deleted the feat/library branch April 12, 2025 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Intégrer les appels API à la page /library pour récupérer les cours
2 participants