fix: prevent map card deck close jitter#13
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Warning Review limit reached
More reviews will be available in 50 minutes and 3 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughMapFeedCardPager에 hidden 속성을 추가하여 리셋 타이밍 동안 상호작용을 잠금으로써 애니메이션 이슈를 해결했으며, MapClient에서 마커 덱 열림 상태를 반영한 통합 숨김 조건으로 페이저 렌더링을 변경하고 마커 선택 시 페이저 상태를 초기화합니다. Changes카드 페이저 숨김 제어 및 리셋 타이밍 개선
Sequence DiagramsequenceDiagram
participant User
participant MapClient
participant MapFeedCardPager
participant AnimatePresence
User->>MapClient: 마커 선택
MapClient->>MapClient: isFeedPagerHidden = true
MapClient->>MapClient: setIsPagerHiddenByMarkerDeck(true)
MapClient->>MapClient: setPagerSnap('peek')
MapClient->>MapClient: setPagerPromotedCount(0)
MapClient->>MapFeedCardPager: hidden={true}
MapFeedCardPager->>MapFeedCardPager: 상태 변화 감지 (safePromoted=0)
MapFeedCardPager->>MapFeedCardPager: holdStackUntilResetExitCompletes() 호출
MapFeedCardPager->>MapFeedCardPager: isStackInteractionLocked=true
MapFeedCardPager->>MapFeedCardPager: opacity-0 적용
MapFeedCardPager->>AnimatePresence: 애니메이션 시작
AnimatePresence->>AnimatePresence: 애니메이션 재생
AnimatePresence->>MapFeedCardPager: onExitComplete 콜백
MapFeedCardPager->>MapFeedCardPager: finishResetToPeek() 호출
MapFeedCardPager->>MapFeedCardPager: isStackInteractionLocked=false
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/features/feed/ui/MapFeedCardPager.tsx (1)
167-172: 💤 Low value의존성 배열에 불필요한
promotedCount포함
safePromoted는promotedCount로부터 파생된 값이므로, 이 effect의 의존성 배열에promotedCount를 별도로 추가할 필요가 없습니다. 제거하면 의도가 더 명확해지고, 불필요한 effect 재실행을 피할 수 있습니다.♻️ 제안된 수정
}, [ safePromoted, clearResetToPeekTimer, holdStackUntilResetExitCompletes, - promotedCount, ]);🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/features/feed/ui/MapFeedCardPager.tsx` around lines 167 - 172, The effect's dependency array includes promotedCount redundantly because safePromoted is already derived from promotedCount; remove promotedCount from the dependencies so the useEffect depending on safePromoted, clearResetToPeekTimer, and holdStackUntilResetExitCompletes does not re-run unnecessarily. Update the dependency array in the useEffect that currently lists safePromoted, clearResetToPeekTimer, holdStackUntilResetExitCompletes, promotedCount to omit promotedCount and keep the other three symbols only.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/features/feed/ui/MapFeedCardPager.tsx`:
- Around line 310-313: The top deck wrapper in MapFeedCardPager.tsx uses only
opacity-0 when hidden, so descendant cards with pointer-events-auto (e.g., cards
rendered with isTop) can still receive events; update the wrapper div (the class
that uses the hidden variable) to also include pointer-events-none when hidden,
or alternatively make the per-card class conditional so pointer-events-auto is
only applied when isTop AND the parent is not hidden—refer to the hidden
variable, the wrapper div class, and the isTop/card rendering that adds
pointer-events-auto to locate and fix the code.
---
Nitpick comments:
In `@src/features/feed/ui/MapFeedCardPager.tsx`:
- Around line 167-172: The effect's dependency array includes promotedCount
redundantly because safePromoted is already derived from promotedCount; remove
promotedCount from the dependencies so the useEffect depending on safePromoted,
clearResetToPeekTimer, and holdStackUntilResetExitCompletes does not re-run
unnecessarily. Update the dependency array in the useEffect that currently lists
safePromoted, clearResetToPeekTimer, holdStackUntilResetExitCompletes,
promotedCount to omit promotedCount and keep the other three symbols only.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: d16ff0a2-31ac-45f3-b8f1-e262c1084032
📒 Files selected for processing (3)
src/features/feed/ui/MapFeedCardPager.tsxsrc/features/map/client/MapClient.tsxsrc/features/map/ui/MapCardDeckOverlay.tsx
Summary
Test Plan
Notes
Summary by CodeRabbit
릴리스 노트