Skip to content

Improve OSM note sheet actions and share link#16

Open
tordans wants to merge 1 commit into
masterfrom
feature/improve-osm-note-sheet
Open

Improve OSM note sheet actions and share link#16
tordans wants to merge 1 commit into
masterfrom
feature/improve-osm-note-sheet

Conversation

@tordans
Copy link
Copy Markdown
Owner

@tordans tordans commented May 31, 2026

Problem

Als GoMap-Nutzer/in, möchte ich im Hinweis-Fenster klar erkennbare Aktionsbuttons und eine Möglichkeit haben, den Hinweis auf openstreetmap.org zu öffnen, damit ich Kommentare zuverlässig abschicken bzw. Hinweise schließen kann und den Hinweis bei Bedarf im Browser teilen oder öffnen kann.

Aktuell wirken „Comment“ und „Comment & Resolve“ wie einfache Textlinks und sind schwer als primäre Aktionen zu erkennen. Ein Link zum Hinweis auf osm.org ist nur über das wenig sichtbare Teilen-Symbol in der Navigationsleiste erreichbar — nicht direkt auf der Seite.

Implementation notes (by Cursor)

  • Primary action buttons: Comment and Comment & Resolve in NotesTableViewController now use native iOS button styling:
    • iOS 26+: UIButton.Configuration.prominentGlass() with capsule corners (consistent with map toolbar buttons)
    • iOS 15–25: UIButton.Configuration.filled() with medium corner radius
    • Earlier: blue filled fallback with rounded corners
  • On-page share link: Added a new table row “Open on openstreetmap.org” below the comment section. Tapping it opens the system share sheet (UIActivityViewController) with the note URL ({server}/note/{id}), allowing Safari, copy link, AirDrop, etc.
  • Share availability: Share is enabled when the note has a valid OSM id (noteId > 0). Brand-new notes that have not yet been uploaded remain disabled (grayed out). The existing nav-bar share button uses the same logic.
  • Files changed: src/iOS/NotesTableViewController.swift only.

Testing notes (by @tordans)

  • Open an existing OSM note with comment history — verify Comment and Comment & Resolve look like prominent iOS buttons (filled/glass style, not plain text).
  • Type a comment — Comment button enables; tap to submit successfully.
  • Tap Comment & Resolve on an open note — note closes and disappears from map (or shows as recently closed if that feature is merged).
  • Tap Open on openstreetmap.org — share sheet appears with the correct openstreetmap.org/note/{id} URL; Open in Safari loads the note page.
  • Verify nav-bar share button (action icon) still works and shares the same URL.
  • Create a new note (long-press map) — share row and nav-bar share should be disabled/grayed until the note is uploaded.
  • Test on iOS 26 (glass buttons) and at least one older iOS version (filled buttons) if available.
  • Get Directions row still works below the share row.
  • iPad: share sheet popover anchors correctly from both the table row and nav-bar button.

Made with Cursor


Note

Low Risk
Localized UI and share gating in NotesTableViewController only; no changes to note upload APIs or authentication.

Overview
The OSM note detail sheet now treats Comment and Comment & Resolve as clear primary actions via version-aware UIButton.Configuration (glass on iOS 26, filled on 15+, blue fallback on older OS), with a fixed 44pt height.

Sharing is gated on a persisted OSM id (noteId > 0) instead of whether the note already has comment history, so brand-new notes stay non-shareable until upload. A new in-list row Open on openstreetmap.org opens the same system share sheet as the nav-bar action; share presentation is centralized in presentShareSheet with popover anchoring for both bar buttons and table cells.

The update section is modeled with UpdateSectionRow (comment, share link, directions) so the table grows from two implicit rows to three without magic index numbers.

Reviewed by Cursor Bugbot for commit f986494. Bugbot is set up for automated code reviews on this repo. Configure here.

Style Comment and Resolve as prominent iOS buttons and add an on-page row to share the note URL via the system share sheet.

Co-authored-by: Cursor <cursoragent@cursor.com>
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