Tap map pins to preview and expand element details#8
Merged
Conversation
Tapping a marker brings up a bottom preview card with name, address, and a description snippet. Tapping the card opens a full-screen modal with photos, schedule, labels, and the rest. Tapping elsewhere on the map dismisses the preview. Marker and Map onPress are both codegen BubblingEventHandlers, so the marker's "onPress" bubbles to the map's onPress listener — handler calls stopPropagation() to keep the map from clearing the selection right after. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
Detail data is fetched lazily by id (new
ElementDetailquery) so the bounds query stays lean. Apollo caches it, so re-tapping the same pin is instant.Implementation notes
Both
<Marker onPress>and<MapLibreMap onPress>are codegenBubblingEventHandlers, so the marker's "onPress" bubbles to the map's listener. The marker handler callsstopPropagation()to keep the map from clearing the selection we just set. Found by readingMLRNMapView.onMapClickin the native source.src/graphql/__generated__/types.tswas updated by hand alongside the new.graphqlfile, since codegen needs an external schema path that isn't committed.Test plan
bunx tsc --noEmitclean,bun run lintclean,bun run testpasses🤖 Generated with Claude Code