[Refactor/#23] 화면 헤더를 ScreenHeader 하나로 통합 - #24
Open
xeoxxn wants to merge 1 commit into
Open
Conversation
…rops) Figma의 Top Navigation 패턴(타이틀 정렬, leading/trailing 조합, 게시판류 토글형 2단 타이틀)을 props로 고르게 만들었다. display variant에서는 leading을 타입으로 막았다 — WDS 쪽 스타일이 display일 때 leading/trailing 포지셔닝을 안 줘서 레이아웃이 깨진다.
github-actions
Bot
requested review from
jjunh33,
leegain1,
sangrae2325 and
tnals0924
September 10, 2026 06:03
leegain1
approved these changes
Sep 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣연관된 이슈
🎯 해결하려는 문제가 무엇인가요?
화면마다
TopNavigation을 직접 새로 조립하던 걸, Figma에서 실제로 확인되는 Top Navigation 패턴(타이틀 정렬, leading/trailing 아이콘 조합, 게시판류의 토글형 2단 타이틀 등)을 props로 고를 수 있는ScreenHeader하나로 통합한다.❓ 왜 해결해야 하나요?
화면마다 손으로 조립하면 트레일링 아이콘 조합,
variant선택, 타이포그래피(글자 크기)가 화면 수만큼 반복되고 어긋나기 쉽다 — 실제로 이전 세션에서 Bottom Nav 라벨 폰트 크기가 Figma 값과 다르게 굳어있던 사례가 있었다. 디자인 자체를 바꾸는 게 아니라, 이미 있는 WDSTopNavigation을 얇게 감싸는 지점을 하나로 모으는 리팩토링이다.⭐ 어떻게 해결했나요?
ScreenHeaderprops를variant("display"/"normal") +title(문자열 또는{ options, activeIndex, onChange }토글) +leading/trailing(ReactNode)로 재설계variant="display"(기본값)에서는leading을 아예 타입으로 막음 — discriminated union으로variant="normal"일 때만leading을 받게 해서, WDSTopNavigation이display일 때 leading/trailing 포지셔닝 스타일을 안 주는 문제(topNavigationLeftIconStyle/RightIconStyle, style.js 확인)를 타입 레벨에서 막았다title을 객체로 넘기면Typography variant="title3" weight="bold"+ 활성(semantic.label.strong)/비활성(semantic.label.disable) 색 분기로 렌더링HomeScreen,BililgeListScreen)는 트레일링 아이콘(검색·알림)을 이제 직접 넘기도록 마이그레이션 — 화면에 보이는 결과는 동일🧩 이 PR의 한계 & 트레이드오프
searchvariant(타이틀 자리가 검색 필드로 바뀌는 패턴)는 범위에서 뺐다 — 지금 실제로 쓰는 화면이 없고, 검색 화면을 만들 때 다시 판단하는 게 맞다고 봄(docs/plans/unified-screen-header.md참고, 로컬 전용 문서라 이 PR에는 안 올라감).⛓️ 기존 기능에 미치는 영향
홈/빌릴게 화면 헤더 렌더링 결과는 동일(스크린샷 비교 확인). 두 화면 모두 트레일링 아이콘을 직접 넘기도록 호출부가 바뀌었다.
🔀 Edge Case & 실패 시나리오
variant="display"에서leading을 넘기려고 하면 타입 에러로 막힌다(런타임 경고가 아니라 컴파일 타임에 막음).📋 검토한 대안과 선택 이유
preset="list"|"modal"|"search"같은 프리셋형 API도 고려했으나, 화면이 아직 4~5개뿐이라 미리 추상화할 근거가 부족하다고 판단해variant/title/leading/trailing을 그대로 노출하는 조합형으로 결정했다(기존 컨벤션 — WDS variant를 유니온 타입으로 그대로 노출 — 과도 더 맞음).💬 리뷰 포인트
[c]discriminated union으로leading제약을 표현한 방식이 과하지 않은지, 더 간단한 방법이 있을지 의견 부탁드립니다.