Modify

Opened 7 months ago

Closed 6 months ago

Last modified 6 months ago

#19275 closed enhancement (fixed)

[Patch] Relation list panel: Direct option for history viewer

Reported by: skyper Owned by: GerdP
Priority: normal Milestone: 20.05
Component: Core Version:
Keywords: template_report relation list history Cc:

Description (last modified by skyper)

What steps will reproduce the problem?

  1. In Relation list panel select a relation
  2. Ctrl+H or context menu

What is the expected result?

The history viewer of the relation opens respectively an item "History"

What happens instead?

The general dialog to download an object's history opens respectively no item

Please provide any additional information below. Attach a screenshot if possible.

Please, provide an option to open the history of relations from the relation list directly. Thanks

I noticed that the "History" item is also not present in selection list's context menu.

Relative:URL: ^/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2020-05-21 00:29:30 +0200 (Thu, 21 May 2020)
Revision:16472
Build-Date:2020-05-21 01:30:46
URL:https://josm.openstreetmap.de/svn/trunk

Attachments (5)

19275.patch (2.4 KB) - added by GerdP 6 months ago.
Enable Ctrl+H and add History to right click popup menu for member list. The tabs "Parent relations" and "Child Relations" would require more work..
history-popup1.PNG (71.1 KB) - added by GerdP 6 months ago.
19275.2.patch (2.4 KB) - added by GerdP 6 months ago.
19275.2b.patch (2.3 KB) - added by GerdP 6 months ago.
alternative solution which adds History to the standard context menu for relations
19275.2c.patch (3.3 KB) - added by GerdP 6 months ago.
3rd alternative which enables Ctrl+H for the relation list

Download all attachments as: .zip

Change History (35)

comment:1 Changed 7 months ago by skyper

Summary: Relation list: Support history viewerRelation list: Direct option for history viewer

Changed 6 months ago by GerdP

Attachment: 19275.patch added

Enable Ctrl+H and add History to right click popup menu for member list. The tabs "Parent relations" and "Child Relations" would require more work..

comment:2 Changed 6 months ago by GerdP

Owner: changed from team to GerdP
Status: newassigned
Summary: Relation list: Direct option for history viewer[Patch] Relation list: Direct option for history viewer

comment:3 Changed 6 months ago by GerdP

I reused part of the code changes from the solution for #18918 in class ChangesetContentPanel

comment:4 Changed 6 months ago by simon04

+1

comment:5 Changed 6 months ago by GerdP

Resolution: fixed
Status: assignedclosed

In 16489/josm:

fix #19275: Relation list: Direct option for history viewer
Enable Ctrl+H and add History to right click popup menu for member list.

comment:6 Changed 6 months ago by skyper

Resolution: fixed
Status: closedreopened
Summary: [Patch] Relation list: Direct option for history viewer[Patch] Relation list panel: Direct option for history viewer

comment:7 Changed 6 months ago by skyper

Your changes are nice but I was not talking about the relation editor but about the relation list panel.

comment:8 Changed 6 months ago by skyper

Description: modified (diff)

comment:9 Changed 6 months ago by simon04

Something is broken now:

  1. Download an area
  2. Select a relation
  3. Press Ctrl+H (history dialog opens, fine)
  4. Edit the selected relation
  5. Close the relation editor
  6. Press Ctrl+H again (warning appears: "Please select at least one already uploaded node, way, or relation.")

Plus, the following shortcut conflict appears.

2020-05-24 21:00:59.044 INFO: Keystroke ctrl pressed H is already assigned to org.openstreetmap.josm.actions.HistoryInfoAction@470978ba, will be overridden by org.openstreetmap.josm.gui.dialogs.relation.MemberTable$1@209827f8
2020-05-24 21:00:59.045 INFO: Registered toolbar action action/historyinfo overwritten: org.openstreetmap.josm.actions.HistoryInfoAction gets org.openstreetmap.josm.gui.dialogs.relation.MemberTable$1

comment:10 Changed 6 months ago by GerdP

Maybe the patch 19257.2.patch fixes this?

comment:11 Changed 6 months ago by GerdP

Yes, it does as it avoids to create a 2nd HistoryInfoAction in Membertable.

comment:12 Changed 6 months ago by GerdP

Above regression is fixed with r16495.
I'll look at the relation list tomorrow.

Changed 6 months ago by GerdP

Attachment: history-popup1.PNG added

Changed 6 months ago by GerdP

Attachment: 19275.2.patch added

comment:13 in reply to:  7 ; Changed 6 months ago by GerdP

Replying to skyper:

Your changes are nice but I was not talking about the relation editor but about the relation list panel.

Sorry for the misunderstanding.
We have a standard popup for relations which contains the actions like Edit, Duplicate, ..., Download incomplete members of selected relations. I can add History to this menu so that it is always displayed when this standard menu is used or I can add it only in the Relation list.

The patch implements the latter.

comment:14 in reply to:  13 ; Changed 6 months ago by skyper

Replying to GerdP:

Replying to skyper:

Your changes are nice but I was not talking about the relation editor but about the relation list panel.

Sorry for the misunderstanding.

That can happen, no problem.

We have a standard popup for relations which contains the actions like Edit, Duplicate, ..., Download incomplete members of selected relations. I can add History to this menu so that it is always displayed when this standard menu is used or I can add it only in the Relation list.
The patch implements the latter.

