Modify

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#7671 closed enhancement (fixed)

Show last 5 used tags in "Add key/value" dialog for selecting with a single click

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

Description (last modified by Don-vip)

When working in a certain area, you often need the same 5-10 key/value combinations. It would make working with the add key/value dialog much quicker, if, instead of always having to enter the key again and again (or trying to find the preset in the hierarchy of the preset dropdown menu), you could select from the last 5-10 used key/value combinations with a single click. The list could get displayed above or below the fields for key value. See attached mockup screen:

Mockup of the add key/value dialog

Attachments (12)

add_key_value_mockup.png (28.3 KB ) - added by flaimo 12 years ago.
Mockup of the add key/value dialog
7671.patch (4.8 KB ) - added by simon04 12 years ago.
7671.png (5.8 KB ) - added by simon04 12 years ago.
7671v2.patch (5.1 KB ) - added by Don-vip 12 years ago.
7671v2.png (8.7 KB ) - added by Don-vip 12 years ago.
7671v3.patch (10.5 KB ) - added by Don-vip 12 years ago.
7671v3.png (31.6 KB ) - added by Don-vip 12 years ago.
7671_layoutbug.png (28.4 KB ) - added by Don-vip 12 years ago.
add_tag_without_wrap.png (108.4 KB ) - added by skyper 12 years ago.
screenshot
bug_add_tag.png (48.0 KB ) - added by Don-vip 12 years ago.
7671-LongName.osm (366 bytes ) - added by AlfonZ 12 years ago.
7671-CutItem.png (11.0 KB ) - added by AlfonZ 12 years ago.

Download all attachments as: .zip

Change History (52)

by flaimo, 12 years ago

Attachment: add_key_value_mockup.png added

Mockup of the add key/value dialog

comment:1 by flaimo, 12 years ago

Summary: Show last 5 used tags in "Add key/value" dialog for selecting ith a single clickShow last 5 used tags in "Add key/value" dialog for selecting with a single click

comment:2 by Don-vip, 12 years ago

Description: modified (diff)

comment:3 by skyper, 12 years ago

nice enhancement

by simon04, 12 years ago

Attachment: 7671.patch added

by simon04, 12 years ago

Attachment: 7671.png added

comment:4 by simon04, 12 years ago

Summary: Show last 5 used tags in "Add key/value" dialog for selecting with a single click[Patch] Show last 5 used tags in "Add key/value" dialog for selecting with a single click


comment:5 by flaimo, 12 years ago

i have one additional request: it would be nice if those 5 tags could be accessed directly using keyboard shortcuts. preferably with combinations that play nice with the default keyboard shortcut for accessing the "new key/value" dialog, so you don't break your fingers.

comment:6 by simon04, 12 years ago

How to know what the i-th tag will be (when not having a dialog)?

comment:7 by flaimo, 12 years ago

just put a 1., 2., a.s.o. in front of the text for the tag and the corresponding shortcut would be something like ctrl+alt+1 ,2, 3,...

comment:8 by simon04, 12 years ago

I don't think that users should have to recall the tags associated to indices 1–5 (esp., as they might change). Aren't (custom) presets better suited in this case?

comment:9 by flaimo, 12 years ago

if you put the numbers 1-5 in front of every tag (numbered list) that should be no problem. it is actually more hindersome to users like me if you do not implement keyboard shortcuts, because then i am forced to switch between keyboard and mouse for triggering functions. keyboard-shortcuts are always faster if you learned to use them.

comment:10 by Don-vip, 12 years ago

I liked the idea in the original mockup of having a small icon, too :)

comment:11 by flaimo, 12 years ago

since there must be some algorithm which determinates the icons displayed in the map (based on the tags), maybe it can be utilized to also display the icon beside the tag in the dialog.

comment:12 by anonymous, 12 years ago

You're saying "trying to find the preset in the hierarchy of the preset dropdown menu", but for this case, the F3 shortcut seems enough for me. It brings a dialog box when you can filter the presets, and the previously used ones are placed on top of the list.

But, your proposal is interesting for tags that are not in presets. I use Ctrl-C / Ctrl-Shift-V but it works for only one set of tags.

An other solution could be to add a feature for easily create a new preset (in my memory, we have to edit a text file outside from josm).

Nicolas Dumoulin (josm user)

comment:13 by simon04, 12 years ago

An alternative idea: Like for repeating search operations or selections in the selection dialog, we could also here use the drop-down menu indicated on the "Add" button.

by Don-vip, 12 years ago

Attachment: 7671v2.patch added

by Don-vip, 12 years ago

Attachment: 7671v2.png added

comment:14 by Don-vip, 12 years ago

New patch version to add numbers, hand cursor and tooltip. Still missing: icons and keyboard shortcuts (Ctrl+1, Ctrl+2, etc ?)


by Don-vip, 12 years ago

Attachment: 7671v3.patch added

by Don-vip, 12 years ago

Attachment: 7671v3.png added

comment:15 by Don-vip, 12 years ago

New patch version. I have removed the numbers, the result wasn't good with the icons. The shortcuts have been implemented and appear in tooltips:


What about the dummy icon ? Should we hide it or keep it ?

comment:16 by stoecker, 12 years ago

Looks like "Checkin now" for me. :-)

The lines are clickable?

in reply to:  16 comment:17 by Don-vip, 12 years ago

Replying to stoecker:

The lines are clickable?

Yes, with a hand cursor that do not appear when I make a screenshot, like in search dialog.

comment:18 by akks, 12 years ago

I like this idea and patch!

I hope there will be not many conservators with extra-small displays. Maybe you can do extended parameter to hide slection panel for them. :)

Another idea: if you click label with Ctrl (or Shift), tag can be added automatically without closing a window and if with Shift(Ctrl?), tag is added and windows closes automatically.

Last edited 12 years ago by akks (previous) (diff)

in reply to:  15 comment:19 by bastiK, 12 years ago

Replying to Don-vip:

New patch version. I have removed the numbers, the result wasn't good with the icons. The shortcuts have been implemented and appear in tooltips:


Looks nice.

What about the dummy icon ? Should we hide it or keep it ?

The warning icon just indicates tagging errors, in this case a node tagged as oneway=yes. So I think it should be hidden. The MapImage class has a "name" field, that could be used for filtering.

in reply to:  18 comment:20 by Don-vip, 12 years ago

Replying to akks:

Maybe you can do extended parameter to hide slection panel for them. :)

Sounds reasonable and does no harm :)

Another idea: if you click label with Ctrl (or Shift), tag can be added automatically without closing a window and if with Shift(Ctrl?), tag is added and windows closes automatically.

Sounds complicated. I think Ctrl+(1-5) + Enter is enough for power users using keyboard only :)

comment:21 by akks, 12 years ago

Problem is not Enter, but Alt-A after Enter :). Ctrl-123 (release ctrl) would be the best to add all tags 1,2 and 3, but harder to implement.

I hope, number of recent tags will be configurable?

Last edited 12 years ago by akks (previous) (diff)

comment:22 by Don-vip, 12 years ago

Resolution: fixed
Status: newclosed

In 5383/josm:

fix #7671 - Show last N used tags in "Add key/value" dialog for selecting with a single click

LRU tags are shown in reverse order (most recent first).

This can be customized by setting the property properties.recently-added-tags to an integer between 1 and 9.
This can be disabled by setting the same property to a number lesser or equal to 0.

Keyboard shortcuts Ctrl+1 to Ctrl+9 are available in the context of the "Add property" dialog only.

comment:23 by Don-vip, 12 years ago

Thank you all for your feedback ! And Simon for initializing the patch :)

comment:24 by Don-vip, 12 years ago

Resolution: fixed
Status: closedreopened

by Don-vip, 12 years ago

Attachment: 7671_layoutbug.png added

comment:25 by Don-vip, 12 years ago

Something broke the dialog layout:


comment:26 by skyper, 12 years ago

Looks similar to #7543

comment:27 by Don-vip, 12 years ago

Resolution: fixed
Status: reopenedclosed

In 5385/josm:

Hope it fixes #7671 layout bug (happened only once and cannot reproduce)

comment:28 by Zverikk, 12 years ago

  1. When clicking on a last used tag, sometimes it autocompletes (e.g. was "service=driveway", pastes "service:what:ever=driveway").
  2. After writing a long key (e.g. "addr:street"), lines in last used tags list are reformatted and occupy several lines, thus hiding "OK" and "Cancel" buttons.

in reply to:  28 comment:29 by skyper, 12 years ago

Replying to Zverik:

  1. When clicking on a last used tag, sometimes it autocompletes (e.g. was "service=driveway", pastes "service:what:ever=driveway").
  2. After writing a long key (e.g. "addr:street"), lines in last used tags list are reformatted and occupy several lines, thus hiding "OK" and "Cancel" buttons.

