feat: 지도에 mock 핀 표시 및 선택 상태 구현 - #76
Conversation
- OverlayView 기반으로 mock 핀을 지도에 렌더링하고, 선택 시 확대 하이라이트되도록 구현 - 현재 위치 방향 마커가 실제 방향 값 수신 전에도 기본값(0도, 북쪽)으로 항상 표시되도록 수정
|
Warning Review limit reached
Next review available in: 37 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughMapPage가 mock 지도 핀과 선택 상태를 MapViewer에 전달합니다. MapViewer는 핀 OverlayView를 생성하고 클릭·선택 상태를 반영하며, 현재 위치 마커 초기화 시 방향 쐐기와 나침반 추적을 설정합니다. Changes지도 핀 오버레이
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant MapPage
participant MapViewer
participant MapPinOverlay
participant OverlayView
MapPage->>MapViewer: mapPins와 selectedMapPinId 전달
MapViewer->>MapPinOverlay: createMapPinOverlay 호출
MapPinOverlay->>OverlayView: 핀 오버레이 부착
OverlayView->>MapViewer: 핀 클릭
MapViewer->>MapPage: onSelectMapPin(pin.id) 호출
MapPage->>MapViewer: 갱신된 selectedMapPinId 전달
MapViewer->>MapPinOverlay: 선택 마커와 zIndex 갱신
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 3 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (3 passed)
✨ 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
🤖 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/map/components/MapViewer.tsx`:
- Around line 505-526: Update the map pin overlay useEffect to return a cleanup
function that disposes every overlay in mapPinOverlaysRef.current via
disposeMapPinOverlay when the component unmounts or the effect is re-run,
ensuring no overlays or resources remain on the map.
🪄 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 Plus
Run ID: d924d068-99ce-4358-b8af-7f31094c5ec6
📒 Files selected for processing (2)
src/features/map/components/MapViewer.tsxsrc/pages/MapPage.tsx
useEffect가 cleanup 함수를 반환하지 않아 컴포넌트 언마운트 시 마지막 오버레이 세트가 정리되지 않고 남는 문제 수정. dispose 로직을 effect 본문 앞이 아닌 cleanup 함수로 옮겨 재실행/언마운트 양쪽 모두 처리되도록 함. CodeRabbit 리뷰 반영
변경 내용
지도 축척과 무관하게 mock 핀 데이터를 OverlayView 기반으로 지도에 표시하고, 선택 시 확대 하이라이트되도록 구현했습니다. 겸사겸사 현재 위치 방향 마커가 실제 방향 값이 들어오기 전에도 기본값(북쪽)으로 항상 표시되도록 수정했습니다.
gestureHandling greedy 옵션 추가했습니다.(7/24)
관련 이슈
Closes #24
변경 사항
테스트
스크린샷 (UI 변경시)
체크리스트
pnpm format)pnpm lint:fix)코드 품질 확인
PR 제출 전에 다음 명령어를 실행하여 코드 품질을 확인해주세요:
Summary by CodeRabbit