As in selection list panel, history is only available as button but missing in the context menu, I would go for the general solution. The command stack panel can profit from it, too. But wait a minute, for the other panels history is not bounded to relations, so I am not sure how to handle this.

Is there a general context menu for objects or only one per object type?
I do not find "duplicate" in Tags/Memberships panel. Does it have an own menu?
Command stack panel has only a minimal context menu, e.g. separate ticket?

comment:15 Changed 6 months ago by GerdP

In fact I'd prefer to enable the Ctrl+H shortcut but so far I failed. It probably makes no sense to add all possible actions to each context menu. I am not a GUI designer, so I don't know what's preferred in general.

comment:16 in reply to:  15 Changed 6 months ago by skyper

Replying to GerdP:

In fact I'd prefer to enable the Ctrl+H shortcut but so far I failed. It probably makes no sense to add all possible actions to each context menu. I am not a GUI designer, so I don't know what's preferred in general.

How does it work in selection list?

comment:17 Changed 6 months ago by GerdP

Found a solution. Difference is that the relation list uses a JList, not a JTable.

Changed 6 months ago by GerdP

Attachment: 19275.2b.patch added

alternative solution which adds History to the standard context menu for relations

Changed 6 months ago by GerdP

Attachment: 19275.2c.patch added

3rd alternative which enables Ctrl+H for the relation list

comment:18 Changed 6 months ago by GerdP

The solutions for the context menu need a bit more work to disable the button when only new relations are selected,
the 3rd solution handles this case already.

comment:19 in reply to:  14 Changed 6 months ago by GerdP

Replying to skyper:

Is there a general context menu for objects or only one per object type?

There is only one for relations. That one is also used in the Relation Editor.

I do not find "duplicate" in Tags/Memberships panel. Does it have an own menu?

yes, and it doesn't use the relation menu.

Command stack panel has only a minimal context menu, e.g. separate ticket?

No idea. I would not search for History there. A command cannot be changed or duplicated or what else is possible with OSM objects.

comment:20 Changed 6 months ago by skyper

So, for the relation list panel it is fine to use the same menu than the relation editor.
Other panels have their own context menu.
You can select the object in command stack why not look at the history directly ?

comment:21 in reply to:  20 ; Changed 6 months ago by GerdP

Replying to skyper:

So, for the relation list panel it is fine to use the same menu than the relation editor.
Other panels have their own context menu.

The selection list panel also shows the relation menu, for nodes and ways all the relation specific actions are disabled.

You can select the object in command stack why not look at the history directly ?

Many commands contain multiple objects, some only new objects. A History action in the context menu would suggest that the history is somehow related to the command.

comment:22 in reply to:  21 Changed 6 months ago by skyper

Replying to GerdP:

Replying to skyper:

So, for the relation list panel it is fine to use the same menu than the relation editor.
Other panels have their own context menu.

The selection list panel also shows the relation menu, for nodes and ways all the relation specific actions are disabled.

Well, history is missing for all objects in selection list panel.

comment:23 Changed 6 months ago by GerdP

There is the history side button. If we add the action to the context menu we should remove that, right? Would mean a change in the GUI without any additional functionality. Why would we do that unless we remove all side buttons and add them to the context menus?

comment:24 Changed 6 months ago by skyper

So far most of the side buttons we have a duplicate entry in the context menu. I meant, simply an additional entry without removing the side button but, may be, we have to rethink context menu <-> side button.

Last edited 6 months ago by skyper (previous) (diff)

comment:25 in reply to:  24 ; Changed 6 months ago by GerdP

Replying to skyper:

So far most of the side buttons we have a duplicate entry in the context menu.

Funny, I came to the opposite result after a short check. So let's say there is no obvious system right now.

I meant, simply an additional entry without removing the side button but, may be, we have to rethink context menu <-> side button.

I think the side buttos have at least one disadvantage. They are always visible and thus the enabled/disabled status has to be refreshed often. The History button should not be enabled when a new way is drawn but it is. Probably a side effect of #10830.
They also require a lot of space, so experts probably disable them after a while.
For a newbe they are probably useful when they show the most often used actions.

Anyway. I think we both use History often, but a lot of users don't. I fear we overestimate the importance of this action. That's why I would prefer 3rd solution which doesn't add new buttons.

comment:26 Changed 6 months ago by GerdP

Owner: changed from GerdP to skyper
Status: reopenedneedinfo

comment:27 in reply to:  25 Changed 6 months ago by skyper

Owner: changed from skyper to GerdP
Status: needinfonew

I thought about this again and think it is good to have all side buttons in the context menu as you can disable the side buttons of panels completely.

I never asked for a new button, but only for context menu items.

Personally, I am happy, if Ctrl+H works and I do not care about menu or button for History. I even forgot about the option to view an objects history without downloading it first.

Well, third solution will do the job, until we have decided about duplicates of buttons in context menus.

comment:28 Changed 6 months ago by GerdP

Resolution: fixed
Status: newclosed

In 16512/josm:

fix #19275: Relation list panel: Direct option for history viewer
Apply 19275.2c.patch which enables Ctrl+H in RelationListDialog

comment:29 Changed 6 months ago by GerdP

BTW: I've just learned that the above changes help a lot to analyse if an empty relation is obsolete or if it should be restored by reverting a bad CS.

comment:30 Changed 6 months ago by simon04

Milestone: 20.05

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain GerdP.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.