Skip to content

Let an element's address open in a map app - #80

Merged
dfalling merged 1 commit into
mainfrom
location-not-tappable
Aug 28, 2026
Merged

Let an element's address open in a map app#80
dfalling merged 1 commit into
mainfrom
location-not-tappable

Conversation

@dfalling

Copy link
Copy Markdown
Owner

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.

  • Tapping the address now opens a 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.
  • New src/map/mapLink.ts builds the URL: geo:<lat>,<lng>?q=<lat>,<lng>(<address>), with the coordinates in both the scheme and q so apps that ignore the query still centre correctly and the ones that honour it drop a labelled pin. No coordinates falls back to geo:0,0?q=<address> for the map app to geocode.
  • Linking.openURL on geo: rejects with ActivityNotFoundException when nothing handles it, so that case falls back to a plain web map instead of surfacing an error.
  • The address picks up the app's link styling (accent + underline, not hue alone), 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, and bun run test -- --ci (57 tests, 8 suites) all pass. mapLink is covered by unit tests; not yet exercised on a device.

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>
@dfalling
dfalling enabled auto-merge (squash) August 28, 2026 08:32
@dfalling
dfalling merged commit 7da4164 into main Aug 28, 2026
2 checks passed
@dfalling
dfalling deleted the location-not-tappable branch August 28, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant