Skip to content

Comments

20260115 #131 장바구니 빈 페이지 개발#132

Merged
Chuseok22 merged 9 commits intomainfrom
20260115_#131_장바구니_빈_페이지_개발
Jan 15, 2026

Hidden character warning

The head ref may contain hidden characters: "20260115_#131_\uc7a5\ubc14\uad6c\ub2c8_\ube48_\ud398\uc774\uc9c0_\uac1c\ubc1c"
Merged

20260115 #131 장바구니 빈 페이지 개발#132
Chuseok22 merged 9 commits intomainfrom
20260115_#131_장바구니_빈_페이지_개발

Conversation

@Chuseok22
Copy link
Member

@Chuseok22 Chuseok22 commented Jan 15, 2026

✨ 변경 사항


✅ 테스트


  • 수동 테스트 완료
  • 테스트 코드 완료

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 장바구니가 비어있을 때 안내 메시지 및 홈/메뉴 네비게이션 버튼 추가
    • 장바구니 항목 카드(이미지, 제목, 가격, 순위 표시) 및 수량 조절 스텝퍼 추가
    • 헤더의 쇼핑백 아이콘을 장바구니 페이지로 이동하는 링크로 변경
  • 스타일

    • 카드 및 빈 장바구니 등 UI 스타일 모듈 추가 및 레이아웃/타이포그래피 조정
    • 수량 스텝퍼와 카테고리 활성 레이블 스타일 조정
  • 리팩토링

    • 일부 컴포넌트 임포트 경로 최적화

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

@Chuseok22 Chuseok22 self-assigned this Jan 15, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 15, 2026

Caution

Review failed

The pull request is closed.

Walkthrough

장바구니 페이지에서 토스트 로직을 제거하고 EmptyCartView로 교체했으며, CartMenuCard 및 관련 스타일을 추가하고 헤더의 쇼핑백 아이콘을 장바구니로 링크하도록 변경했습니다. 또한 PleadingFaceIcon을 아이콘 색인에 추가했습니다.

Changes

코호트 / 파일(s) 변경 요약
장바구니 페이지
src/app/(header-only)/cart/page.tsx
CartToast 및 useState 관련 로직 제거, 대신 EmptyCartView 렌더링으로 대체. (토스트 상태·핸들러 제거)
EmptyCartView
src/features/cart/components/view/EmptyCartView.tsx, src/features/cart/components/view/EmptyCartView.module.css
빈 장바구니 UI 컴포넌트 및 스타일 추가(아이콘, 제목, 서브타이틀, 홈/메뉴 링크 버튼).
CartMenuCard
src/features/cart/components/card/CartMenuCard.tsx, src/features/cart/components/card/CartMenuCard.module.css
장바구니 항목 카드 컴포넌트 추가(이미지, 타이틀, 가격, 수량 스테퍼, 선택적 랭크 태그).
아이콘 인덱스
src/assets/icons/index.ts
PleadingFaceIcon SVG를 내보내기 목록에 추가.
헤더 네비게이션
src/shared/components/header/Header.tsx
ShoppingBagIconLink로 래핑하여 /cart로 네비게이션하도록 변경.
스타일/임포트 조정
src/features/cart/components/button/QuantityStepper.module.css, src/features/menu/components/list/MenuList.tsx, src/features/menu/components/category/button/CategoryButton.module.css
QuantityStepper에 고정 크기 추가, MenuList의 SeparationBar 임포트 경로 변경, CategoryButton의 활성 라벨 폰트 웨이트 조정.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Test #74 — 이전에 CartToast와 토스트 상태/핸들러를 도입한 PR로, 본 PR은 해당 토스트 관련 코드를 제거함.
  • 20251114 #1 하단 네비게이션 컴포넌트 추가 #27 — 아이콘 인덱스에 여러 SVG를 추가한 PR로, PleadingFaceIcon 추가와 관련 있음.
  • Test #71Header.tsx 변경(헤더/아이콘 관련)을 다룬 PR로, 헤더의 쇼핑백 링크 변경과 연관될 수 있음.

Suggested labels

feat

Poem

🐰 빈 바구니 앞에서 깡충깡충,
새로운 카드가 반짝 인사해요,
아이콘은 웃고 길은 연결되고,
버튼 누르면 집으로, 메뉴로 달려가요,
홱—장바구니의 봄이 왔네! 🌸🛒

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목이 pull request의 주요 변경사항(장바구니 빈 페이지 개발)을 명확하고 구체적으로 요약하고 있습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.



📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c1c961f and de8bfdb.

📒 Files selected for processing (1)
  • src/features/menu/components/category/button/CategoryButton.module.css

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

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

