Modify ↓

Opened 3 weeks ago

Last modified 3 weeks ago

#25030 new enhancement

[PATCH] Add support for displaying and editing multiline values

Reported by: LingM Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: Cc:

Description (last modified by LingM)

r19261 added the multiline attribute but did not adapt UI elements to actually support multiline editing or displaying of existing multiline values.

This patch adds the missing support to all relevant UI elements I could locate.

  • The tag list in the properties panel correctly displays multiline values.
  • The preset dialogue allows multiline editing for fields with the multiline attribute.
  • The dialogues for editing or adding a single tag allow multiline editing for fields with the multiline attribute. if the key is part of the newly created multiline-tags property list.
  • The history dialogue correctly displays multiline values.

This my first attempt at contributing here. If there's a better way to do something or there's a dialogue I've missed, please do let me know.

As requested in the Developer Guide, everything was combined into one single patch file. Commits are split by dialogue locally, in case you prefer multiple smaller patches after all.

Attachments (3)

multiline_editing_support.patch​ (41.3 KB ) - added by LingM 3 weeks ago.
Screenshot 2026-11-16 083253.jpg​ (33.6 KB ) - added by GerdP 3 weeks ago.
Screenshot from 2026-11-16 15-25-15.png​ (24.4 KB ) - added by LingM 3 weeks ago.

Download all attachments as: .zip

Change History (14)

comment:1 by stoecker, 3 weeks ago

After reading yor description without review there is one point: rather than adding another manually updatable list, simply scan the activated presets for multiline tags.

comment:2 by GerdP, 3 weeks ago

Description: modified (diff)

comment:3 by LingM, 3 weeks ago

Yes, having to maintain two sources of truth obviously isn't ideal. Thanks for the pointer. I'll try to wire that up.

PS: Thanks for fixing the link, @GerdP.

by LingM, 3 weeks ago

comment:4 by LingM, 3 weeks ago

Description: modified (diff)

comment:5 by LingM, 3 weeks ago

Done. The single tag dialogues now also operate based on the multiline attribute.

in reply to:  description comment:6 by skyper, 3 weeks ago

Replying to LingM:

If there's a dialogue I've missed, please do let me know.

I am not sure if it is already covered with the patch but the relation editor is another place where tags are displayed, added and changed.

by GerdP, 3 weeks ago

comment:7 by GerdP, 3 weeks ago

I tried the patch but I am not sure what to expect. See e.g. ​https://www.osm.org/way/1007833394
This is what I get when I chose the change the tag inscription:

Is that the intended result?

comment:8 by LingM, 3 weeks ago

@skyper: No, the relation editor isn't covered yet. Thanks for mentioning that one. Will look into it.

@GerdP: Yes, that looks as intended from my side. Whenever the key is marked as multiline the text field for the value changes to a text area, which supports inputting newlines. To make that visually clear, the field is configured to always shows a height of 5 rows. If there's more lines a scroll bar shows up. In your example the inscription consists of only a single line.

My test node with an actual multiline inscription is ​https://www.openstreetmap.org/node/9235568611:

comment:9 by GerdP, 3 weeks ago

The wiki about inscription mentions the " / " (and some other sequences) as a newline marker, so I was curious to see how this is handled now.

comment:10 by LingM, 3 weeks ago

Oh, yes, now I see what you were getting at.

There's absolutely no attempt at interpreting those hacks. I've personally added memorial inscriptions which have the " / " sequence in the wild and it's in the middle of a line. Any attempt at handling those in an automated way would inevitably result in data corruption.

This is only about actual new lines (U+000A).

comment:11 by GerdP, 3 weeks ago

OK, I agree.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The owner will remain team.
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from team to the specified user.
Next status will be 'needinfo'. The owner will be changed from team to LingM.
as duplicate The resolution will be set to duplicate. Next status will be 'closed'. The specified ticket will be cross-referenced with this ticket.
The owner will be changed from team to anonymous. Next status will be 'assigned'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.