Conversation
Summary of ChangesHello @yeeun426, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 사용자 후기 시스템에 멘토 피드백 관련 문항을 추가하여 후기의 상세도를 높이는 것을 목표로 합니다. 이를 통해 사용자는 멘토에 대한 구체적인 피드백을 제공할 수 있으며, 관리자는 이 정보를 활용하여 서비스 개선에 기여할 수 있습니다. 데이터 스키마, API 타입, 사용자 및 관리자 인터페이스가 모두 업데이트되어 새로운 피드백 흐름을 완벽하게 지원합니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
이번 PR은 챌린지 후기 작성 시 1:1 피드백 관련 문항을 추가하는 변경사항을 담고 있습니다. 전반적으로 기능 추가는 잘 이루어졌지만, 여러 파일에 걸쳐 하드코딩된 질문 내용과 임시 텍스트('test')가 발견되었습니다. 이는 사용자에게 잘못된 정보가 노출될 수 있는 심각한 문제이므로 반드시 수정이 필요합니다. 또한, 일부 컴포넌트에서 복잡한 조건문과 비효율적인 데이터 조회가 확인되어 가독성 및 성능 개선을 위한 리팩토링을 제안합니다. 자세한 내용은 각 파일에 남긴 리뷰 코멘트를 참고해주세요.
| {feedbackMentorNickname && ( | ||
| <section> | ||
| <ReviewQuestion required className="mb-5"> | ||
| 6. 포트폴리오 2주 완성 챌린지 25기 1:1 피드백을 진행해 주신 멘토님의 | ||
| 닉네임을 작성해 주세요! | ||
| </ReviewQuestion> | ||
| <ReviewTextarea | ||
| value={feedbackMentorNickname ?? '-'} | ||
| readOnly | ||
| placeholder="test" | ||
| /> | ||
| </section> | ||
| )} |
| <ReviewQuestion required className="mb-5"> | ||
| 6. 포트폴리오 2주 완성 챌린지 25기 1:1 피드백을 진행해 주신 | ||
| 멘토님의 닉네임을 작성해 주세요! | ||
| </ReviewQuestion> |
| <ReviewQuestion required className="mb-5"> | ||
| 6. test | ||
| </ReviewQuestion> |
| <ReviewQuestion required className="mb-5"> | ||
| 6. test | ||
| </ReviewQuestion> |
| const feedbackMentorNickname = review?.reviewItemList?.find( | ||
| (r) => r.questionType === 'FEEDBACK_MENTOR_NICKNAME', | ||
| )?.answer; | ||
| const feedbackGoodPoint = review?.reviewItemList?.find( | ||
| (r) => r.questionType === 'FEEDBACK_GOOD_POINT', | ||
| )?.answer; | ||
| const feedbackBadPoint = review?.reviewItemList?.find( | ||
| (r) => r.questionType === 'FEEDBACK_BAD_POINT', | ||
| )?.answer; |
| const isDisabled = | ||
| !score || !npsScore || !goodPoint || !badPoint || !goalResult; | ||
| !score || | ||
| !npsScore || | ||
| !goodPoint || | ||
| !badPoint || | ||
| !goalResult || | ||
| (isFeedbackApplied && | ||
| (!feedbackMentorNickname || !feedbackGoodPoint || !feedbackBadPoint)); |
There was a problem hiding this comment.
제출 버튼의 활성화 여부를 결정하는 isDisabled 조건이 복잡해지고 있습니다. 가이드라인의 '복잡한 조건 이름짓기' 규칙(241-272행)에 따라, 각 조건을 의미 있는 이름의 변수로 추출하여 가독성을 높이는 것을 권장합니다.
| const isDisabled = | |
| !score || !npsScore || !goodPoint || !badPoint || !goalResult; | |
| !score || | |
| !npsScore || | |
| !goodPoint || | |
| !badPoint || | |
| !goalResult || | |
| (isFeedbackApplied && | |
| (!feedbackMentorNickname || !feedbackGoodPoint || !feedbackBadPoint)); | |
| const areCoreQuestionsMissing = !score || !npsScore || !goodPoint || !badPoint || !goalResult; | |
| const areFeedbackQuestionsMissing = | |
| isFeedbackApplied && | |
| (!feedbackMentorNickname || !feedbackGoodPoint || !feedbackBadPoint); | |
| const isDisabled = areCoreQuestionsMissing || areFeedbackQuestionsMissing; |
References
- 복잡한 불리언 조건을 명명된 변수에 할당하여 코드의 의미를 명확하게 하고 가독성을 향상시킵니다. (link)
| {selectedRow.reviewItemList?.find( | ||
| (item) => item.questionType === 'FEEDBACK_MENTOR_NICKNAME', | ||
| )?.answer && ( | ||
| <> | ||
| <Typography variant="body1"> | ||
| <strong>피드백 멘토 닉네임:</strong>{' '} | ||
| {selectedRow.reviewItemList?.find( | ||
| (item) => item.questionType === 'FEEDBACK_MENTOR_NICKNAME', | ||
| )?.answer || '-'} | ||
| </Typography> | ||
| <Typography variant="body1"> | ||
| <strong>피드백 만족했던 점:</strong>{' '} | ||
| {selectedRow.reviewItemList?.find( | ||
| (item) => item.questionType === 'FEEDBACK_GOOD_POINT', | ||
| )?.answer || '-'} | ||
| </Typography> | ||
| <Typography variant="body1"> | ||
| <strong>피드백 아쉬웠던 점:</strong>{' '} | ||
| {selectedRow.reviewItemList?.find( | ||
| (item) => item.questionType === 'FEEDBACK_BAD_POINT', | ||
| )?.answer || '-'} | ||
| </Typography> | ||
| </> | ||
| )} |
| const isDisabled = | ||
| !score || !npsScore || !goodPoint || !badPoint || !goalResult; | ||
| !score || | ||
| !npsScore || | ||
| !goodPoint || | ||
| !badPoint || | ||
| !goalResult || | ||
| (isFeedbackApplied && | ||
| (!feedbackMentorNickname || !feedbackGoodPoint || !feedbackBadPoint)); |
There was a problem hiding this comment.
제출 버튼의 활성화 여부를 결정하는 isDisabled 조건이 복잡합니다. 가이드라인의 '복잡한 조건 이름짓기' 규칙(241-272행)에 따라, 각 조건을 의미 있는 이름의 변수로 추출하여 가독성을 높이는 것을 권장합니다.
| const isDisabled = | |
| !score || !npsScore || !goodPoint || !badPoint || !goalResult; | |
| !score || | |
| !npsScore || | |
| !goodPoint || | |
| !badPoint || | |
| !goalResult || | |
| (isFeedbackApplied && | |
| (!feedbackMentorNickname || !feedbackGoodPoint || !feedbackBadPoint)); | |
| const areCoreQuestionsMissing = !score || !npsScore || !goodPoint || !badPoint || !goalResult; | |
| const areFeedbackQuestionsMissing = | |
| isFeedbackApplied && | |
| (!feedbackMentorNickname || !feedbackGoodPoint || !feedbackBadPoint); | |
| const isDisabled = areCoreQuestionsMissing || areFeedbackQuestionsMissing; |
References
- 복잡한 불리언 조건을 명명된 변수에 할당하여 코드의 의미를 명확하게 하고 가독성을 향상시킵니다. (link)
| const isDisabled = | ||
| !score || !npsScore || !goodPoint || !badPoint || !goalResult; | ||
| !score || | ||
| !npsScore || | ||
| !goodPoint || | ||
| !badPoint || | ||
| !goalResult || | ||
| (isFeedbackApplied && | ||
| (!feedbackMentorNickname || !feedbackGoodPoint || !feedbackBadPoint)); |
There was a problem hiding this comment.
제출 버튼의 활성화 여부를 결정하는 isDisabled 조건이 복잡합니다. 가이드라인의 '복잡한 조건 이름짓기' 규칙(241-272행)에 따라, 각 조건을 의미 있는 이름의 변수로 추출하여 가독성을 높이는 것을 권장합니다.
| const isDisabled = | |
| !score || !npsScore || !goodPoint || !badPoint || !goalResult; | |
| !score || | |
| !npsScore || | |
| !goodPoint || | |
| !badPoint || | |
| !goalResult || | |
| (isFeedbackApplied && | |
| (!feedbackMentorNickname || !feedbackGoodPoint || !feedbackBadPoint)); | |
| const areCoreQuestionsMissing = !score || !npsScore || !goodPoint || !badPoint || !goalResult; | |
| const areFeedbackQuestionsMissing = | |
| isFeedbackApplied && | |
| (!feedbackMentorNickname || !feedbackGoodPoint || !feedbackBadPoint); | |
| const isDisabled = areCoreQuestionsMissing || areFeedbackQuestionsMissing; |
References
- 복잡한 불리언 조건을 명명된 변수에 할당하여 코드의 의미를 명확하게 하고 가독성을 향상시킵니다. (link)
연관 작업