-
Notifications
You must be signed in to change notification settings - Fork 1
Feat/45 메인페이지 상단 배너, 검색 UI 구현 및 아이콘 페이지 루트 이동 #68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Walkthrough여러 개의 새로운 React 컴포넌트(BannerSection, SearchBar, HomePage, IconBed)가 추가되었고, 기존 레이아웃 컴포넌트가 리팩토링 및 네이밍 변경되었습니다. SVG 아이콘이 새로 도입되고, 글로벌 CSS import가 추가되었으며, 메타데이터가 정의되었습니다. 홈 화면에 배너와 검색 UI가 추가되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant HomePage
participant BannerSection
participant SearchBar
User->>HomePage: 페이지 접근
HomePage->>BannerSection: 렌더링 요청
BannerSection->>SearchBar: 검색바 렌더링
User->>SearchBar: 검색어 입력 및 제출
SearchBar->>SearchBar: 검색값 상태 업데이트 및 콘솔 출력
Estimated code review effort2 (~20분) Suggested reviewers
Poem
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
src/app/(with-header)/components/BannerSection.tsxOops! Something went wrong! :( ESLint: 9.30.1 ESLint couldn't find the plugin "eslint-plugin-react-hooks". (The package "eslint-plugin-react-hooks" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: The plugin "eslint-plugin-react-hooks" was referenced from the config file in " » eslint-config-next/core-web-vitals » /node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/eslint-config-next/index.js". If you still can't figure out the problem, please see https://eslint.org/docs/latest/use/troubleshooting. src/app/layout.tsxOops! Something went wrong! :( ESLint: 9.30.1 ESLint couldn't find the plugin "eslint-plugin-react-hooks". (The package "eslint-plugin-react-hooks" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: The plugin "eslint-plugin-react-hooks" was referenced from the config file in " » eslint-config-next/core-web-vitals » /node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/eslint-config-next/index.js". If you still can't figure out the problem, please see https://eslint.org/docs/latest/use/troubleshooting. src/app/(with-header)/components/SearchBar.tsxOops! Something went wrong! :( ESLint: 9.30.1 ESLint couldn't find the plugin "eslint-plugin-react-hooks". (The package "eslint-plugin-react-hooks" was not found when loaded as a Node module from the directory "".) It's likely that the plugin isn't installed correctly. Try reinstalling by running the following: The plugin "eslint-plugin-react-hooks" was referenced from the config file in " » eslint-config-next/core-web-vitals » /node_modules/.pnpm/[email protected][email protected][email protected][email protected]/node_modules/eslint-config-next/index.js". If you still can't figure out the problem, please see https://eslint.org/docs/latest/use/troubleshooting. 📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (3)
✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed 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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
🧹 Nitpick comments (2)
public/assets/svg/bed.tsx (1)
8-13: 중복된 fill 속성 정리SVG 요소와 path 요소 모두에 fill 속성이 설정되어 있습니다. SVG에서는 path에만 fill을 설정하는 것이 일반적입니다.
다음과 같이 수정하세요:
<svg xmlns="http://www.w3.org/2000/svg" width={size} height={size} - fill={color} viewBox="0 0 24 24" {...props} >src/app/(with-header)/components/BannerSection.tsx (1)
20-28: 복잡한 반응형 클래스를 CSS 변수나 커스텀 클래스로 리팩토링하는 것을 고려해보세요.현재 텍스트 콘텐츠 div에 매우 긴 클래스명이 사용되고 있어 가독성과 유지보수성이 떨어집니다.
다음과 같이 개선할 수 있습니다:
- <div className="relative z-10 flex flex-col items-start w-220 max-w-1152 md:w-440 lg:w-full pl-24 pt-74 md:pl-32 lg:pl-0 md:pt-144 lg:pt-159 lg:ml-auto lg:mr-auto gap-8 lg:gap-20 h-full text-white font-bold break-keep"> + <div className="banner-content">그리고 globals.css 또는 별도 CSS 모듈에 다음을 추가:
.banner-content { @apply relative z-10 flex flex-col items-start h-full text-white font-bold break-keep; @apply w-220 max-w-1152 md:w-440 lg:w-full; @apply pl-24 pt-74 md:pl-32 lg:pl-0 md:pt-144 lg:pt-159; @apply lg:ml-auto lg:mr-auto gap-8 lg:gap-20; }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (7)
public/assets/svg/bed.tsx(1 hunks)src/app/(with-header)/components/BannerSection.tsx(1 hunks)src/app/(with-header)/components/SearchBar.tsx(1 hunks)src/app/(with-header)/layout.tsx(1 hunks)src/app/(with-header)/page.tsx(1 hunks)src/app/icons/page.tsx(2 hunks)src/app/layout.tsx(1 hunks)
🔇 Additional comments (7)
src/app/layout.tsx (1)
1-4: 메타데이터 추가 승인SEO를 위한 적절한 메타데이터 설정입니다. title과 description이 한국어 서비스에 맞게 잘 설정되었습니다.
src/app/icons/page.tsx (1)
3-3: 아이콘 추가 승인새로운 BedIcon이 기존 패턴을 잘 따라 추가되었습니다. import 경로와 배열 구조가 일관성 있게 유지되었습니다.
Also applies to: 22-22
src/app/(with-header)/page.tsx (1)
1-9: 홈페이지 구현 승인깔끔하고 의미론적으로 올바른 홈페이지 구현입니다. main 요소 사용과 컴포넌트 구조가 적절합니다.
src/app/(with-header)/components/SearchBar.tsx (2)
10-13: 검색 로직 구현 준비 완료현재 콘솔 로그로 처리되고 있는 검색 기능이 API 연동 준비가 완료된 상태입니다. 주석에서 언급한 대로 추후 API 연동 시 쉽게 교체할 수 있는 구조입니다.
16-17: 복잡한 Tailwind CSS 반응형 스타일 검토 요청
src/app/(with-header)/components/SearchBar.tsx의 16–17행에 아래와 같은 다중 반응형 Tailwind 클래스가 사용되고 있습니다:<section className="flex lg:w-full lg:max-w-1152 lg:ml-auto lg:mr-auto justify-center px-16 lg:px-0"> <div className="flex flex-col w-full gap-15 md:gap-32 px-24 py-16 md:px-24 md:py-32 rounded-[16px] bg-white shadow-md">위처럼 복잡한 반응형 스타일이 프로젝트 전반에 걸쳐 의도적으로 일관되게 사용되고 있는지, 디자인 시스템이나 컴포넌트 라이브러리 가이드라인과 맞는지 확인해주세요.
특히 아래 사항을 검토해 주시면 좋습니다:
- 이와 유사한 반응형 Tailwind 클래스 패턴이 다른 컴포넌트에도 존재하는지
- 디자인 토큰(간격, 폭, 패딩, 라운드 등)이 가이드라인과 일치하는지
- 필요하다면 공통 유틸리티 클래스로 추출하거나, 컨테이너 컴포넌트로 분리 가능한지
src/app/(with-header)/layout.tsx (1)
15-15:min-h-screen클래스 제거로 인한 레이아웃 영향을 확인해주세요.
min-h-screen클래스가 제거되어 페이지의 최소 높이 보장이 없어졌습니다. 특히 콘텐츠가 적은 페이지에서 푸터가 화면 중간에 떠있을 수 있습니다.레이아웃 변경이 의도된 것인지, 아니면 다른 방식으로 최소 높이를 보장하는지 확인이 필요합니다.
src/app/(with-header)/components/BannerSection.tsx (1)
29-31: SearchBar 위치 지정 및 사용자 정의 클래스 확인 필요프로젝트 내에서
tailwind.config.*파일을 찾을 수 없어-bottom-100클래스 정의 여부를 자동으로 검증할 수 없습니다. 아래 사항을 확인해 주세요:
- Tailwind 설정 파일(
tailwind.config.js등)이 존재하는지 확인- 설정 파일의
theme.extend.spacing에100값(및 음수)이 포함되어 있는지 검토-bottom-100클래스가 실제로 적용되는지, 다양한 화면 크기(특히 모바일)에서 SearchBar가 의도한 위치에 표시되는지 테스트- 필요 시 Tailwind의 임의 값 클래스(
-bottom-[100px]등) 사용을 고려
| @@ -0,0 +1,19 @@ | |||
| import React from 'react'; | |||
|
|
|||
| const IconBed = ({ size = 24, color = '#112211', ...props }) => ( | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
TypeScript 타입 정의 추가 필요
props 매개변수에 대한 적절한 TypeScript 인터페이스가 누락되었습니다. 타입 안전성을 위해 인터페이스를 정의해주세요.
다음과 같이 인터페이스를 추가하세요:
+interface IconBedProps extends React.SVGProps<SVGSVGElement> {
+ size?: number;
+ color?: string;
+}
+
-const IconBed = ({ size = 24, color = '#112211', ...props }) => (
+const IconBed: React.FC<IconBedProps> = ({ size = 24, color = '#112211', ...props }) => (📝 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.
| const IconBed = ({ size = 24, color = '#112211', ...props }) => ( | |
| interface IconBedProps extends React.SVGProps<SVGSVGElement> { | |
| size?: number; | |
| color?: string; | |
| } | |
| const IconBed: React.FC<IconBedProps> = ({ size = 24, color = '#112211', ...props }) => ( | |
| /* existing SVG JSX */ | |
| ); |
🤖 Prompt for AI Agents
In public/assets/svg/bed.tsx at line 3, the props parameter lacks a TypeScript
interface definition, reducing type safety. Define an interface for the
component props specifying types for size, color, and any other props, then
apply this interface to the IconBed component's props parameter to ensure proper
type checking.
| <Image | ||
| src="/test/image1.png" | ||
| alt="스트릿 댄스" | ||
| fill | ||
| className="object-cover" | ||
| priority | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
하드코딩된 이미지 경로와 접근성 개선이 필요합니다.
현재 구현에서 몇 가지 개선점이 있습니다:
/test/image1.png경로가 하드코딩되어 있어 유지보수성이 떨어집니다alt텍스트가 너무 간단합니다
다음과 같이 개선하는 것을 권장합니다:
- src="/test/image1.png"
- alt="스트릿 댄스"
+ src="/images/banner/street-dance-main.png"
+ alt="스트릿 댄스 강의 현장 모습 - 사람들이 함께 춤을 추고 있는 배경 이미지"📝 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.
| <Image | |
| src="/test/image1.png" | |
| alt="스트릿 댄스" | |
| fill | |
| className="object-cover" | |
| priority | |
| /> | |
| <Image | |
| - src="/test/image1.png" | |
| - alt="스트릿 댄스" | |
| + src="/images/banner/street-dance-main.png" | |
| + alt="스트릿 댄스 강의 현장 모습 - 사람들이 함께 춤을 추고 있는 배경 이미지" | |
| fill | |
| className="object-cover" | |
| priority | |
| /> |
🤖 Prompt for AI Agents
In src/app/(with-header)/components/BannerSection.tsx around lines 8 to 14, the
image source path is hardcoded and the alt text is too simple, which affects
maintainability and accessibility. Refactor the code to use a dynamic or
imported image path instead of a hardcoded string, and enhance the alt attribute
to provide a more descriptive and meaningful text that improves accessibility
for screen readers.
| <Input | ||
| type="text" | ||
| value={searchValue} | ||
| onChange={(e) => setSearchValue(e.target.value)} | ||
| placeholder="내가 원하는 체험은" | ||
| /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
입력 필드 접근성 개선 제안
입력 필드에 적절한 label이나 aria-label이 누락되었습니다. 접근성 향상을 위해 추가해주세요.
다음과 같이 수정하세요:
<div className="relative flex-1">
<Input
type="text"
value={searchValue}
onChange={(e) => setSearchValue(e.target.value)}
placeholder="내가 원하는 체험은"
+ aria-label="체험 검색"
/>
</div>📝 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.
| <Input | |
| type="text" | |
| value={searchValue} | |
| onChange={(e) => setSearchValue(e.target.value)} | |
| placeholder="내가 원하는 체험은" | |
| /> | |
| <div className="relative flex-1"> | |
| <Input | |
| type="text" | |
| value={searchValue} | |
| onChange={(e) => setSearchValue(e.target.value)} | |
| placeholder="내가 원하는 체험은" | |
| aria-label="체험 검색" | |
| /> | |
| </div> |
🤖 Prompt for AI Agents
In src/app/(with-header)/components/SearchBar.tsx around lines 29 to 34, the
Input component lacks an accessible label or aria-label, which reduces
accessibility. Add an appropriate aria-label or associate a visible label with
the input field to improve screen reader support and overall accessibility.
src/app/(with-header)/layout.tsx
Outdated
| @@ -1,16 +1,18 @@ | |||
| // src/app/(with-header)/layout.tsx | |||
| import '@/app/globals.css'; | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Verification agent
🧩 Analysis chain
글로벌 CSS import 위치 검증이 필요합니다.
레이아웃 컴포넌트에서 글로벌 CSS를 import하는 것이 적절한지 확인해야 합니다. 일반적으로 글로벌 CSS는 루트 레이아웃에서만 import되어야 합니다.
다음 스크립트를 실행하여 프로젝트에서 globals.css가 중복 import되고 있는지 확인해보겠습니다:
🏁 Script executed:
#!/bin/bash
# 글로벌 CSS 중복 import 확인
echo "=== globals.css import 검색 ==="
rg -n "import.*globals\.css" --type tsx --type ts
echo "=== 루트 레이아웃 파일 확인 ==="
fd "layout.tsx" src/app --max-depth 1Length of output: 258
글로벌 CSS가 루트 레이아웃에만 선언되어 있는지 확인해야 합니다. 아래 스크립트로 src/app/layout.tsx에서 globals.css import 여부를 확인해주세요.
🏁 Script executed:
#!/bin/bash
echo "=== 루트 레이아웃 globals.css import 확인 ==="
rg -n "import.*globals\.css" src/app/layout.tsx || echo "globals.css import 없음"Length of output: 187
글로벌 CSS import 위치 조정 필요
프로젝트 전역 스타일이 src/app/(with-header)/layout.tsx에만 선언되어 있습니다. 글로벌 CSS는 오직 최상위 루트 레이아웃(src/app/layout.tsx)에서만 import되어야 하므로 아래와 같이 수정해주세요:
• src/app/(with-header)/layout.tsx
- 2행의
import '@/app/globals.css';제거
• src/app/layout.tsx
- 파일 최상단에
import '@/app/globals.css';추가
🤖 Prompt for AI Agents
In src/app/(with-header)/layout.tsx at line 2, remove the import statement for
'@/app/globals.css' because global CSS should only be imported once at the root
layout. Then, in src/app/layout.tsx, add the import statement for
'@/app/globals.css' at the very top of the file to ensure global styles are
applied project-wide correctly.
LeeCh0129
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
메인페이지 상단 배너와 검색 UI를 깔끔하게 구현해주셨네요, 고생하셨습니다!
|
구현 수고하셨습니다! 부드럽게 반응형이 적용되었네요. |
minimo-9
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
구현하시느라 고생 많으셨습니다!
📌 변경 사항 개요
📝 상세 내용
🔗 관련 이슈
🖼️ 스크린샷(선택사항)
globalnomad-main-herosectioin.svg.mp4
💡 참고 사항
Summary by CodeRabbit
새로운 기능
리팩터링
기타