🤖 Fix all issues with AI agents
In `@src/app/`(header-only)/cart/page.tsx:
- Line 2: Remove the unused import CartMenuCard from the top of page.tsx since
it is only referenced in commented code; either delete the import line
referencing CartMenuCard or restore the components that use it (e.g., uncomment
the Card usage) so the import becomes actually used.
🧹 Nitpick comments (6)
src/shared/components/header/Header.tsx (1)

12-14: 접근성 개선을 위해 aria-label 추가를 권장합니다.

스크린 리더 사용자를 위해 Link에 aria-label을 추가하면 좋습니다.

♻️ 제안된 수정 사항
-        <Link href="/cart">
+        <Link href="/cart" aria-label="장바구니">
           <ShoppingBagIcon />
         </Link>
src/app/(header-only)/cart/page.tsx (1)

6-16: 주석 처리된 코드를 제거하세요.

디버그/개발 목적의 주석 처리된 코드가 남아있습니다. 병합 전에 정리하거나, 추후 구현 예정이라면 TODO 주석으로 대체하는 것을 권장합니다.

♻️ 제안된 수정 사항
 export default function CartPage() {
   return (
-    // <>
-    //   <CartMenuCard menuId={1}
-    //                 imageSrc="/tmp/menu/menu-1.png"
-    //                 title="김치제육 덮밥"
-    //                 price={6000} />
-    //   <CartMenuCard menuId={1}
-    //                 imageSrc="/tmp/menu/menu-1.png"
-    //                 title="김치제육 덮밥"
-    //                 rank={1}
-    //                 price={6000} />
-    // </>
     <EmptyCartView/>
   );
 }
src/features/cart/components/view/EmptyCartView.module.css (1)

56-56: 버튼 패딩 값의 미세한 차이가 있습니다.

homeButton의 패딩이 1rem 1.5rem이고 menuButton의 패딩이 1rem 1.6rem입니다. 의도된 차이인지 확인해 주세요. 일관성을 위해 동일한 값을 사용하는 것을 고려해 보세요.

Also applies to: 77-77

src/features/cart/components/card/CartMenuCard.tsx (2)

9-9: 중복된 Rank 타입 정의입니다.

Rank 타입이 src/features/menu/types/menuType.ts에 이미 정의되어 있습니다. 중복 정의 대신 기존 타입을 import하여 사용하세요.

♻️ 제안된 수정
 import styles from "./CartMenuCard.module.css";
 import Image from "next/image";
 import PopularTag from "@/features/menu/components/tags/PopularTag";
 import { formatNumberWithComma } from "@/shared/utils/number/utils";
 import QuantityStepper from "@/features/cart/components/button/QuantityStepper";
+import { Rank } from "@/features/menu/types/menuType";

-type Rank = 1 | 2 | 3;

18-18: 사용되지 않는 onClickAdd prop입니다.

onClickAdd prop이 interface에 정의되어 있지만 컴포넌트에서 사용되지 않습니다. 불필요한 코드이므로 제거하세요.

🧹 제안된 수정
 interface CartMenuCardProps {
   menuId: number;
   imageSrc: string;
   title: string;
   price: number;
   quantity: number;
   rank?: Rank;
-  onClickAdd?: (menuId: number) => void;
 }
src/features/cart/components/card/CartMenuCard.module.css (1)

6-6: border 색상에 CSS 변수 사용을 권장합니다.

다른 스타일에서는 var(--color-black) 등 CSS 변수를 사용하고 있지만, border에서는 하드코딩된 black을 사용하고 있습니다. 일관성을 위해 CSS 변수를 사용하거나, 디버깅용 border라면 제거해 주세요.

🎨 제안된 수정
 .container {
   display: flex;
   position: relative;
   gap: 1rem;

-  border: 1px solid black;
+  border: 1px solid var(--color-black);

   width: 100%;

   background-color: var(--color-white);
 }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 75188bb and c1c961f.

