Skip to content

refactor(fe): record와 person-new 퍼널의 공통 조각 추출#122

Merged
seongbin9786 merged 1 commit into
mainfrom
refactor/fe-funnel-shared-pieces
Jul 19, 2026
Merged

refactor(fe): record와 person-new 퍼널의 공통 조각 추출#122
seongbin9786 merged 1 commit into
mainfrom
refactor/fe-funnel-shared-pieces

Conversation

@seongbin9786

Copy link
Copy Markdown
Contributor

배경

record와 person-new 두 퍼널 화면이 하단 CTA, 입력 라벨(Field), 상단 헤더를 각자 복제하고 있었다. person-new에는 "record 퍼널의 StepFrame과 같은 패턴, 안정화되면 공통화한다"는 주석이 남아 있었다.

변경 사항

  • 두 화면에서 글자까지 같던 Fieldcomponents/ui/field.tsx로 뽑아 공유한다.
  • 하단 CTA를 components/ui/next-bar.tsxNextBar로 뽑고, 라벨과 sticky 고정 여부를 prop으로 받는다.
  • 퍼널 상단 헤더(뒤로, 가운데 라벨, 저장)를 components/layout/funnel-header.tsxFunnelHeader로 뽑는다.
  • 세 컴포넌트는 데이터나 stackflow에 의존하지 않는 순수 표현 컴포넌트라 Storybook 스토리를 함께 추가했다.

스크롤 모델은 분리 유지

record는 화면 전체가 스크롤되고 person-new는 껍데기를 고정한 채 콘텐츠만 슬라이드하는 반대 전략이라, 겉껍데기와 단계 애니메이션, 에러 문구 위치는 각 화면에 그대로 두고 스크롤 모델과 무관한 조각만 공유했다. NextBar의 sticky를 호출자가 넘기는 것도 이 차이 때문으로, record만 CTA를 바닥에 붙인다.

Docs

Story 시나리오
UI/Field 기본 라벨과 콘텐츠, 여러 Field를 세로로 쌓은 구성
UI/NextBar sticky 고정(이어서), 비고정(다음), 비활성
Layout/FunnelHeader 저장 버튼 있음, 없음, 저장 중

두 퍼널이 각자 복제하던 Field, 하단 CTA, 헤더를 공용 컴포넌트로 뽑는다.
하단 CTA(NextBar)의 sticky 고정 여부는 호출자가 넘기는 prop으로 두어,
record는 전체 스크롤이라 CTA를 바닥에 sticky로 고정하고 person-new는
껍데기가 고정이라 sticky 없이 쓰도록 스크롤 모델 차이를 유지한다.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
mongle Ready Ready Preview, Comment Jul 19, 2026 7:52am

@seongbin9786
seongbin9786 marked this pull request as ready for review July 19, 2026 07:59
@seongbin9786
seongbin9786 merged commit f3f111f into main Jul 19, 2026
3 checks passed
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