Skip to content

모바일 지도 인터랙션 개선 - #255

Merged
onebone merged 5 commits into
developfrom
feat/253-mobile-map-interactions
Aug 11, 2026
Merged

onebone merged 5 commits into
developfrom
feat/253-mobile-map-interactions

Conversation

@onebone

@onebone onebone commented Aug 9, 2026 •

Copy link
Copy Markdown
Contributor

변경 내용

  • 사용자 입력 시 진행 중인 카메라 애니메이션을 즉시 중단하고, 중심·줌 이동을 단일 카메라 갱신으로 통합했습니다.
  • 지도 핀 오버레이를 ID 기준으로 재사용하고 선택 피드백을 즉시 반영해 탭 응답성을 개선했습니다.
  • 핀 반경과 바텀시트 추적 UI를 CSS 변수로 갱신해 드래그·줌 중 React 재렌더링을 줄였습니다.
  • 현재 위치 실패 안내, 클러스터 터치 영역, Google Maps 비동기 로딩을 보완했습니다.

관련 이슈

Closes #253

변경 사항

  • 새로운 기능 추가
  • 버그 수정
  • UI/UX 개선
  • 리팩토링
  • 문서 업데이트

테스트

  • 브라우저에서 정상 동작 확인

  • 기존 기능에 영향 없음 확인

  • TypeScript 타입 검사 통과

  • ESLint 검사 통과 (기존 Fast Refresh 경고 2건 유지)

  • Vite 프로덕션 빌드 통과

  • 390×844 모바일 뷰포트에서 지도 로딩, 확대/축소, 패닝, 반경 갱신, 오버레이 동작 확인

스크린샷 (UI 변경시)

체크리스트

  • 코드가 정상적으로 동작합니다
  • 새로운 에러나 경고가 없습니다
  • 필요시 문서를 업데이트했습니다
  • 코드 포맷팅을 실행했습니다 (pnpm format)
  • ESLint 검사를 통과했습니다 (pnpm lint:fix)

코드 품질 확인
PR 제출 전에 다음 명령어를 실행하여 코드 품질을 확인해주세요:

pnpm lint:fix
pnpm format

Summary by CodeRabbit

  • 새 기능

    • 클러스터 마커를 클릭 가능한 버튼으로 개선하고 접근성을 강화했습니다.
    • 현재 위치 버튼이 위치 확인 및 재중심화 상태를 안내합니다.
    • 반경 오버레이와 등록 버튼이 화면 및 바텀시트 위치에 맞춰 자동 조정됩니다.
  • 버그 수정

    • 지도 이동 중 사용자 조작 시 카메라 애니메이션이 안정적으로 취소됩니다.
    • 지도 로딩과 핀 오버레이 갱신 안정성이 향상되었습니다.
    • 핀 선택 시 최신 위치가 반영됩니다.
  • 개선

    • 장소 선택 시 불필요한 자동 확대와 이동을 제거했습니다.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: b7b9cda1-3a5e-4482-9ade-0b65a0ae1dfd

📥 Commits

Reviewing files that changed from the base of the PR and between be9b384 and 3e3b9f9.

📒 Files selected for processing (7)
  • src/components/ui/BottomSheet.tsx
  • src/features/map/components/ClusterMarker.tsx
  • src/features/map/components/MapViewer.tsx
  • src/features/map/hooks/useMapPinOverlays.ts
  • src/features/map/utils/mapPinMarker.ts
  • src/features/pin/components/PinListSheet.tsx
  • src/pages/MapPage.tsx
🚧 Files skipped from review as they are similar to previous changes (6)
  • src/features/map/components/ClusterMarker.tsx
  • src/pages/MapPage.tsx
  • src/features/pin/components/PinListSheet.tsx
  • src/features/map/components/MapViewer.tsx
  • src/features/map/utils/mapPinMarker.ts
  • src/features/map/hooks/useMapPinOverlays.ts

📝 Walkthrough

Walkthrough

지도 로딩과 카메라 제어를 갱신했습니다. 핀 오버레이를 ID 기반으로 재사용합니다. 좌표 투영과 바텀시트 높이를 DOM ref와 CSS 변수로 전달합니다. 클러스터 마커를 버튼으로 변경했습니다.

Changes

지도 로딩과 카메라 제어

Layer / File(s) Summary
지도 로딩 및 카메라 비행 관리
src/features/map/utils.ts, src/features/map/hooks/useGoogleMap.ts, src/features/map/utils/mapCamera.ts, src/features/map/hooks/useCurrentLocationMarker.ts
Google Maps 로딩 Promise를 공유합니다. 카메라 비행 취소와 카메라 갱신을 통합합니다.
검색 마커 이동 제거
src/features/map/hooks/usePlaceMarkers.ts
검색 결과 bounds 확장과 선택 마커의 panTo 처리를 제거했습니다.

핀 오버레이 수명 주기

Layer / File(s) Summary
ID 기반 핀 오버레이 관리
src/features/map/hooks/useMapPinOverlays.ts, src/features/map/utils/mapPinMarker.ts
오버레이를 ID 기반 Map으로 관리합니다. 기존 오버레이를 재사용하고 최신 핀 좌표를 사용합니다.
접근 가능한 클러스터 마커
src/features/map/components/ClusterMarker.tsx
클러스터 표시 요소를 button으로 변경하고 type과 장소 수 기반 aria-label을 추가했습니다.

