Conversation
- Cards
There was a problem hiding this comment.
Pull request overview
This PR implements the Facilitator Library View UI, adding a new card component specifically designed for facilitators to view modules and access feedback.
- Added
ModuleCardFacilitatorcomponent with module viewing and feedback access functionality - Updated course viewing page to conditionally show the "Create Module" button only for administrators
- Enhanced module grid to use role-based rendering with a switch statement for cleaner code organization
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| frontend/src/components/course_viewing/library-viewing/ModuleCardFacilitator.tsx | New component that displays module cards for facilitators with a "View Feedback" button |
| frontend/src/components/course_viewing/CourseViewingPage.tsx | Added role check to restrict "Create Module" button to administrators only |
| frontend/src/components/course_viewing/CourseModulesGrid.tsx | Refactored module card rendering to use a switch statement for better role-based component selection |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| border: `1px solid ${theme.palette.Neutral[500]}`, | ||
| }} | ||
| onClick={handleFeedbackClick} | ||
| href={viewFeedbackUrl} |
There was a problem hiding this comment.
The Button component has both an onClick handler and an href prop. Since the navigation is handled via the onClick handler using history.push, the href prop is redundant and should be removed. Having both can cause confusion and may lead to inconsistent navigation behavior, especially with middle-clicks or right-clicks.
| href={viewFeedbackUrl} |
|
Visit the preview URL for this PR (updated for commit 9dbca06): https://extendafamily-7613e--pr174-jimmy-facilitator-li-wnt20ogx.web.app (expires Tue, 13 Jan 2026 23:45:07 GMT) 🔥 via Firebase Hosting GitHub Action 🌎 Sign: f8bb7b5cd838ab636347dc54fd0ab08ab3715d31 |
Notion ticket link
Ticket Name
Implementation description
Steps to test
What should reviewers focus on?
Checklist