Opened 4 years ago
Last modified 3 years ago
#20227 new defect
[Patch] Presets not displayed when creating new relation
Reported by: | michael2402 | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: |
Description (last modified by )
When creating a new relation, presets are not displayed. One needs to close the relation dialog and re-open it.
I guess that this is because in org.openstreetmap.josm.gui.tagging.TagEditorModel#getTaggingPresetTypes, primitive is null.
I cannot fully test it, since ant run
wont work for me (does not compile, some dependecy problems I dont want to dig into now), but this should fix it (at least when doing it manually in the debugger, it works):
-
src/org/openstreetmap/josm/gui/dialogs/RelationListDialog.java
381 381 } 382 382 383 383 public void run() { 384 RelationEditor.getEditor(MainApplication.getLayerManager().getEditLayer(), n ull, null).setVisible(true);384 RelationEditor.getEditor(MainApplication.getLayerManager().getEditLayer(), new Relation(), null).setVisible(true); 385 385 } 386 386 387 387 @Override
Attachments (3)
Change History (10)
by , 4 years ago
Attachment: | Bildschirmfoto von 2020-12-12 21-34-38.png added |
---|
by , 4 years ago
Attachment: | Bildschirmfoto von 2020-12-12 21-49-34.png added |
---|
after fix, new relation
comment:1 by , 4 years ago
Description: | modified (diff) |
---|
comment:2 by , 4 years ago
Patch works as expected. There is an issue with some presets in the relation editor, see #20044.
follow-up: 5 comment:3 by , 4 years ago
That whole link workflow is broken. When opening a link, it opens a new modal window. You can change values there, then press OK, then press cancel in the original window => sub-dialog is applied.
Even worse: Click on a building, edit the building preset, click on the address link, then use 'New Relation',
A relation editor opens, but only contains the tags that you changed in that sub-dialog. Fields that are already filled are not applied to the new relation.
Next issues: Open the 'Annotation / Contact' window, then input something in 'wikipedia', then click on the link to the other contact preset (=> Value is missing), then apply that preset (=> value is written), then apply the original preset (=> value is silently overwritten deleted again)
I think that whole workflow is broken. By fixing the workflow and getting rid of modals opening new modals, we should be able to fix this.
I have two suggestions:
(1): Do not display the 'Edit also…' section in the preset editor. Instead, above the 'Tags' table, we not only display the current presets, but we also display a list of suggested presets (we can mark then with a 'suggested')
(2): Do not open a new window when clicking on that link. Instead, display it as an expandable panel inside the current preset editor. Use adapter pattern to provide a new tag adapter. We will need some work to make parallel editing possible (e.g. the two contact editors in one window)
follow-up: 6 comment:4 by , 4 years ago
That whole link workflow is broken.
Yes, and we already have some tickets about this. In my eyes the concept of relation editor being a modal dialog itself is broken or at least it is constant source for trouble, but my experience with dialog design is to poor to offer better solutions.
comment:5 by , 4 years ago
Replying to michael2402:
(1): Do not display the 'Edit also…' section in the preset editor.
-1 That is a useful feature and a lot users will miss it. Also it is currently a fundamental feature as the whole presets file is based on this, e.g. all shops link to the contact, address and payment presets.
Instead, above the 'Tags' table, we not only display the current presets, but we also display a list of suggested presets (we can mark then with a 'suggested')
-1 The vertical space there is limited and by displaying the matching presets it is already sometimes too much used space compared to the rest of the dialog/the other dialogs. Displaying there possible matching presets too would overwhelm that list. (We already have the preference keys properties.presets.visible
and properties.presets.top
)
comment:6 by , 4 years ago
Replying to GerdP:
Yes, and we already have some tickets about this. In my eyes the concept of relation editor being a modal dialog itself is broken or at least it is constant source for trouble, but my experience with dialog design is to poor to offer better solutions.
Yes, especially since the relation editor (non-blocking modal, ok/cancel), presets (blocking modal, ok/cancel) and normal tag editor (sidebar, automatically applied) is very different and having all those editing schemes in one editor is really confusing for new users or users that don't use the editor that often. I don't think this can be changed though - JOSM users are very conservative, we won't get any new UI concepts or big ui changes there, so it is not even worth spending the effort in designing something new.
comment:7 by , 3 years ago
Description: | modified (diff) |
---|
Before fix