Improve OSM note sheet actions and share link#16
Conversation
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>
|
Sorry, will create a new PR once somethings is tested and visible. |
Stack action buttons vertically, hide share row until the note has an OSM id, use filled button styling in the form context, add a storyboard share cell for localization, and fix keyboard footer padding for new notes. Co-authored-by: Cursor <cursoragent@cursor.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 2 potential issues.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 87beb40. Configure here.
| let isNewNote = note.comments.count == 0 | ||
| let trimmed = newComment?.trimmingCharacters(in: CharacterSet.whitespacesAndNewlines) ?? "" | ||
| cell.setShowsResolveButton(!isNewNote) | ||
| cell.commentButton.isEnabled = isNewNote ? trimmed.count > 0 : false |
There was a problem hiding this comment.
Comment button stays disabled
High Severity
For notes that already have history, configureNewCommentCell keeps commentButton disabled, and textViewDidChange no longer toggles it when the user types. The Comment action (doComment) cannot be used to add a comment without resolving, which regresses behavior the PR tests expect for existing OSM notes.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 87beb40. Configure here.
|
|
||
| func setShowsResolveButton(_ shows: Bool) { | ||
| resolveButton.isHidden = !shows | ||
| commentBottomConstraint?.isActive = !shows |
There was a problem hiding this comment.
Conflicting layout when resolve hidden
Medium Severity
When setShowsResolveButton(false) for a new note, commentBottomConstraint pins the comment button to the cell bottom while the hidden resolve button still has active top, bottom, and minimum-height constraints below it. Auto Layout cannot satisfy both chains, which can break the comment cell layout for new notes.
Additional Locations (1)
Reviewed by Cursor Bugbot for commit 87beb40. Configure here.


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)
CommentandComment & ResolveinNotesTableViewControllernow use native iOS button styling:UIButton.Configuration.prominentGlass()with capsule corners (consistent with map toolbar buttons)UIButton.Configuration.filled()with medium corner radiusUIActivityViewController) with the note URL ({server}/note/{id}), allowing Safari, copy link, AirDrop, etc.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.src/iOS/NotesTableViewController.swiftonly.Testing notes (by @tordans)
openstreetmap.org/note/{id}URL; Open in Safari loads the note page.Made with Cursor
Note
Low Risk
Localized UI and share-gating changes in the note sheet only; share eligibility now depends on note id rather than comment count, which is a small behavior shift for edge cases.
Overview
Improves the OSM note detail sheet so Comment / Comment & Resolve read as primary actions and sharing the note on the web is easier to discover.
Comment actions:
NotesNewCommentCellnow stacks full-width buttons (programmatic constraints replace the storyboard side-by-side layout) and applies filled-style button configuration on iOS 15+ (blue fallback on older OS). Resolve is hidden for brand-new notes; the comment button only enables when there is trimmed text for new notes.Share link: Adds an Open on openstreetmap.org table row (
noteShareCellin the storyboard, with EN/DE strings inMainStoryboard.xcstrings). Tapping it opens the sameUIActivityViewControlleras the nav-bar share button via refactoredpresentShareSheet(from:), with popover anchoring for bar items and table cells.Share rules: Sharing (nav bar and in-list row) is gated on
note.noteId > 0instead of requiring existing comment history, so draft/local notes stay non-shareable until persisted. The update section row model is dynamic: comment, optional share row, then directions.Reviewed by Cursor Bugbot for commit 87beb40. Bugbot is set up for automated code reviews on this repo. Configure here.