refactor(fe): 말단 컴포넌트의 화면 이동을 콜백 주입으로 전환#123
Merged
Merged
Conversation
관계 지도, 타임라인 카드, 인물 헤더가 useFlow로 직접 화면을 이동시켜 말단 컴포넌트가 stackflow에 결합돼 있었다. 화면(탭, 액티비티)이 이동을 소유하도록 콜백 prop(onBack, onSelect, onSelectPerson)을 주입하고 말단은 콜백만 호출하게 바꿨다. 결합이 끊겨 provider 없이 Storybook 스토리도 작성할 수 있게 되어 세 컴포넌트의 스토리를 추가했다. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
seongbin9786
marked this pull request as ready for review
July 19, 2026 08:00
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.
배경
내비게이션은 화면(stackflow 탭, 액티비티)이 소유해야 하는데, 말단 컴포넌트 3개가
useFlow를 직접 호출해 화면을 이동시키고 있었다. 이 때문에src/components가src/stackflow에 결합됐고, provider가 필요해 Storybook 스토리도 막혀 있었다.이동을 화면이 소유하고 말단은 콜백만 받도록 바꿨다. 말단은 이제 어디로 이동하는지 모르고 콜백만 호출하며, 렌더하는 화면이 콜백을 주입한다. 결합이 끊겨 provider 없이 스토리를 작성할 수 있게 됐다.
Refactor
person/person-page-header:useFlow제거,onBackprop 주입. 렌더러person-activity가pop()을 넘긴다timeline/timeline-event-card:useFlow제거,onSelect(eventId)prop 주입. 렌더러timeline-tab,person-timeline-view가EventDetailpush를 넘긴다home/relation-force-map:useFlow제거,onSelectPerson(personId)prop 주입. 렌더러home-tab이Person타임라인 push를 넘긴다src/components의 이 3개 말단은 더 이상 stackflow를 import 하지 않는다person/use-person-delete는 이동을 소유하는 공용 훅이라 그대로 둔다Docs
provider 없이 렌더되므로 스토리를 추가했다. 모든 콜백은 noop, 노출 텍스트는 한국어 샘플.
Test
onSelectspy 주입 후에도 제목, 메모, 카테고리, 감정, 사람 라벨이 data-amp-mask 아래 렌더onSelect가 기록 id로 호출기존
useFlow목을 제거하고onSelectspy로 대체했다.