Merged
Conversation
マーカーをタップして表示された吹き出し(callout)が、マップのパン・ズーム操作時に 自動的に消えてしまう問題を修正。onRegionChangeComplete で選択中のマーカーの showCallout() を再呼び出しすることで、ユーザーが明示的に閉じるまで吹き出しを 表示し続けるようにした。 吹き出しの明示的な解除方法: - マップの背景をタップ - 吹き出し自体をタップ - 別のマーカーをタップ(切り替え) https://claude.ai/code/session_01TuXxMDD3bmhRDQ5QN2NYxi
📝 WalkthroughWalkthroughマーカーごとのRef管理を導入し、マーカー選択・コールアウト表示/非表示を扱うハンドラ(マーカー押下、マップ押下、コールアウト押下、領域変更完了)を追加してMapViewとMarkerへ統合しました。 Changes
Sequence Diagram(s)sequenceDiagram
participant User as User
participant Map as MapView
participant Marker as Marker (ref)
participant RefStore as markerRefs
User->>Marker: タップ(handleMarkerPress)
Marker->>RefStore: selectedMarkerId を設定
Marker->>Marker: showCallout()
User->>Map: 背景タップ(handleMapPress)
Map->>RefStore: selectedMarkerId を取得
RefStore->>Marker: hideCallout()
RefStore->>RefStore: selectedMarkerId をクリア
User->>Map: パン/ズーム(handleRegionChangeComplete)
Map->>RefStore: selectedMarkerId を取得
RefStore->>Marker: showCallout()(存在する場合)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
No actionable comments were generated in the recent review. 🎉 Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@app/`(tabs)/map.tsx:
- Around line 103-106: handleMapPress should not only clear
selectedMarkerIdRef.current but also call hideCallout() when a marker is
currently selected to ensure the visual callout is removed (same approach as
handleCalloutPress); update the handleMapPress callback to check
selectedMarkerIdRef.current, call hideCallout() if truthy, then set
selectedMarkerIdRef.current = null, keeping existing useCallback signature.
handleMapPressでselectedMarkerIdRef.currentをクリアするだけでなく、 選択中のマーカーがある場合にhideCallout()を呼び出して視覚的にも 吹き出しを確実に非表示にする。 https://claude.ai/code/session_01TuXxMDD3bmhRDQ5QN2NYxi
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@app/`(tabs)/map.tsx:
- Around line 357-371: The Marker onPress is propagating to the parent MapView
on iOS and immediately closing the callout; update the Marker JSX to prevent
propagation by adding the stopPropagation prop (so taps on Marker do not bubble
to handleMapPress), ensure this change is applied alongside existing handlers
(Marker, handleMarkerPress, handleCalloutPress) and that logic which checks
selectedMarkerIdRef.current and calls hideCallout remains unchanged.
iOSでMarkerのonPressが親のMapView.onPressに伝播し、handleMapPressが 呼ばれて吹き出しが即座に閉じてしまう問題を修正。MarkerにstopPropagation propを追加してイベントのバブリングを防止した。 https://claude.ai/code/session_01TuXxMDD3bmhRDQ5QN2NYxi
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
マーカーをタップして表示された吹き出し(callout)が、マップのパン・ズーム操作時に
自動的に消えてしまう問題を修正。onRegionChangeComplete で選択中のマーカーの
showCallout() を再呼び出しすることで、ユーザーが明示的に閉じるまで吹き出しを
表示し続けるようにした。
吹き出しの明示的な解除方法:
https://claude.ai/code/session_01TuXxMDD3bmhRDQ5QN2NYxi
Summary by CodeRabbit