Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat : Feedback 스키마 변경 #27

Merged
merged 4 commits into from
Feb 18, 2025
Merged

feat : Feedback 스키마 변경 #27

merged 4 commits into from
Feb 18, 2025

Conversation

cowboysj
Copy link
Member

#️⃣ 관련 이슈

💡 작업내용

Feedback 스키마 수정

수정 전 수정 후
Image image

📝 기타

현재 UT용 피그마를 보고 FeedbackType을 아래 5개로 지정해놨는데 추후 확정된 후 변경해야 합니다.

TRANSLATION_OR_AWKWARD (번역체/어색한 표현)
LENGTH_OR_READABILITY (문장이 길거나 가독성이 떨어지는 표현 수정)
READABILITY_IMPROVEMENT (가독성 개선)
LOGICAL_LEAP (논리적 비약)
REDUNDANCY_OR_CLARITY (불필요한 반복 및 의미 명확화)

@cowboysj cowboysj self-assigned this Feb 18, 2025
@cowboysj cowboysj linked an issue Feb 18, 2025 that may be closed by this pull request
@cowboysj cowboysj requested a review from suker80 February 18, 2025 13:36
@github-actions github-actions bot requested a review from LeeHanEum February 18, 2025 13:36
@cowboysj cowboysj added the ✨ Feat 새로운 기능 구현 label Feb 18, 2025
Copy link
Contributor

coderabbitai bot commented Feb 18, 2025

Walkthrough

이번 PR에서는 피드백 도메인 관련 클래스와 열거형의 구조에 변경이 있었습니다. 새로운 클래스인 EvaluationDetailProjectEvaluation이 추가되었으며, 기존의 EvaluationType 열거형과 FeedbackPerProject 클래스가 삭제되었습니다. 또한, 기존 클래스 EvaluationItemFeedbackContent로 이름이 변경되었고, 내부 필드가 재구성되어 기존의 평가 관련 필드 대신 편집 전후 데이터를 포함하도록 수정되었습니다. FeedbackPerPage 클래스도 기존의 단일 문자열 필드를 제거하고, 페이지 번호와 여러 FeedbackContent 항목을 수용하는 구조로 변경되었습니다. 한편, FeedbackType 열거형이 추가되어 여러 피드백 유형 상수를 정의하는 새로운 방식이 도입되었으며, OverallEvaluation 클래스는 리스트와 문자열 필드를 단일 요약 및 여러 EvaluationDetail 객체로 대체하는 구조 변경이 이루어졌습니다.

✨ 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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 7

🧹 Nitpick comments (3)
src/main/java/depromeet/onepiece/feedback/domain/FeedbackPerPage.java (1)

9-12: 클래스 문서화 개선이 필요합니다.

현재 주석이 MongoDB 문서 저장에 대해서만 언급하고 있습니다. 클래스의 목적과 책임을 명확히 설명하는 문서화가 필요합니다.

다음과 같이 개선하는 것을 제안합니다:

-/** 확장을 고려해서 일단 document로 저장 */
+/**
+ * 페이지별 피드백 정보를 관리하는 도메인 클래스입니다.
+ * <p>
+ * 각 페이지는 고유한 페이지 번호와 해당 페이지에 대한 여러 피드백 내용을 포함합니다.
+ * MongoDB 문서로 저장되며, 향후 확장성을 고려한 구조를 가지고 있습니다.
+ */

또한 객체 생성을 위한 Builder 패턴 추가를 고려해 주세요:

@Builder
public class FeedbackPerPage {
    // ...
}
src/main/java/depromeet/onepiece/feedback/domain/FeedbackType.java (1)

8-16: 피드백 타입에 대한 문서화 개선 필요

각 피드백 타입의 사용 목적과 적용 시나리오에 대한 자세한 설명이 있으면 좋겠습니다.

각 enum 값에 Javadoc을 추가하는 것을 제안합니다:

  public enum FeedbackType {
+   /** 
+    * 번역체나 어색한 표현을 지적할 때 사용
+    * 예시: "~하는 것이 되겠습니다" -> "~합니다"
+    */
    TRANSLATION_OR_AWKWARD("번역체/어색한 표현"),
    
+   /**
+    * 문장의 길이가 과도하거나 이해하기 어려운 표현을 수정할 때 사용
+    * 예시: 긴 문장을 여러 문장으로 나누거나 복잡한 표현을 단순화
+    */
    LENGTH_OR_READABILITY("문장이 길거나 가독성이 떨어지는 표현 수정"),
    // ... 나머지 타입들에 대해서도 동일하게 문서화
src/main/java/depromeet/onepiece/feedback/domain/ProjectEvaluation.java (1)

11-33: MongoDB 인덱스 추가를 고려해주세요.

projectName은 조회 조건으로 자주 사용될 것으로 예상됩니다. MongoDB 컬렉션에 인덱스를 추가하여 조회 성능을 개선하는 것을 추천드립니다.

@Document(collection = "project_evaluation")
@CompoundIndex(def = "{'project_name': 1}")
public class ProjectEvaluation {
    // ...
}
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ba56991 and 03425bf.

📒 Files selected for processing (8)
  • src/main/java/depromeet/onepiece/feedback/domain/EvaluationDetail.java (1 hunks)
  • src/main/java/depromeet/onepiece/feedback/domain/EvaluationType.java (0 hunks)
  • src/main/java/depromeet/onepiece/feedback/domain/FeedbackContent.java (1 hunks)
  • src/main/java/depromeet/onepiece/feedback/domain/FeedbackPerPage.java (2 hunks)
  • src/main/java/depromeet/onepiece/feedback/domain/FeedbackPerProject.java (0 hunks)
  • src/main/java/depromeet/onepiece/feedback/domain/FeedbackType.java (1 hunks)
  • src/main/java/depromeet/onepiece/feedback/domain/OverallEvaluation.java (1 hunks)
  • src/main/java/depromeet/onepiece/feedback/domain/ProjectEvaluation.java (1 hunks)
💤 Files with no reviewable changes (2)
  • src/main/java/depromeet/onepiece/feedback/domain/EvaluationType.java
  • src/main/java/depromeet/onepiece/feedback/domain/FeedbackPerProject.java
🔇 Additional comments (1)
src/main/java/depromeet/onepiece/feedback/domain/ProjectEvaluation.java (1)

1-8: 패키지 구조와 임포트가 잘 구성되어 있습니다!

도메인 계층에 맞게 패키지가 구성되어 있으며, 필요한 임포트들이 잘 정리되어 있습니다.

Copy link
Collaborator

@suker80 suker80 left a comment

Choose a reason for hiding this comment

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

👍 굿 좋슴다

Copy link
Member

@LeeHanEum LeeHanEum left a comment

Choose a reason for hiding this comment

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

LGTM👍

@cowboysj cowboysj merged commit aab25ac into develop Feb 18, 2025
1 check passed
@cowboysj cowboysj deleted the feat/#24 branch February 18, 2025 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
✨ Feat 새로운 기능 구현
Projects
None yet
Development

Successfully merging this pull request may close these issues.

feat : Feedback MongoDB 스키마 수정
3 participants