Skip to content

Conversation

@Seon-K
Copy link
Contributor

@Seon-K Seon-K commented Aug 5, 2025

👻 관련 이슈 번호

👻 요약

  • 리뷰 아바타 추가했습니다.
  • 체험 설명도 토글 추가했습니다.

👻 주요 변경 사항

👻 체크리스트

  • Assignees에 본인을 등록했나요?
  • 라벨을 사이드 탭에서 등록했나요?
  • PR은 사이드 탭 Projects를 등록 하지마세요.
  • PR은 Milestone을 등록 하지마세요.
  • PR을 보내는 브랜치가 올바른지 확인했나요?
  • 팀원들이 리뷰하기 쉽도록 설명을 자세하게 작성했나요?
  • 변경사항을 충분히 테스트 했나요?
  • 컨벤션에 맞게 구현했나요?

📷 UI 변경 사항

스크린샷 2025-08-05 100853

체험 설며

👻 문제 사항

👻 논의 사항

👻 기타 참고 사항

Summary by CodeRabbit

  • 신규 기능

    • 텍스트 확장/축소 기능을 다양한 영역(리뷰, 설명)에 적용할 수 있도록 개선되었습니다.
    • 프로필 이미지를 활용한 아바타가 리뷰 카드에 추가되었습니다.
  • 스타일

    • 리뷰 카드 내 요소 간 간격이 더 넓어져 가독성이 향상되었습니다.
    • 에러 화면의 최소 높이가 화면 전체 높이로 조정되어 레이아웃 안정성이 향상되었습니다.
  • 리팩터

    • 텍스트 확장 컴포넌트의 이름과 구조가 변경되어 일관성이 높아졌습니다.
    • 인증 토큰 갱신 시 쿠키 설정 로직이 중앙화되어 유지보수가 용이해졌습니다.

@coderabbitai
Copy link

coderabbitai bot commented Aug 5, 2025

Walkthrough

ExpandableReview 컴포넌트가 ExpandableText로 이름이 변경되고, 최대 높이를 동적으로 지정할 수 있는 maxHeight prop이 추가되었습니다. 이 컴포넌트는 이제 ReviewCardDescriptionSection에서 사용되며, 각각 기존의 텍스트 렌더링 방식을 대체합니다. 아바타 컴포넌트가 ReviewCard에 추가되었습니다.

Changes

Cohort / File(s) Change Summary
ExpandableText 컴포넌트 리팩토링
src/domain/Activity/components/detail/Review/ExpandableText.tsx
컴포넌트명을 ExpandableReview에서 ExpandableText로 변경, maxHeight prop 추가, 최대 높이 동적 처리, gradient overlay 제거
ReviewCard 컴포넌트 업데이트
src/domain/Activity/components/detail/Review/ReviewCard.tsx
ExpandableReviewExpandableText로 교체, 아바타 컴포넌트 추가, 컨테이너 간격 조정
DescriptionSection에서 ExpandableText 적용
src/domain/Activity/components/detail/description/DescriptionSection.tsx
기존 <p> 태그로 렌더링하던 설명을 ExpandableText 컴포넌트로 변경하여 표시 방식 위임
에러 페이지 레이아웃 개선
src/app/error.tsx, src/app/(app)/error.tsx
루트 컨테이너에 min-h-screen 클래스 추가로 최소 화면 높이 보장
API 에러 메시지 수정
src/app/api/test/error/route.ts
409 응답 메시지를 "이름"에서 "이메일" 관련 메시지로 변경
미들웨어 리팩토링
src/middleware.ts
액세스 토큰 갱신 후 쿠키 설정 로직을 setAuthCookies 유틸 함수로 위임

Sequence Diagram(s)

sequenceDiagram
    participant ParentComponent
    participant ExpandableText

    ParentComponent->>ExpandableText: text, maxHeight 전달
    ExpandableText->>ExpandableText: 텍스트 길이와 maxHeight로 렌더링 결정
    ExpandableText-->>ParentComponent: 확장/축소된 텍스트 렌더링
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

  • Feat: ReviewCard 컴포넌트 #172: ReviewCard 및 관련 유틸리티의 초기 도입과 관련된 PR로, 본 PR에서 해당 컴포넌트의 리팩토링과 확장 작업이 이루어짐.

Suggested labels

feat, refactor

Suggested reviewers

  • justhighway
  • sgoldenbird

Poem

🐰
새로운 이름, 높이도 자유롭게
텍스트가 쏙쏙, 아바타도 반짝
리뷰와 설명이 더 멋져졌네
코드 속 토끼가 깡충깡충
리팩토링의 봄바람 불어오네!
🌱✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.


📜 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 7b8559a and 3b02d17.

📒 Files selected for processing (4)
  • src/app/(app)/error.tsx (1 hunks)
  • src/app/api/test/error/route.ts (1 hunks)
  • src/app/error.tsx (1 hunks)
  • src/middleware.ts (2 hunks)
✅ Files skipped from review due to trivial changes (3)
  • src/app/api/test/error/route.ts
  • src/app/error.tsx
  • src/app/(app)/error.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: vercel-preview
