[fix] 모바일 환경에서 배너 슬라이드 초기 렌더링 문제 해결#381
Conversation
- 모바일 환경에서 배너가 왼쪽으로 치우치는 문제 수정 - 초기 렌더링 시 slideWidth 계산 전 transform 적용 방지 - isReady 상태 추가로 초기화 완료 후 슬라이드 시작 - 리사이즈 시 상태 초기화 로직 개선
Walkthrough배너(Banner) 컴포넌트의 애니메이션 및 슬라이드 전환 로직에 Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant BannerComponent
User->>BannerComponent: 페이지 진입/렌더링
BannerComponent->>BannerComponent: slideWidth 측정
BannerComponent->>BannerComponent: isReady = true, isAnimating = true (slideWidth > 0)
User->>BannerComponent: 슬라이드 이동 요청 (버튼/자동)
BannerComponent->>BannerComponent: isReady 및 isAnimating 확인 후 슬라이드 전환
User->>BannerComponent: 창 크기 변경
BannerComponent->>BannerComponent: isReady, isAnimating = false로 재설정
Assessment against linked issues
Possibly related issues
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
🔇 Additional comments (8)
✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for moadong ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
oesnuj
left a comment
There was a problem hiding this comment.
PR에 문제 상황, 원인, 해결로 나눈거 좋네요 ㅎㅎ
isReady를 활용한 초기 상태 제어한거 확인 했습니다~

#️⃣연관된 이슈
📝작업 내용
문제 상황
원인
slideWidth계산이 늦게 되어 발생하는 문제였습니다.문제 해결
slideWidth가 계산되기 전에는 transform 적용 방지중점적으로 리뷰받고 싶은 부분(선택)
논의하고 싶은 부분(선택)
🫡 참고사항
Summary by CodeRabbit