Conversation
- ThemeProvider와 GlobalStyles로 styled-components 의존 컴포넌트 오류 해결 - 스토리북에서 공통 스타일을 동일하게 적용
- 모바일 조건과 AB 테스트 스토리지 값 세팅으로 팝업 노출 보장 - Docs 설명 추가
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning
|
| Cohort / File(s) | Summary |
|---|---|
Storybook 설정 frontend/.storybook/preview.tsx |
Mixpanel 초기화(try-catch 보호) 및 mixpanel.disable 호출 추가, ThemeProvider와 GlobalStyles로 Story를 감싸 전역 테마/스타일 적용, 기존 modal-root 생성 로직 유지 |
MainPage 컴포넌트 스토리 frontend/src/pages/MainPage/components/Banner/Banner.stories.tsx, frontend/src/pages/MainPage/components/CategoryButtonList/CategoryButtonList.stories.tsx, frontend/src/pages/MainPage/components/ClubCard/ClubCard.stories.tsx, frontend/src/pages/MainPage/components/ClubLogo/ClubLogo.stories.tsx, frontend/src/pages/MainPage/components/Popup/Popup.stories.tsx, frontend/src/pages/MainPage/components/SearchBox/SearchBox.stories.tsx, frontend/src/pages/MainPage/components/StatusRadioButton/StatusRadioButton.stories.tsx |
각 컴포넌트용 Storybook 메타·데코레이터·예제 스토리 추가(라우터 데코레이터, 뷰포트 시뮬레이션, 스토어 리셋 등 포함) |
패키지 변경 frontend/package.json |
dotenv-cli를 dependencies 및 devDependencies에 추가 |
Sequence Diagram(s)
sequenceDiagram
participant Storybook as Storybook Preview
participant Mixpanel as Mixpanel SDK
participant Theme as ThemeProvider
participant DOM as Browser DOM
Storybook->>DOM: preview decorator 실행
Note over Storybook, Mixpanel: useEffect 트리거
Storybook->>Mixpanel: mixpanel.init(...) (try)
Mixpanel-->>Storybook: init 성공/예외
Storybook->>Theme: ThemeProvider 래퍼로 Story 렌더링
Storybook->>DOM: modal-root 존재 확인/생성
Theme->>DOM: 전역 스타일 주입 (GlobalStyles)
Storybook->>DOM: Story 컴포넌트 렌더
Estimated code review effort
🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related issues
- [feature] MOA-589 메인페이지 컴포넌트 스토리북 파일 추가 #1126: MainPage 컴포넌트용 Storybook 파일 추가 작업과 일치하여 이 PR에서 추가된 다수의
.stories.tsx파일이 해당 이슈 목표를 충족합니다.
Possibly related PRs
- [feature] 공통 컴포넌트 스토리 파일을 제작한다 #889: Storybook 전역 설정(.storybook/preview) 및 스토리 파일 변경과 겹치는 수정이 있어 연관됩니다.
- [release] v1.1.10 #1006: Mixpanel 초기화 관련 코드 변경이 겹치므로 preview의 mixpanel 초기화 로직과 상호작용할 가능성이 큽니다.
- [feature] 메인화면에 앱 출시 팝업을 추가한다 #1010: Popup 컴포넌트 구현 및 추적 이벤트 변경과 Popup.stories.tsx가 관련되어 있습니다.
Suggested labels
✨ Feature
Suggested reviewers
- lepitaaar
- oesnuj
- suhyun113
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Out of Scope Changes check | dotenv-cli 의존성 추가는 Storybook 스토리 추가 목표와 직접적인 관련이 없어 범위를 벗어난 변경으로 보입니다. | dotenv-cli 추가의 필요성을 명확히 하거나 별도 PR으로 분리하십시오. 현재 스토리 파일들과의 연관성이 불명확합니다. |
✅ Passed checks (4 passed)
| Check name | Status | Explanation |
|---|---|---|
| Description Check | ✅ Passed | Check skipped - CodeRabbit’s high-level summary is enabled. |
| Linked Issues check | ✅ Passed | PR은 메인페이지 컴포넌트들의 Storybook 파일 추가라는 MOA-589의 목표를 충족합니다. 7개 컴포넌트 스토리 추가 및 preview.tsx 업데이트가 포함되어 있습니다. |
| Docstring Coverage | ✅ Passed | No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. |
| Title check | ✅ Passed | PR 제목이 변경 사항의 핵심을 명확하게 요약하고 있으며, 메인화면 컴포넌트 스토리북 추가라는 주요 변경 사항을 직관적으로 전달합니다. |
✏️ Tip: You can configure your own custom pre-merge checks in the settings.
✨ Finishing touches
- 📝 Generate docstrings
🧪 Generate unit tests (beta)
- Create PR with unit tests
- Post copyable unit tests in a comment
- Commit unit tests in branch
feature/#1126-main-page-storybook-MOA-589
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 @coderabbitai help to get the list of available commands and usage tips.
| const setViewportWidth = (width: number) => { | ||
| window.innerWidth = width; | ||
| window.dispatchEvent(new Event('resize')); | ||
| }; |
There was a problem hiding this comment.
함수 만들어서 데스크탑과 모바일 환경 각각 스토리로 분리해주셔서 확인하기 편하네요!
#️⃣연관된 이슈
📝작업 내용
chromatic 배포주소
MainPage 하위 컴포넌트들의 Storybook 스토리를 추가하고, 공통 테마/스타일 적용을 보완했습니다.
변경 사항
StatusRadioButton)
테스트
관련 파일
frontend/src/pages/MainPage/components/**/**.stories.tsxfrontend/.storybook/preview.tsx중점적으로 리뷰받고 싶은 부분(선택)
논의하고 싶은 부분(선택)
🫡 참고사항
Summary by CodeRabbit
릴리스 노트
✏️ Tip: You can customize this high-level summary in your review settings.