Repository navigation
[feature] 스토리가 없던 공용 컴포넌트 3개에 스토리를 추가한다 - #2269
Conversation
- ResponsiveSheet는 닫힌 채 시작해 docs 페이지를 오버레이가 덮지 않게 한다 - WebviewTopBar는 window.history.state로 이전 화면을 판단해 스토리에서는 fallbackPath 분기만 재현된다
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 39 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Claude finished @seongwon030's task in 51s —— View job harry 리뷰 총평스토리 파일 3개만 추가했고 컴포넌트 코드는 건드리지 않았어요. 변경 범위가 깔끔해요. 인라인으로 남긴 지적
참고 (수정은 이 PR 범위 밖이에요)
로컬에서 Storybook 빌드나 Chromatic은 돌리지 않았고, diff와 컴포넌트 코드만 읽고 리뷰했어요. |
| > | ||
| <div style={{ padding: '8px 0 40px' }}> | ||
| <h4 style={{ margin: '0 0 12px' }}>시트 콘텐츠</h4> | ||
| <p style={{ margin: 0, color: '#787878' }}> |
There was a problem hiding this comment.
#787878은 colors.gray[700]과 같은 값이에요. 스토리라도 Toast.stories.tsx처럼 @/styles/theme/colors 토큰을 쓰는 편이 좋아요. 토큰 값이 바뀌면 카탈로그도 같이 따라가니까요.
| <p style={{ margin: 0, color: '#787878' }}> | |
| <p style={{ margin: 0, color: colors.gray[700] }}> |
(상단에 import { colors } from '@/styles/theme/colors'; 추가가 필요해요.)
| isOpen: false, | ||
| onClose: () => {}, | ||
| children: null, | ||
| sheetBackground: '#f5f5f5', |
There was a problem hiding this comment.
여기도 #f5f5f5는 colors.gray[100]이에요. 위와 같이 토큰으로 맞춰 주세요.
| sheetBackground: '#f5f5f5', | |
| sheetBackground: colors.gray[100], |
✅ UI 변경사항 없음
전체 202개 스토리 · 70개 컴포넌트 |
Close #2264
문제
common컴포넌트 30개 중 9개에 스토리가 없다. 이 중ToggleButton·ResponsiveSheet·WebviewTopBar는 여러 화면에서 쓰는데 카탈로그에서 볼 수 없다.해결
세 컴포넌트에 스토리를 추가한다. 컴포넌트 코드는 건드리지 않았다.
ToggleButtonResponsiveSheetWebviewTopBarResponsiveSheet를 열린 채 시작하면 docs 페이지 전체를 오버레이가 덮고,#modal-root가useEffect에서 생기는 탓에 첫 렌더에서 Portal이 null이 된다. 그래서Modal스토리처럼 닫힌 상태에서 시작한다.검증
ResponsiveSheetdocs 페이지에 오버레이 0개, "시트 열기" → 시트 렌더, ESC → body 잠금 해제npm run typecheck·eslint 통과, 스토리에서 실서버 호출 없음영향 범위
스토리 파일만 추가한다. 앱 코드 변경 없음. Chromatic에 새 스토리 9개가 baseline으로 추가된다.
한계와 대안(선택)
FeedbackPromptDialog는 props가 없고 상태를 채우는 유일한 경로가 실제 API를 불러서, 컴포넌트를 고치지 않고는 스토리를 만들 수 없어 뺐다SatisfactionModal은 #2054가 수정 중이라 뺐다BottomSheet)의 첫 렌더 문제는 baseline이 바뀌는 수정이라 따로 다룬다