Skip to content

Conversation

@DrCloy
Copy link
Collaborator

@DrCloy DrCloy commented Feb 24, 2025

#️⃣ 연관된 이슈

📝 작업 내용

  • 수업 종료시 통계 모달 연동

Summary by CodeRabbit

  • New Features
    • When closing a course, a new feedback modal now appears, summarizing the top three reaction counts.
    • The course closure process has been enhanced for a smoother experience with improved navigation upon modal closure.

@DrCloy DrCloy added ✨ Feat 새로운 기능 추가 (기능 개발 및 신규 기능 구현) ⚛️ FE 프론트엔드 관련 labels Feb 24, 2025
@DrCloy DrCloy requested a review from wwweric12 February 24, 2025 11:03
@coderabbitai
Copy link

coderabbitai bot commented Feb 24, 2025

Walkthrough

This pull request updates the ProfessorClassroom.tsx file by modifying the handleCloseClass function to be asynchronous. The function now awaits a course closure request and, upon success, constructs a sorted reaction list from state. The updated control flow displays a new modal component, ReactionModal, which shows the top three reactions. The modal includes an onClose handler to reset its state and navigate back to the professor's page. Error handling with popupError remains in place.

Changes

File Change Summary
front-end/src/pages/professor/course/classroom/ProfessorClassroom.tsx Updated handleCloseClass to asynchronous signature; integrated ReactionModal to display a sorted list of top three reactions after closing a course; maintained error handling and navigation on modal close.

Sequence Diagram(s)

sequenceDiagram
    participant U as User
    participant PC as ProfessorClassroom
    participant CR as ClassroomRepository
    participant RM as ReactionModal
    participant NV as Navigation

    U->>PC: Initiate course closure
    PC->>CR: closeCourse(courseId) (await)
    CR-->>PC: Course closed confirmation
    PC->>PC: Build and sort reaction list
    PC->>RM: Display ReactionModal with top reactions
    RM->>PC: onClose callback triggered
    PC->>NV: Redirect to professor's page
Loading

Possibly related PRs

Suggested reviewers

  • wwweric12

Poem

In the code forest I hop with glee,
Async paths unlock reactions to see.
Modal moments display sorted trends,
Error checks guide to necessary ends.
Hop, hop—let our code be free!
🐇✨


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c7bf056 and caeafac.

📒 Files selected for processing (1)
  • front-end/src/pages/professor/course/classroom/ProfessorClassroom.tsx (2 hunks)
🔇 Additional comments (1)
front-end/src/pages/professor/course/classroom/ProfessorClassroom.tsx (1)

27-27: LGTM!

The import statement follows the project's conventions and is properly placed with other component imports.

✨ Finishing Touches
  • 📝 Generate Docstrings (Beta)

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@DrCloy DrCloy linked an issue Feb 24, 2025 that may be closed by this pull request
1 task
Copy link
Collaborator

@wwweric12 wwweric12 left a comment

Choose a reason for hiding this comment

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

고생하셨습니다

@wwweric12 wwweric12 merged commit 6e19629 into dev Feb 24, 2025
2 checks passed
@wwweric12 wwweric12 deleted the feat/fe/professor-statistic branch February 24, 2025 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚛️ FE 프론트엔드 관련 ✨ Feat 새로운 기능 추가 (기능 개발 및 신규 기능 구현)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FE] 수업 종료 시 통계 모달 연동

3 participants