Can not reproduce. Lines do not wrap leading to dialog boxes which are wider than screen width.

Please submit more info.

Repository Root: http://josm.openstreetmap.de/svn
Build-Date: 2012-08-01 01:31:11
Last Changed Author: Don-vip
Revision: 5387
Repository UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
URL: http://josm.openstreetmap.de/svn/trunk
Last Changed Date: 2012-07-31 23:27:44 +0200 (Tue, 31 Jul 2012)
Last Changed Rev: 5387

Identification: JOSM/1.5 (5387 de)
Memory Usage: 38 MB / 248 MB (7 MB allocated, but free)
Java version: 1.6.0_18, Sun Microsystems Inc., OpenJDK Client VM
Operating system: Linux
Dataset consistency test: No problems found

screenshot

Version 1, edited 12 years ago by skyper (previous) (next) (diff)

by skyper, 12 years ago

Attachment: add_tag_without_wrap.png added

screenshot

comment:30 by Don-vip, 12 years ago

Resolution: fixed
Status: closedreopened

by Don-vip, 12 years ago

Attachment: bug_add_tag.png added

in reply to:  28 comment:31 by Don-vip, 12 years ago

Replying to Zverik:

  1. After writing a long key (e.g. "addr:street"), lines in last used tags list are reformatted and occupy several lines, thus hiding "OK" and "Cancel" buttons.

I agree on that point:


comment:32 by Don-vip, 12 years ago

Summary: [Patch] Show last 5 used tags in "Add key/value" dialog for selecting with a single clickShow last 5 used tags in "Add key/value" dialog for selecting with a single click

comment:33 by Don-vip, 12 years ago

In 5424/josm:

see #7671, see #7951 - incorrect contents of value combobox when clicking on a "Recently added tags"

comment:34 by Don-vip, 12 years ago

In 5425/josm:

see #7671, see #7951 - prevents unwanted line breaks with values composed of several words

in reply to:  28 ; comment:35 by Don-vip, 12 years ago

Replying to Zverik:

  1. When clicking on a last used tag, sometimes it autocompletes (e.g. was "service=driveway", pastes "service:what:ever=driveway").

Reproduced, with source=Bing becoming source:addr:postcode=Bing

in reply to:  35 comment:36 by Don-vip, 12 years ago

Replying to Don-vip:

Replying to Zverik:

  1. When clicking on a last used tag, sometimes it autocompletes (e.g. was "service=driveway", pastes "service:what:ever=driveway").

Reproduced, with source=Bing becoming source:addr:postcode=Bing

OK this occurs when you click on a tag with a key already existing for this object. I will disable the links in this case with an explanation tooltip.

comment:37 by Don-vip, 12 years ago

Resolution: fixed
Status: reopenedclosed

In 5427/josm:

fix #7671 - Fix (last ?) problem with recently added tags (unwanted autocompletion when the key already exists)

by AlfonZ, 12 years ago

Attachment: 7671-LongName.osm added

by AlfonZ, 12 years ago

Attachment: 7671-CutItem.png added

comment:38 by AlfonZ, 12 years ago

Could you please try following steps:

  1. Open 7671-LongName.osm.
  2. Add new node, keep it selected.
  3. Add new tag note=q w e r t y.
  4. Add new tag name=foo. After switching to the value field, the item in recently added tags list gets distorted.
  5. Undo both new tags.
  6. Open new tag dialog. Select note=q w e r t y from the list. The value gets autocompleted to q w e r t y u i o p a s d f g h j k l z x c v b n m (value from the other node). As I understand it, this isn't common situation, as it happens only when the value is not in the current dataset (because it was added in other dataset, or the last remaining instance was changed/removed).
Identification: JOSM/1.5 (5432 SVN en)
Memory Usage: 123 MB / 1484 MB (102 MB allocated, but free)
Java version: 1.7.0_05, Oracle Corporation, Java HotSpot(TM) Client VM
Operating system: Windows XP
Dataset consistency test: No problems found

comment:39 by Don-vip, 12 years ago

In 5433/josm:

fix #7671 for good (forgot this last fill() in my last commit). Thanks to AlfonZ for the bug report.

comment:40 by flaimo, 12 years ago

I just tried out the feature I requested for the first time. Looks good, but I think it needs some refinement: http://josm.openstreetmap.de/ticket/8024

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain team.
as The resolution will be set.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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