모바일 지도 인터랙션 개선 - #255
모바일 지도 인터랙션 개선#255
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (6)
📝 WalkthroughWalkthrough지도 로딩과 카메라 제어를 갱신했습니다. 핀 오버레이를 ID 기반으로 재사용합니다. 좌표 투영과 바텀시트 높이를 DOM ref와 CSS 변수로 전달합니다. 클러스터 마커를 버튼으로 변경했습니다. Changes지도 로딩과 카메라 제어
핀 오버레이 수명 주기
좌표 투영과 반경 오버레이
바텀시트와 지도 페이지 통합
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant User
participant MapPage
participant MapViewer
participant useCurrentLocationMarker
participant GoogleMaps
User->>MapPage: 현재 위치 버튼 클릭
MapPage->>MapViewer: recenterToCurrentLocation 호출
MapViewer->>useCurrentLocationMarker: 재중심 요청
useCurrentLocationMarker->>GoogleMaps: 중심과 줌 갱신
useCurrentLocationMarker-->>MapViewer: 성공 여부 반환
MapViewer-->>MapPage: boolean 반환
MapPage->>MapPage: 실패 시 토스트 표시
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 4✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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/utils.ts`:
- Around line 22-25: Update handleError in the Google Maps script loader to
remove the failed `#google-maps-script` element from the DOM before rejecting and
clearing googleMapsLoadPromise. Ensure subsequent loader calls create a fresh
script element and can receive a new load/error event.
🪄 Autofix
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: 12296058-7db5-46b5-b5c2-e8d273890d58
📒 Files selected for processing (17)
src/components/ui/BottomSheet.tsxsrc/features/map/components/ClusterMarker.tsxsrc/features/map/components/MapViewer.tsxsrc/features/map/hooks/useCoordinateProjection.tssrc/features/map/hooks/useCurrentLocationMarker.tssrc/features/map/hooks/useGoogleMap.tssrc/features/map/hooks/useMapPinOverlays.tssrc/features/map/hooks/usePlaceMarkers.tssrc/features/map/utils.tssrc/features/map/utils/mapCamera.tssrc/features/map/utils/mapPinMarker.tssrc/features/pin/components/PinListSheet.tsxsrc/features/pin/components/PinRadiusOverlay.tsxsrc/layouts/PinRegistrationLayout.tsxsrc/pages/MapPage.tsxsrc/pages/PinRadiusOverlayPreviewPage.tsxsrc/pages/PinRegisterPage.tsx
💤 Files with no reviewable changes (1)
- src/features/map/hooks/usePlaceMarkers.ts
73d7870 to
826b2fe
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/pages/MapPage.tsx (1)
117-129: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
onCurrentLocationChange호출을 렌더링 밖으로 옮기세요.
MapPage.tsx:128에서 렌더 중에 부모 위치 콜백을 호출합니다. React render는 중단되거나 폐기될 수 있으므로, 렌더 순수성 규칙을 지키고 중복/미커밋 상태 전달을 방지하려면useEffect로 이동하세요.🤖 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/pages/MapPage.tsx` around lines 117 - 129, Move the initial-position synchronization logic around trackedInitialPosition into a useEffect so onCurrentLocationChange is never invoked during render. Preserve the existing coordinate construction, current-location updates, error reset, and trackedInitialPosition synchronization, and run the effect when initialPositionQuery.data changes.Source: Linters/SAST tools
🤖 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/pin/components/PinListSheet.tsx`:
- Around line 461-462: Update BottomSheet’s setSnapObserverTarget path so that
when node is null, it removes the --bottom-sheet-visible-height CSS variable
from trackingElementRef.current in addition to cleaning up the observer and RAF.
Preserve the existing behavior when a tracking element or node is present.
---
Outside diff comments:
In `@src/pages/MapPage.tsx`:
- Around line 117-129: Move the initial-position synchronization logic around
trackedInitialPosition into a useEffect so onCurrentLocationChange is never
invoked during render. Preserve the existing coordinate construction,
current-location updates, error reset, and trackedInitialPosition
synchronization, and run the effect when initialPositionQuery.data changes.
🪄 Autofix
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: 120e1d51-5792-4c73-bec0-b0bf4a03201e
📒 Files selected for processing (9)
src/components/ui/BottomSheet.tsxsrc/features/map/components/MapViewer.tsxsrc/features/map/hooks/useCurrentLocationMarker.tssrc/features/map/hooks/useGoogleMap.tssrc/features/map/hooks/useMapPinOverlays.tssrc/features/map/utils.tssrc/features/map/utils/mapPinMarker.tssrc/features/pin/components/PinListSheet.tsxsrc/pages/MapPage.tsx
🚧 Files skipped from review as they are similar to previous changes (4)
- src/features/map/components/MapViewer.tsx
- src/features/map/hooks/useMapPinOverlays.ts
- src/features/map/hooks/useCurrentLocationMarker.ts
- src/features/map/utils/mapPinMarker.ts
be9b384 to
3e3b9f9
Compare
변경 내용
관련 이슈
Closes #253
변경 사항
테스트
브라우저에서 정상 동작 확인
기존 기능에 영향 없음 확인
TypeScript 타입 검사 통과
ESLint 검사 통과 (기존 Fast Refresh 경고 2건 유지)
Vite 프로덕션 빌드 통과
390×844 모바일 뷰포트에서 지도 로딩, 확대/축소, 패닝, 반경 갱신, 오버레이 동작 확인
스크린샷 (UI 변경시)
체크리스트
pnpm format)pnpm lint:fix)코드 품질 확인
PR 제출 전에 다음 명령어를 실행하여 코드 품질을 확인해주세요:
Summary by CodeRabbit
새 기능
버그 수정
개선