Skip to content

Feat: Header 컴포넌트 구현#53

Open
nyewon wants to merge 4 commits into
developfrom
feat/header/#44
Open

Feat: Header 컴포넌트 구현#53
nyewon wants to merge 4 commits into
developfrom
feat/header/#44

Conversation

@nyewon
Copy link
Copy Markdown
Collaborator

@nyewon nyewon commented May 15, 2026

📌 Summary

Header 컴포넌트를 구현했습니다!

📚 Tasks

  • HomeHeader UI 구현
  • BackHeader UI 구현
  • header barrel export 추가

🔍 Describe

HomeHeader, BackHeader를 구현했습니다.

  • 두 Header의 역할과 디자인 구조 차이가 커서 하나의 variant로 관리하기보다 분리된 컴포넌트로 구현했습니다!!
  • Header 높이가 달라지는 것을 방지하기 위해 padding 기반 대신 height를 고정하는 방식으로 구현했습니다.
  • 명세서를 보니 합세 범위에서 HomeHeader 페이지 이동 동작은 제외되어 있어 UI만 구현했습니다.
  • BackHeader는 뒤로가기 클릭 시 모달이 열리는 구조를 고려해 onBack handler를 props로 받을 수 있도록 구현했습니다.
  • shared/ui/header/index.ts barrel export를 추가했습니다.

👀 To Reviewer

Header를 variant 구조로 합치기보다 분리하는 방향이 적절한지 의견 부탁드립니다!
HomeHeader를 Figma 구조에 최대한 맞추려고 하다 보니 layout 구조가 조금 복잡해진 것 같은데 더 깔끔하게 개선할 수 있는 부분이 있다면 리뷰 부탁드립니다 🙇🏻‍♀️

📸 Screenshot

image image

@nyewon nyewon linked an issue May 15, 2026 that may be closed by this pull request
@github-actions github-actions Bot added 🐶 예원 WEB 38기 노예원 🥚 Feat 새로운 기능 추가 labels May 15, 2026
@nyewon nyewon changed the title Feat: Header 구현 Feat: Header 컴포넌트 구현 May 15, 2026
Copy link
Copy Markdown
Member

@jyeon03 jyeon03 left a comment

Choose a reason for hiding this comment

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

헤더 구현 수고하셨어요~!~!!

리뷰 요청과 관련해서 이야기해보자면 상태에서 하나의 Header 컴포넌트에 variant로 합치면 variant === "home" / variant === "back"에 따라서 필요한 props와 렌더링 구조가 크게 달라져서 오히려 조건 분기가 많아질 것 같아요!! 그래서 지금처럼 역할 기준으로 컴포넌트를 분리하는 게 더 읽기 쉽고 유지보수에도 좋을 것 같아욤!! 🥰

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

HomeHeader가 홈에서만 쓰이는 헤더라면 shared/ui/header보다 features/home/components 쪽에 두는 게 맞을 것 같아요!! 메뉴 구성이나 유저 버튼까지 홈 화면에 강하게 묶여 있어서 완전한 shared ui라기보다는 home feature 컴포넌트에 가까운 것 같아요!

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

HomeHeader shared/ui/header->features/home/components 로 이동했습니다~!

Copy link
Copy Markdown
Collaborator

@chungyo chungyo left a comment

Choose a reason for hiding this comment

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

고생하셨어요~~~~~ 코드 확인 잘 했고 전체적으로 좋았지만 명세서 기준으로 확인이 필요한 부분이 있어 코멘트 남겼습니다!! 확인해주시고 반영 부탁드려요!!

Comment thread src/shared/ui/header/HomeHeader.tsx Outdated
className={cn("bg-snapdeck-000", "z-(--z-header)", "h-[4.7rem] px-16")}
>
<div className="flex h-full items-center justify-between pt-[0.9rem]">
<LogoImg className="size-[3rem]" />
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

명세에는 로고가 “홈으로 복귀할 수 있는 진입점”으로 되어 있는데, 현재는 LogoImg만 렌더링되어 있어서 클릭 동작이나 접근 가능한 이름은 없는 상태인 것 같아요.

이번 범위에서 실제 이동 동작을 제외하는 게 맞다면 괜찮지만, 로고를 홈 이동 진입점으로 볼 예정이라면 추후 button 또는 Link로 감싸고 aria-label을 추가해주면 좋을 것 같습니다..!!!

Comment thread src/shared/ui/header/HomeHeader.tsx Outdated
const HomeHeader = () => {
return (
<header
className={cn("bg-snapdeck-000", "z-(--z-header)", "h-[4.7rem] px-16")}
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

이 부분도 화면 명세에는 상단 GNB가 화면 최상단에 고정 노출되는 구조로 적혀 있는데, 현재 HomeHeaderz-index만 있고 fixedsticky 속성은 없는 것 같아요!!

스크롤 시에도 헤더가 고정되어야 하는 요구사항이라면 sticky top-0 또는 fixed top-0 적용 여부를 확인해보면 좋을 것 같습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐶 예원 WEB 38기 노예원 🥚 Feat 새로운 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat] Header 컴포넌트 구현

3 participants