Conversation
Contributor
There was a problem hiding this comment.
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.
Alaa2019-ml
approved these changes
Feb 26, 2026
Alaa2019-ml
approved these changes
Feb 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
list of appointments that has approved label: