Modify

Opened 3 years ago

Last modified 7 months ago

#21228 new enhancement

More flexible tagging preset dialogs

Reported by: gaben Owned by: team
Priority: normal Milestone:
Component: Core Version:
Keywords: tagging presets Cc:

Description (last modified by gaben)

In a new plugin, I'd like to override some core JOSM preset layout and input fields behaviour. Unfortunately, it's not possible so far.

Why? Because the plugin would duplicate part of the default tagging presets with some extras.

Examples:

  • in the preset editor, show semicolon-separated values in new rows -> e.g. phone numbers (with extra metadata at the end of the line, I made a mockup screenshot if needed)
  • single preset for suffixed keys -> single preset for editing all language tags
  • more?

I'm okay with programming a preset dialog for myself without touching JOSM core, but it isn't trivial either, so I'm open to suggestions. The closest thing I found is the roadsigns plugin which has some of the code I need (source available in josm svn repo, here).

Attachments (1)

JOSM_contact_preset.png (74.8 KB ) - added by gaben 7 months ago.
contact preset dialog mockup

Download all attachments as: .zip

Change History (9)

comment:1 by skyper, 3 years ago

Description: modified (diff)
Keywords: tagging presets added

How about a new preset file with the defaultpresets (and all other active presets or preference list) plus your extras and disabling all the duplicated presets?

comment:2 by gaben, 3 years ago

The core defaultpresets file is fine, no need to duplicate that as the plugin only needs to modify the preset window, the tags remain the same.

comment:3 by gaben, 3 years ago

Description: modified (diff)

comment:4 by stoecker, 3 years ago

The preset handling including the auto-completion feature is already a very complex feature. Override parts of it is not something you really want to do. That sounds like a road to major trouble.

in reply to:  4 comment:5 by gaben, 3 years ago

Replying to stoecker:

The preset handling including the auto-completion feature is already a very complex feature. Override parts of it is not something you really want to do. That sounds like a road to major trouble.

In this (new, not yet released) plugin, the autocomplete is unnecessary, so the first thing would be disabling that feature entirely.

I'm glad you brought it up how complex it is, may be worth a refactor. It's already blocking development, see #18513.

comment:6 by gaben, 3 years ago

Description: modified (diff)

comment:7 by marcello@…, 3 years ago

You asked in #21851:

Does it make improvements to something mentioned in #21228?

Probably not. But I don't quite understand what your plugin is going to do. Maybe a few screenshots would help.

by gaben, 7 months ago

Attachment: JOSM_contact_preset.png added

contact preset dialog mockup

in reply to:  7 comment:8 by gaben, 7 months ago

Replying to marcello@…:

But I don't quite understand what your plugin is going to do. Maybe a few screenshots would help.

A mockup of how I imagined the function for the contact preset. It seems complex and probably is, I know, but it would add more dynamic to the editing with instant validator feedback.

contact preset dialog mockup

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 gaben.
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.