Skip to content

Name-like tags: same autocapitalization as name in POI editor#9

Closed
tordans wants to merge 1 commit into
masterfrom
cursor/name-like-tags-autocap-8540
Closed

Name-like tags: same autocapitalization as name in POI editor#9
tordans wants to merge 1 commit into
masterfrom
cursor/name-like-tags-autocap-8540

Conversation

@tordans
Copy link
Copy Markdown
Owner

@tordans tordans commented May 30, 2026

Problem / user story

In the POI editor (All Tags and Common Tags), the primary name field gets word-style autocapitalization while typing. Other human-readable name tags—alt_name, old_name, and localized names such as name:en / name:de (name: + language suffix)—behave like plain text, so mappers must capitalize each word manually even though the semantics match name.

Implementation notes (by Cursor)

  • Added TagKey (src/Shared/PresetsDisplay/TagKey.swift):
    • isNameLike(_:) — exact keys name, alt_name, old_name; prefix name: (avoids false positives like namesake / name_source).
    • applyNameLikeTraits — copies autocapitalization/autocorrect from the current feature’s name PresetDisplayKey when present, otherwise defaults to .words / .no.
  • All Tags (POIAllTagsViewController): applies name-like traits to the value field when configuring rows.
  • Common Tags (POICommonTagsViewController): when a preset field is name-like but the schema supplies .none, overrides to match name on the same feature.
  • PresetValueTextField: same override on edit for preset-backed and free-form keys (covers All Tags value editing).
  • KeyValueTableCell: name-like keys using the multi-line UITextView path get the same traits.
  • Unit tests (TagKeyTests): positive/negative cases for isNameLike.

Testing notes (@tordans will do testing)

Automated (on macOS / Xcode):

  • Run GoMapTests target; TagKeyTests should pass.

Manual:

  1. All Tags: add row name:de → type a multi-word value → keyboard autocapitalization should match name on Common Tags.
  2. Common Tags: localized / alternate name preset fields (if shown) should use word caps like name.
  3. Regression: non-name keys unchanged (e.g. ref, operator).
  4. False positives: keys like namesake or name_source should not get word caps.
Open in Web Open in Cursor 

Treat alt_name, old_name, and name:* keys like the primary name field
for keyboard autocapitalization in All Tags and Common Tags. Add TagKey
helper and unit tests for isNameLike detection.

Co-authored-by: Tobias <t@tobiasjordans.de>
@tordans
Copy link
Copy Markdown
Owner Author

tordans commented May 31, 2026

Now handled at bryceco#956

@tordans tordans closed this May 31, 2026
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.

2 participants