josm icon indicating copy to clipboard operation
josm copied to clipboard

Add support for alternative tagging of the presets.

Open Sarabjeet108 opened this issue 2 years ago • 3 comments
trafficstars

Would it be better if we create two separate List for storing PresetLink objects with alternative="true" and the ones that don't have an alternative tag like presets under the "Edit also" section?

The current implementation depends on the order in which preset_link is defined in the XML file. It does not work if the preset_link with the alternative attribute is defined before the non-alternative ones or between them.

@tsmock

Sarabjeet108 avatar Aug 10 '23 18:08 Sarabjeet108

It would probably be preferable to have two separate lists. We could sort based off of the alternative tag, but then we start getting into changing the order of the alternatives. This is probably undesirable, if the preset author put the preferred alternative first.

tsmock avatar Aug 15 '23 11:08 tsmock

I added lists to store the PresetLink objects. Is there a need to sort the tags in the list?

Sarabjeet108 avatar Aug 15 '23 21:08 Sarabjeet108

In a follow up to @tsmock comment: from a functional pov an "alternative preset" is different than a "linked preset". The later offers additional tags that might be added, the former replaces the current tagging with an alternative.

tl;dr the alternative preset links need a separate heading/label that makes the above clear (the "Edit also..." is very confusing here).

simonpoole avatar Aug 22 '23 12:08 simonpoole