Skip to content

Facilitator Library View UI#174

Merged
ji-mmyliu merged 1 commit intomainfrom
jimmy/facilitator-library-view
Jan 6, 2026
Merged

Facilitator Library View UI#174
ji-mmyliu merged 1 commit intomainfrom
jimmy/facilitator-library-view

Conversation

@ji-mmyliu
Copy link
Collaborator

  • Cards

Notion ticket link

Ticket Name

Implementation description

Steps to test

What should reviewers focus on?

Checklist

  • My PR name is descriptive and in imperative tense
  • My commit messages are descriptive and in imperative tense. My commits are atomic and trivial commits are squashed or fixup'd into non-trivial commits
  • I have run the appropriate linter(s)
  • I have requested a review from the PL, as well as other devs who have background knowledge on this PR or who will be building on top of this PR

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 the Facilitator Library View UI, adding a new card component specifically designed for facilitators to view modules and access feedback.

  • Added ModuleCardFacilitator component 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}
Copy link

Copilot AI Jan 6, 2026

Choose a reason for hiding this comment

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

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.

Suggested change
href={viewFeedbackUrl}

Copilot uses AI. Check for mistakes.
@github-actions
Copy link

github-actions bot commented Jan 6, 2026

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

@ji-mmyliu ji-mmyliu merged commit 2ad7d78 into main Jan 6, 2026
9 checks passed
@ji-mmyliu ji-mmyliu deleted the jimmy/facilitator-library-view branch January 6, 2026 23:50
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.

1 participant