Let an element's address open in a map app - #80
Merged
Conversation
The address on the details screen was inert grey text, so the one thing you'd most want to do with a saved place — navigate to it — meant copying it out by hand. It now opens a `geo:` URI, which Android resolves through the system chooser, so whichever map app you use gets a turn instead of us picking one for you. Co-Authored-By: Claude Opus 5 (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
The address on the element details screen was inert grey text — the one thing you'd most want to do with a saved place, navigate to it, meant copying the address out by hand.
geo:URI. Android resolves that through the system chooser, so Google Maps, Organic Maps, or whatever else is installed all get a turn rather than us hard-coding one.src/map/mapLink.tsbuilds the URL:geo:<lat>,<lng>?q=<lat>,<lng>(<address>), with the coordinates in both the scheme andqso apps that ignore the query still centre correctly and the ones that honour it drop a labelled pin. No coordinates falls back togeo:0,0?q=<address>for the map app to geocode.Linking.openURLongeo:rejects withActivityNotFoundExceptionwhen nothing handles it, so that case falls back to a plain web map instead of surfacing an error.accessibilityRole="link", and hitSlop — 13px grey text gave no hint it did anything. A location with neither coordinates nor an address still renders as plain text.Testing
bunx tsc --noEmit,bun run lint, andbun run test -- --ci(57 tests, 8 suites) all pass.mapLinkis covered by unit tests; not yet exercised on a device.