좌표 투영과 반경 오버레이

Layer / File(s) Summary
DOM 기반 좌표 투영 계약
src/features/map/hooks/useCoordinateProjection.ts, src/features/map/components/MapViewer.tsx
투영 결과 콜백을 제거하고 대상 요소의 CSS 변수에 중심 좌표와 직경을 기록합니다.
반경 오버레이 ref 연결
src/features/pin/components/PinRadiusOverlay.tsx, src/layouts/PinRegistrationLayout.tsx, src/pages/PinRegisterPage.tsx, src/pages/PinRadiusOverlayPreviewPage.tsx
radiusCenter 상태를 제거하고 radiusElementRef를 공유합니다.

바텀시트와 지도 페이지 통합

Layer / File(s) Summary
바텀시트 표시 높이 추적
src/components/ui/BottomSheet.tsx, src/features/pin/components/PinListSheet.tsx, src/pages/MapPage.tsx
onActiveSnapChange를 제거했습니다. 표시 높이를 --bottom-sheet-visible-height CSS 변수에 기록합니다.
현재 위치 재중심 상태 전달
src/features/map/components/MapViewer.tsx, src/features/map/hooks/useCurrentLocationMarker.ts, src/pages/MapPage.tsx
재중심 결과를 boolean으로 반환합니다. 실패 시 토스트를 표시하고 버튼에 aria-busy를 설정합니다.

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: 실패 시 토스트 표시
Loading

Possibly related PRs

Suggested labels: bug

Suggested reviewers: jeonggyul

🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed 제목은 모바일 지도 인터랙션 개선이라는 PR의 주요 변경 내용을 간결하게 설명합니다.
Linked Issues check ✅ Passed PR은 이슈 #253의 모바일 지도 인터랙션 점검 목적에 맞게 카메라, 핀, 오버레이, 로딩 및 터치 동작을 개선합니다.
Out of Scope Changes check ✅ Passed 변경 사항은 모두 모바일 지도 인터랙션 개선과 직접 관련되며, 제공된 범위를 벗어난 변경은 확인되지 않습니다.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/253-mobile-map-interactions

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Aug 9, 2026

Copy link
Copy Markdown

https://pr-255.plimap.kr

@onebone onebone self-assigned this Aug 9, 2026
@onebone
onebone marked this pull request as ready for review August 9, 2026 10:47

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between e818ed4 and 722d2ab.

📒 Files selected for processing (17)
  • src/components/ui/BottomSheet.tsx
  • src/features/map/components/ClusterMarker.tsx
  • src/features/map/components/MapViewer.tsx
  • src/features/map/hooks/useCoordinateProjection.ts
  • src/features/map/hooks/useCurrentLocationMarker.ts
  • src/features/map/hooks/useGoogleMap.ts
  • src/features/map/hooks/useMapPinOverlays.ts
  • src/features/map/hooks/usePlaceMarkers.ts
  • src/features/map/utils.ts
  • src/features/map/utils/mapCamera.ts
  • src/features/map/utils/mapPinMarker.ts
  • src/features/pin/components/PinListSheet.tsx
  • src/features/pin/components/PinRadiusOverlay.tsx
  • src/layouts/PinRegistrationLayout.tsx
  • src/pages/MapPage.tsx
  • src/pages/PinRadiusOverlayPreviewPage.tsx
  • src/pages/PinRegisterPage.tsx
💤 Files with no reviewable changes (1)
  • src/features/map/hooks/usePlaceMarkers.ts

Comment thread src/features/map/utils.ts
@onebone onebone added the enhancement New feature or request label Aug 9, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between 722d2ab and 826b2fe.

📒 Files selected for processing (9)
  • src/components/ui/BottomSheet.tsx
  • src/features/map/components/MapViewer.tsx
  • src/features/map/hooks/useCurrentLocationMarker.ts
  • src/features/map/hooks/useGoogleMap.ts
  • src/features/map/hooks/useMapPinOverlays.ts
  • src/features/map/utils.ts
  • src/features/map/utils/mapPinMarker.ts
  • src/features/pin/components/PinListSheet.tsx
  • src/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

Comment thread src/features/pin/components/PinListSheet.tsx
@onebone
onebone force-pushed the feat/253-mobile-map-interactions branch from be9b384 to 3e3b9f9 Compare August 11, 2026 14:33
@onebone
onebone merged commit 23fde8b into develop Aug 11, 2026
3 of 4 checks passed
@onebone
onebone deleted the feat/253-mobile-map-interactions branch August 11, 2026 14:37
@onebone
onebone deployed to preview-maintenance August 11, 2026 14:37 — with GitHub Actions Active
@coderabbitai coderabbitai Bot mentioned this pull request Aug 12, 2026
12 tasks

This branch was successfully deployed

2 active deployments
preview-maintenance — 3e3b9f9c Deployed Aug 11, 2026 by onebone via cleanup #523
preview — 3e3b9f9c Deployed Aug 11, 2026 by onebone via deploy #521
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

모바일 지도 인터랙션 점검

1 participant