Skip to content

Feat/teacher reviews#107

Merged
Majoodeh merged 14 commits intodevelopfrom
feat/teacher-reviews
Feb 26, 2026
Merged

Feat/teacher reviews#107
Majoodeh merged 14 commits intodevelopfrom
feat/teacher-reviews

Conversation

@Majoodeh
Copy link
Contributor

Implemented the Reviews feature.

Key Features:

-Auth Protected: Only visible to logged-in users. can review

  • Smart Filtering: Dropdown only shows approved lessons for the current teacher.

  • UX: Includes star ratings, loading states, and automatic form reset.

  • Not logged-in users can view Reviews but not submit a review

image image

list of appointments that has approved label:

image

Copilot AI review requested due to automatic review settings February 25, 2026 15:13
@HackYourFutures HackYourFutures temporarily deployed to study-bridge-feat-teach-p2fmn5 February 25, 2026 15:14 Inactive
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements a comprehensive reviews feature for teachers, allowing students to submit and view reviews for completed lessons. The implementation includes API integration, React Query hooks for data fetching and mutations, and UI components for displaying and submitting reviews with star ratings.

Changes:

  • Added review API endpoints (get reviews, create review, get average rating) with TypeScript types
  • Implemented React Query hooks for fetching paginated reviews and creating new reviews
  • Created UI components: ReviewsManager for orchestration, ReviewsTeacher for display, ReviewCardTeacher for individual reviews, and AddReview for submission form
  • Updated teacher detail page to integrate the new reviews section

Reviewed changes

Copilot reviewed 11 out of 11 changed files in this pull request and generated 11 comments.

Show a summary per file
File Description
client/src/api/review/review.api.ts Defines API functions for fetching paginated reviews, getting teacher average rating, and creating reviews
client/src/api/review/review.type.ts TypeScript type definitions for review data structures and API responses
client/src/features/review/query/useReviewsQuery.ts React Query hook for fetching paginated teacher reviews with placeholder data
client/src/features/review/mutations/useCreateReviewMutation.ts React Query mutation hook for creating reviews with query invalidation
client/src/features/queryKeys.ts Added query key definitions for reviews and average ratings
client/src/components/teacherSection/Reviews/ReviewsManager.tsx Manager component that handles pagination logic and accumulates reviews across pages
client/src/components/teacherSection/Reviews/ReviewsTeacher.tsx Display component refactored from hardcoded data to props-based dynamic reviews
client/src/components/teacherSection/Reviews/ReviewCardTeacher.tsx Card component updated to use actual review data from API instead of mock props
client/src/components/teacherSection/Reviews/AddReview.tsx Form component for submitting reviews with lesson selection, star rating, and text input
client/src/components/rating/Rating.tsx Added documentation comment (with a typo) explaining component functionality
client/src/pages/teacherDetail/teacherDetail.tsx Integrated ReviewsManager component and reordered CSS classes

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@HackYourFutures HackYourFutures temporarily deployed to study-bridge-feat-teach-p2fmn5 February 26, 2026 19:36 Inactive
@Majoodeh Majoodeh merged commit 206edce into develop Feb 26, 2026
2 checks passed
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.

4 participants