Skip to content

Conversation

@hyesngy
Copy link
Member

@hyesngy hyesngy commented Nov 30, 2025

✨ 작업 개요

용어 상세 페이지 관련용어 탭 수정

📌 관련 이슈

✅ 작업 내용

용어 상세 페이지 관련용어 탭 수정

📷 UI 스크린샷 (해당 시)

💬 기타 사항

Summary by CodeRabbit

릴리스 노트

  • 리팩토링
    • 관련 용어 탭의 내부 구조를 간소화했습니다.
    • 혼동 용어(Confusable Terms) 섹션이 제거되었습니다.
    • 관련 용어 표시 방식을 개선하여 성능을 최적화했습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

@hyesngy hyesngy self-assigned this Nov 30, 2025
@hyesngy hyesngy requested a review from a team as a code owner November 30, 2025 08:28
@hyesngy hyesngy added the 🛠 Fix 버그 수정 label Nov 30, 2025
@hyesngy hyesngy linked an issue Nov 30, 2025 that may be closed by this pull request
@vercel
Copy link

vercel bot commented Nov 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
gotit Ready Ready Preview Comment Nov 30, 2025 8:29am

@coderabbitai
Copy link

coderabbitai bot commented Nov 30, 2025

워크스루

용어 상세 페이지의 RelatedTab 컴포넌트에서 term props를 제거하고 ConfusableTerms 섹션 및 관련 데이터 페칭 로직을 삭제하여 관련용어 탭을 단순화했습니다. 이제 컴포넌트는 relatedTerms 배열만 전달받아 렌더링합니다.

변경 사항

코호트 / 파일 변경 요약
TabSection 업데이트
src/components/term-detail/TabSection.tsx
RelatedTab 컴포넌트 호출에서 term props 제거
RelatedTab 간소화
src/components/term-detail/tabs/RelatedTab.tsx
term props 제거, useState/useEffect 제거, ConfusableTerms 컴포넌트 및 데이터 페칭 로직 삭제, RelatedTabProps 인터페이스 단순화

예상 코드 리뷰 노력

🎯 2 (Simple) | ⏱️ ~10분

  • 주목할 점:
    • RelatedTab의 공개 API가 축소되었으므로, 이 컴포넌트를 사용하는 다른 모든 위치에서 term props 참조가 제거되었는지 확인 필요
    • ConfusableTerms 컴포넌트 제거로 인해 다른 곳에서 이를 참조하고 있지 않은지 확인
    • 불필요한 imports가 완벽하게 정리되었는지 검증

제안 라벨

🧹 Refactor

🐰 혼란스러운 용어는 안녕,
관련어만 깔끔하게 남겨두고,
RelatedTab은 이제 가볍네!
불필요한 상태와 효과를 떨쳐내니,
코드가 더욱 명확해졌네! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 33.33% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed PR 제목이 연결된 이슈 #84의 핵심 변경사항(관련용어 탭에서 헷갈리는 용어 제거)을 명확하게 설명합니다.
Linked Issues check ✅ Passed 코드 변경사항이 이슈 #84의 요구사항을 충족합니다: ConfusableTerms(헷갈리는 용어) 컴포넌트를 제거하여 관련용어만 표시하도록 수정했습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 이슈 #84의 범위 내에 있습니다: RelatedTab의 불필요한 데이터 의존성 제거 및 ConfusableTerms 섹션 삭제는 관련용어만 표시하기 위한 필수 변경입니다.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/84-terms-detail

📜 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 a31d4a0 and 98fc940.

📒 Files selected for processing (2)
  • src/components/term-detail/TabSection.tsx (1 hunks)
  • src/components/term-detail/tabs/RelatedTab.tsx (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/components/term-detail/TabSection.tsx (1)
src/components/term-detail/tabs/RelatedTab.tsx (1)
  • RelatedTab (20-39)
🔇 Additional comments (4)
src/components/term-detail/tabs/RelatedTab.tsx (3)

5-5: 불필요한 import 제거가 적절합니다.

TermDetailgetRelatedTerms import를 제거하여 컴포넌트가 더 이상 내부적으로 데이터를 가져오지 않음을 명확히 했습니다. TermIndexItem 타입만 유지하는 것이 새로운 컴포넌트 역할에 적합합니다.


16-18: Props 인터페이스 단순화가 버그 수정 의도와 일치합니다.

term prop을 제거하고 relatedTerms만 받도록 변경한 것이 올바릅니다. 이를 통해 컴포넌트가 혼동하기 쉬운 용어를 내부적으로 가져오는 로직을 제거할 수 있게 되었습니다.


20-38: 순수 프레젠테이션 컴포넌트로의 전환이 성공적입니다.

RelatedTab이 이제 전달받은 relatedTerms만 렌더링하는 순수 컴포넌트가 되었습니다. 이는 다음과 같은 이점을 제공합니다:

  • 혼동하기 쉬운 용어가 표시되는 버그 수정 완료
  • 컴포넌트 책임 명확화 (데이터 관리는 상위 컴포넌트로 이관)
  • 테스트 및 유지보수 용이성 향상
  • 빈 상태 처리도 적절히 구현됨
src/components/term-detail/TabSection.tsx (1)

29-29: RelatedTab component now receives only relatedTerms prop without the term prop.

The implementation is correct. TabSection properly passes relatedTerms to RelatedTab, which exclusively uses this data to render the list of related terms. The term prop was removed from the RelatedTab invocation, simplifying the component's API and ensuring it only displays the provided related terms without requiring redundant data.


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

Comment @coderabbitai help to get the list of available commands and usage tips.

@hyesngy hyesngy merged commit 85a08cc into develop Nov 30, 2025
3 of 4 checks passed
@hyesngy hyesngy deleted the fix/84-terms-detail branch November 30, 2025 08:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🛠 Fix 버그 수정

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 용어 상세 관련용어 탭 수정

2 participants