🔇 Additional comments (2)
src/middleware.ts (2)

3-3: LGTM! 쿠키 설정 로직을 유틸리티 함수로 분리한 좋은 리팩토링입니다.

인증 쿠키 설정 로직을 중앙화하여 코드의 재사용성과 유지보수성을 향상시켰습니다.


139-146: 쿠키 설정 로직 중앙화 검증 완료
setAuthCookies(src/domain/Auth/utils/setAuthCookies.ts) 함수가 accessToken, refreshToken 모두에 대해

  • httpOnly: true
  • secure: process.env.NODE_ENV === 'production'
  • sameSite: 'lax'
  • path: '/'
  • maxAge: (accessToken 1시간, refreshToken 7일)
    옵션을 올바르게 설정하는 것을 확인했습니다. 기존 수동 설정 로직과 동일하게 동작하므로 변경사항을 승인합니다.
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/review-avatar

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ 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.
    • Explain this complex logic.
    • 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 explain this code block.
  • 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 explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @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.

@github-actions
Copy link

github-actions bot commented Aug 5, 2025

✅ Preview Deployment Ready!

🔗 Preview URL: https://roam-ready-j7rx5jws5-yongmins-projects-bf5f7733.vercel.app
📝 Branch: feat/review-avatar
💾 Commit: Reactor: 체험 상세
🕐 Deployed at:


This preview will be automatically updated on new commits.

Copy link

@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: 2

🧹 Nitpick comments (2)
src/domain/Activity/components/detail/Review/ExpandableText.tsx (2)

24-31: 성능 최적화를 위해 의존성 배열을 개선해 주세요.

useEffect의 의존성 배열에 collapsedMaxHeight를 추가하여 값 변경 시에도 토글 버튼 표시 여부를 재계산하도록 해주세요.

     });
-  }, [text]);
+  }, [text, collapsedMaxHeight]);

33-44: 리사이즈 이벤트 핸들러에 의존성 배열을 추가해 주세요.

collapsedMaxHeight 값이 변경될 때도 리사이즈 핸들러가 올바르게 동작하도록 의존성 배열을 추가해주세요.

     window.addEventListener('resize', handleResize);
     return () => window.removeEventListener('resize', handleResize);
-  }, []);
+  }, [collapsedMaxHeight]);
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 9bcdf6d and 7b8559a.

📒 Files selected for processing (3)
  • src/domain/Activity/components/detail/Review/ExpandableText.tsx (2 hunks)
  • src/domain/Activity/components/detail/Review/ReviewCard.tsx (3 hunks)
  • src/domain/Activity/components/detail/description/DescriptionSection.tsx (2 hunks)
🔇 Additional comments (6)
src/domain/Activity/components/detail/Review/ExpandableText.tsx (1)

52-55: 동적 Tailwind CSS 클래스 감지 보장 확인 필요
템플릿 리터럴로 생성되는 max-h-[${maxHeight}px] 클래스는 빌드 시점에 소스 코드에 직접 등장하지 않아 Tailwind JIT 모드가 스캔하지 못할 수 있습니다. 프로젝트 내에 tailwind.config.* 파일이 확인되지 않아 safelist 설정 여부를 알 수 없으니, 다음을 검토해주세요:

  • tailwind.config.js(또는 .ts) 파일 위치 및 내용 확인
  • safelist에 사용될 dynamic 클래스 패턴(예: max-h-[*px]) 추가
  • 가능한 값의 범위를 사전에 명시하거나, 동적 클래스 대신 inline style/고정 클래스 사용 고려
src/domain/Activity/components/detail/Review/ReviewCard.tsx (3)

3-4: 새로운 컴포넌트 import가 올바르게 적용되었습니다.

ExpandableTextAvatar 컴포넌트 import가 적절히 추가되어 UI 개선 목표에 부합합니다.


41-48: 아바타 컴포넌트 추가와 레이아웃 개선이 우수합니다.

사용자 아바타 추가로 리뷰의 시각적 식별성이 향상되었고, gap 값 증가(gap-4gap-10)로 요소 간 간격이 개선되었습니다.


66-66: ExpandableText 컴포넌트 적용이 적절합니다.

기존 텍스트 렌더링을 ExpandableText 컴포넌트로 대체하여 긴 리뷰 내용의 가독성이 향상되었습니다.

src/domain/Activity/components/detail/description/DescriptionSection.tsx (2)

1-1: ExpandableText 컴포넌트 import가 적절합니다.

체험 설명에도 확장/축소 기능을 제공하기 위한 일관된 접근입니다.


21-21: 체험 설명에 토글 기능 추가가 우수합니다.

기존 정적 텍스트를 ExpandableText 컴포넌트로 교체하여 긴 설명의 가독성을 개선하고 PR 목표인 "체험 설명 토글 기능"을 성공적으로 구현했습니다.

@Seon-K Seon-K merged commit caae55e into develop Aug 5, 2025
1 of 2 checks passed
@Seon-K Seon-K deleted the feat/review-avatar branch August 5, 2025 01:44
@Seon-K Seon-K self-assigned this Aug 5, 2025
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.

4 participants