⛔ Files ignored due to path filters (1)
  • src/assets/icons/pleading-face.svg is excluded by !**/*.svg
📒 Files selected for processing (11)
  • src/app/(header-only)/cart/page.tsx
  • src/assets/icons/index.ts
  • src/features/cart/components/button/QuantityStepper.module.css
  • src/features/cart/components/card/CartMenuCard.module.css
  • src/features/cart/components/card/CartMenuCard.tsx
  • src/features/cart/components/view/EmptyCartView.module.css
  • src/features/cart/components/view/EmptyCartView.tsx
  • src/features/menu/components/list/MenuList.tsx
  • src/shared/components/bar/SeparationBar.module.css
  • src/shared/components/bar/SeparationBar.tsx
  • src/shared/components/header/Header.tsx
🧰 Additional context used
🧬 Code graph analysis (3)
src/features/menu/components/list/MenuList.tsx (1)
src/features/menu/components/bar/SeparationBar.tsx (1)
  • SeparationBar (3-7)
src/app/(header-only)/cart/page.tsx (1)
src/features/cart/components/view/EmptyCartView.tsx (1)
  • EmptyCartView (5-38)
src/features/cart/components/card/CartMenuCard.tsx (4)
src/features/menu/types/menuType.ts (1)
  • Rank (1-1)
src/features/menu/components/tags/PopularTag.tsx (1)
  • PopularTag (9-20)
src/shared/utils/number/utils.ts (1)
  • formatNumberWithComma (4-8)
src/features/cart/components/button/QuantityStepper.tsx (1)
  • QuantityStepper (13-65)
🔇 Additional comments (8)
src/features/menu/components/list/MenuList.tsx (1)

3-3: 적절한 import 경로 변경입니다.

SeparationBar 컴포넌트가 공유 경로에 올바르게 이동되었으며, 경로 별칭 설정도 정상작동합니다. MenuList에서도 올바르게 사용 중입니다.

src/features/cart/components/button/QuantityStepper.module.css (1)

6-7: LGTM!

QuantityStepper에 명시적인 크기 값을 추가하여 일관된 UI 렌더링을 보장합니다. rem 단위 사용이 적절합니다.

Also applies to: 21-21

src/assets/icons/index.ts (1)

16-16: LGTM!

새 아이콘 내보내기가 기존 패턴을 따르고 알파벳 순서가 유지되었습니다.

src/features/cart/components/view/EmptyCartView.module.css (1)

1-88: LGTM!

EmptyCartView 스타일이 프로젝트 컨벤션을 잘 따르고 있으며, CSS 변수를 적절히 활용하고 있습니다. min-height: calc(100vh - var(--top-header-height))로 헤더 높이를 고려한 레이아웃이 잘 구현되었습니다.

src/features/cart/components/card/CartMenuCard.tsx (1)

32-60: 컴포넌트 구조가 잘 구성되어 있습니다.

조건부 렌더링 로직과 Next.js Image 컴포넌트 사용이 적절합니다.

src/features/cart/components/view/EmptyCartView.tsx (2)

28-28: 라우트 경로 확인이 필요합니다.

href="/hakgwan"이 의도된 경로인지 확인해 주세요. AI 요약에서는 "/menu" 페이지로 연결된다고 언급되어 있습니다. 특정 학관(hakgwan)으로 이동하는 것이 맞다면, 버튼 텍스트("메뉴 둘러보기")와 일관성이 있는지 검토해 주세요.


5-38: 컴포넌트가 잘 구현되어 있습니다.

EmptyCartView 컴포넌트의 구조와 Link 사용이 적절합니다. 사소한 사항으로, Line 17-18의 중복 빈 줄과 Line 38의 함수 뒤 세미콜론은 제거해도 됩니다.

src/features/cart/components/card/CartMenuCard.module.css (1)

1-55: CSS 모듈 스타일이 잘 구성되어 있습니다.

CSS 변수 활용, 반응형 레이아웃, 절대 위치 지정 등이 적절하게 적용되어 있습니다.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

import CartToast from "@/features/menu/components/toast/CartToast";
import { useState } from "react";
import EmptyCartView from "@/features/cart/components/view/EmptyCartView";
import CartMenuCard from "@/features/cart/components/card/CartMenuCard";
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

사용되지 않는 import를 제거하세요.

CartMenuCard가 import되었지만 실제로 사용되지 않습니다. 주석 처리된 코드에서만 참조되고 있어 불필요한 import입니다.

🧹 제안된 수정 사항
 import EmptyCartView from "@/features/cart/components/view/EmptyCartView";
-import CartMenuCard from "@/features/cart/components/card/CartMenuCard";
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
import CartMenuCard from "@/features/cart/components/card/CartMenuCard";
import EmptyCartView from "@/features/cart/components/view/EmptyCartView";
🤖 Prompt for AI Agents
In `@src/app/`(header-only)/cart/page.tsx at line 2, Remove the unused import
CartMenuCard from the top of page.tsx since it is only referenced in commented
code; either delete the import line referencing CartMenuCard or restore the
components that use it (e.g., uncomment the Card usage) so the import becomes
actually used.

@Chuseok22 Chuseok22 merged commit 3a7622d into main Jan 15, 2026
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