Skip to content

Refactor/home universitylist#218

Merged
manNomi merged 3 commits intosolid-connection:mainfrom
manNomi:refactor/home-universitylist
Aug 3, 2025
Merged

Refactor/home universitylist#218
manNomi merged 3 commits intosolid-connection:mainfrom
manNomi:refactor/home-universitylist

Conversation

@manNomi
Copy link
Contributor

@manNomi manNomi commented Aug 3, 2025

관련 이슈

  • resolves: #이슈번호
    작업 내용

  • NewsSection 컴포넌트를 dynamic()으로 코드 스플리팅하여 렌더 타이밍 조절

  • SSR 미적용(ssr: false)을 통해 초기 LCP 후보에서 제외

  • 고정 높이 Skeleton을 사용해 CLS 방지

특이 사항

  • Skeleton이 높이를 확보하고 있어 레이아웃 시프트는 없습니다.
  • 이미지의 lazy loading은 그대로 유지해 추가적인 네트워크 절약을 유도합니다.
  • 추후 퍼포먼스 수치 확인 후 IntersectionObserver 기반 렌더링까지 고려할 수 있습니다.

@manNomi manNomi requested a review from wibaek as a code owner August 3, 2025 04:31
@coderabbitai
Copy link

coderabbitai bot commented Aug 3, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

  1. API 엔드포인트 변경
    • 추천 대학 및 대학 검색 관련 API 엔드포인트가 /univ-apply-infos/recommend, /univ-apply-infos/search에서 각각 /universities/recommend, /universities/search로 변경되었습니다.
  2. 서버 fetch 유틸리티 수정
    • 서버 fetch에서 사용되는 BASE URL이 stage 환경에서 production 환경(https://api.solid-connection.com)으로 변경되었습니다.
  3. 뉴스 섹션 UI 신설 및 리팩토링
    • NewsSection 컴포넌트와 그 스켈레톤 컴포넌트가 새롭게 추가되어, 뉴스 목록을 뷰포트 진입 시에만 보여주고, 그 전에는 로딩용 스켈레톤을 표시합니다.
    • 홈 화면에서 뉴스 리스트와 대학 리스트 UI가 동적 import로 변경되어, 각각 로딩 중에는 스켈레톤 컴포넌트가 표시됩니다.
  4. 인기 대학 섹션 개선
    • PopularUniversitySection 컴포넌트가 비동기 함수로 변경되고, 이미지 로딩 우선순위 제어가 명시적으로 추가되었습니다.
    • 불필요한 gradient overlay와 wheel 핸들러가 제거되었습니다.
  5. 대학 리스트 및 카드 UI 개선
    • UniversityList 컴포넌트의 데이터 전달 로직이 단순화되고, 로딩용 스켈레톤 컴포넌트가 추가되었습니다.
    • 대학 카드의 로고 이미지에 priority={true}가 추가되어, 이미지 로딩이 빨라집니다.
  6. 글로벌 폰트 및 레이아웃 변경
    • Google Inter 폰트가 제거되고, Pretendard 폰트만 사용하도록 통일되었습니다.
    • 폰트 로딩 및 fallback 관련 CSS가 간소화되고, 글로벌 스타일이 정리되었습니다.
  7. React Query Devtools 비활성화
    • ReactQueryDevtools가 주석 처리되어, 더 이상 개발자 도구 UI가 노출되지 않습니다.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20분

  • 변경 범위가 여러 UI 컴포넌트, API 유틸리티, 글로벌 레이아웃 등 다양한 부분에 걸쳐 있으며, 신규 컴포넌트 추가와 동적 import, 엔드포인트 변경 등 중간 정도의 복잡도를 보입니다.

Suggested reviewers

  • wibaek

📜 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 dbd83c4 and 6ae4302.

📒 Files selected for processing (8)
  • src/app/_home/_ui/NewsSection/index.tsx (1 hunks)
  • src/app/_home/_ui/PopularUniversitySection/index.tsx (2 hunks)
  • src/app/_home/_ui/UniversityList/index.tsx (1 hunks)
  • src/app/_home/_ui/UniversityList/skeleton/index.tsx (1 hunks)
  • src/app/_home/index.tsx (2 hunks)
  • src/app/layout.tsx (2 hunks)
  • src/components/ui/UniverSityCard/index.tsx (1 hunks)
  • src/lib/react-query/QueryProvider.tsx (1 hunks)
✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.
    • @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 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.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

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

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.
  • @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.

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: 0

🧹 Nitpick comments (2)
src/api/university/server/getSearchUniversityList.ts (1)

19-19: 주석 업데이트가 필요합니다.

코드는 올바르게 변경되었지만, 주석에서 여전히 이전 경로를 참조하고 있습니다.

다음과 같이 주석을 업데이트해주세요:

- * - 기본 경로: /univ-apply-infos/search
+ * - 기본 경로: /universities/search
src/app/_home/_ui/NewsSection/index.tsx (1)

11-11: 불필요한 async 키워드를 제거해주세요

컴포넌트 내에서 await를 사용하지 않으므로 async 키워드가 필요하지 않습니다.

다음과 같이 수정해주세요:

-const NewsSection = async ({ newsList }: NewsSectionProps) => (
+const NewsSection = ({ newsList }: NewsSectionProps) => (
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between cb19a4b and dbd83c4.

📒 Files selected for processing (9)
  • src/api/university/client/useGetRecommendedUniversity.ts (1 hunks)
  • src/api/university/server/getRecommendedUniversity.ts (1 hunks)
  • src/api/university/server/getSearchUniversityList.ts (1 hunks)
  • src/app/_home/_ui/NewsSection/index.tsx (1 hunks)
  • src/app/_home/_ui/NewsSection/skeleton/index.tsx (1 hunks)
  • src/app/_home/_ui/UniversityList/index.tsx (1 hunks)
  • src/app/_home/index.tsx (2 hunks)
  • src/components/university/UniversityCards/skeleton/index.tsx (1 hunks)
  • src/utils/serverFetchUtil.ts (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: manNomi
PR: solid-connection/solid-connect-web#206
File: src/app/page.tsx:54-78
Timestamp: 2025-08-02T11:39:34.468Z
Learning: manNomi는 Next.js의 서버/클라이언트 컴포넌트와 Script 컴포넌트 동작 방식에 대해 처음 접하는 개념이었지만, 설명을 듣고 빠르게 이해하고 올바르게 구현했습니다. 새로운 기술적 개념을 학습하는 것에 열린 자세를 보입니다.
Learnt from: manNomi
PR: solid-connection/solid-connect-web#195
File: src/app/mento/_components/MentorPageTabs/_components/MentorDropDown/index.tsx:21-31
Timestamp: 2025-07-20T09:46:19.818Z
Learning: In TypeScript projects, manNomi prefers simpler solutions over complex type safety measures when the added complexity outweighs the benefits, especially for controlled components with statically defined enum values.
🧬 Code Graph Analysis (1)
src/app/_home/_ui/NewsSection/index.tsx (2)
src/types/news.ts (1)
  • News (1-7)
public/svgs/index.ts (1)
  • IconSpeaker (50-50)
🔇 Additional comments (10)
src/utils/serverFetchUtil.ts (1)

118-118: 프로덕션 API 엔드포인트 정상 동작 확인

프로덕션 API 엔드포인트의 정상 동작이 확인되었습니다.
아래 변경 사항 및 테스트 결과를 참고해주세요.

  1. 변경 내역 확인:
  2. 가용성 테스트 결과:
    • /universities/recommend → 200 OK
    • /universities/search → 200 OK
  3. 추가 확인 사항:
    • 환경 변수(.env 등)에 새로운 BASE URL이 반영되었는지 최종 확인 부탁드립니다.

위 사항이 모두 반영되면 배포 준비가 완료됩니다.

src/components/university/UniversityCards/skeleton/index.tsx (1)

1-44: 훌륭한 스켈레톤 컴포넌트 구현입니다!

다음과 같은 좋은 설계 원칙들이 잘 적용되었습니다:

  1. 성능 최적화: animate-pulse를 사용한 부드러운 로딩 애니메이션
  2. 유연성: count, style, className 프롭으로 재사용성 확보
  3. 레이아웃 안정성: 실제 카드와 동일한 높이(91px)로 CLS 방지
  4. 시각적 일관성: 썸네일, 텍스트 라인, 화살표 영역이 실제 컴포넌트 구조와 일치

PR 목표인 LCP 개선과 CLS 방지에 정확히 부합하는 구현입니다.

src/api/university/client/useGetRecommendedUniversity.ts (1)

12-12: API 엔드포인트 변경이 일관성 있게 적용되었습니다.

클라이언트 사이드 API 호출이 새로운 /universities/recommend 엔드포인트로 올바르게 업데이트되었습니다. 다른 API 파일들과의 일관성을 유지하고 있어 좋습니다.

src/api/university/server/getSearchUniversityList.ts (1)

23-23: API 엔드포인트 변경이 올바르게 적용되었습니다.

서버 사이드 검색 API가 새로운 /universities/search 엔드포인트로 정확히 업데이트되었습니다.

src/api/university/server/getRecommendedUniversity.ts (1)

6-6: API 엔드포인트 구조 개선이 완료되었습니다.

서버 사이드 추천 대학 API가 새로운 /universities/recommend 엔드포인트로 업데이트되어, 전체 대학 관련 API의 일관성 있는 구조 개선이 완료되었습니다.

src/app/_home/_ui/UniversityList/index.tsx (1)

18-21: 동적 임포트 구현이 완벽합니다! 🚀

  1. 성능 최적화: ssr: false 설정으로 초기 LCP 후보에서 제외하여 페이지 로드 성능이 향상됩니다
  2. 로딩 상태 관리: UniversityCardsSkeleton을 통해 CLS를 방지하고 시각적 안정성을 보장합니다
  3. 코드 분할: 컴포넌트를 동적으로 로드하여 번들 크기를 최적화합니다

PR 목표와 완벽하게 일치하는 구현입니다.

src/app/_home/_ui/NewsSection/skeleton/index.tsx (1)

1-12: 스켈레톤 컴포넌트 구현이 훌륭합니다! ✨

  1. CLS 방지: 고정된 높이(h-[100px])로 레이아웃 시프트를 완전히 방지합니다
  2. 일관된 디자인: bg-k-50animate-pulse로 프로젝트의 디자인 시스템과 일치합니다
  3. 구조적 일치: 실제 뉴스 섹션의 구조(제목 + 3개 아이템)와 정확히 매칭됩니다

로딩 상태에서 사용자 경험을 크게 개선하는 구현입니다.

src/app/_home/index.tsx (2)

14-17: 모듈화와 성능 최적화가 완벽하게 구현되었습니다! 🎯

  1. 관심사 분리: 뉴스 렌더링 로직을 별도 컴포넌트로 추출하여 코드 가독성이 향상되었습니다
  2. 일관된 패턴: UniversityCards와 동일한 동적 임포트 패턴을 적용하여 일관성을 유지합니다
  3. 성능 향상: SSR 비활성화로 초기 로드 성능이 개선됩니다

기존 인라인 렌더링에서 모듈화된 컴포넌트로의 전환이 매우 깔끔합니다.


83-83: 컴포넌트 사용이 간결하고 명확합니다! 👍

복잡한 인라인 렌더링 로직이 단순한 컴포넌트 호출로 대체되어 코드가 훨씬 읽기 쉬워졌습니다.

src/app/_home/_ui/NewsSection/index.tsx (1)

18-38: 뉴스 렌더링 로직이 훌륭하게 구현되었습니다! 🌟

  1. 보안 처리: target="_blank"rel="noreferrer"로 외부 링크 보안이 적절히 처리되었습니다
  2. 이미지 최적화: loading="lazy"로 네트워크 리소스를 절약합니다
  3. 접근성: 이미지 alt 속성에 뉴스 제목을 사용하여 접근성을 향상시켰습니다
  4. 타입 안전성: News 타입을 올바르게 사용하여 타입 안전성을 보장합니다

깔끔하고 효율적인 뉴스 섹션 구현입니다.

@manNomi manNomi merged commit 31455c9 into solid-connection:main Aug 3, 2025
1 check was pending
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.

1 participant