Modify

Opened 15 years ago

Closed 15 years ago

#1983 closed enhancement (fixed)

[PATCH #3] make pasting OSM download URL less fiddly

Reported by: markb@… Owned by: anonymous
Priority: minor Milestone:
Component: Core Version:
Keywords: Cc:

Description

Because the download URL text box is preloaded with the message 'You can paste an URL here to download the area.', I find that to paste into the box, I have to first
delete that message and then go copy the required URL string from the webbrowser and
then paste it into the text box. If I copy the URL string from the browser first and
then open the download dialog and try to paste into the text box, it simply pastes
in the blurb again and ignores the URL I have copied from firefox.

So, the attached patch simply moves the blurb into the label above the text box thus
leaving the text box empty and ready to be pasted into.

Attachments (4)

BoundingBoxSelection.java.diff (1.3 KB ) - added by anonymous 15 years ago.
Screenshot-Download.png (29.5 KB ) - added by anonymous 15 years ago.
ParseClipboardTextOnLoadAndOnPaste.patch (10.6 KB ) - added by xeen 15 years ago.
Parses Clipboard for OSM URL when opening the download dialog and when the users pastes the link anywhere. Also moves osmUrl2Bounds into a class of its own
ParseClipboardTextOnPaste.patch (10.5 KB ) - added by xeen 15 years ago.
Against latest source with comments fixed

Download all attachments as: .zip

Change History (12)

by anonymous, 15 years ago

comment:1 by anonymous, 15 years ago

You can paste into the box without selecting its contents, so there is no need for that patch at all. The URL needs not be the only contents, parts of the old message can be there as well.

Maybe we should change to text to explain that behaviour better.

by anonymous, 15 years ago

Attachment: Screenshot-Download.png added

comment:2 by anonymous, 15 years ago

Please see attached screenshot that shows the problem I have when I try to paste
into the URL text box (using the middle mouse button). I did not select the contents before doing the paste. The blurb doesn't go away, it just gets appended.

So I will keep using my patch.

comment:3 by anonymous, 15 years ago

Yes, correct - it does not get away, but it needs not to go away :-) THe data is parsed nevertheless. But maybe you're right and we should improve that a bit. It seems not all users understand it as designed.

comment:4 by xeen, 15 years ago

If you want to make it less fiddly I suggest making it possible to insert it anywhere on that dialog without having to focus the textbox.

This happens very often to me: I see something on the map and copy the permalink. Switch from slippy map chooser to link box, paste, switch back again and adjust download area. Especially on high zoom levels in the browser, the resulting bounding box is so small, it's almost certain it doesn't contain the interesting parts.

Simply pressing ctrl+v in the slippy map chooser and it would focus that point in the map would simplify things a lot. Also, if this is implementable (I'm new to Java) we don't have to worry about discoverability because we can explain that in the label.

Another suggestion: Maybe we should refer to the permalink as it's obvious where to get the "real" link from, as the URL Bar doesn't update its contents while using the slippy map in the browser.

by xeen, 15 years ago

Parses Clipboard for OSM URL when opening the download dialog and when the users pastes the link anywhere. Also moves osmUrl2Bounds into a class of its own

comment:5 by xeen, 15 years ago

Summary: [PATCH] make pasting OSM download URL less fiddly[PATCH #2] make pasting OSM download URL less fiddly

The attached patch does the following:

  • It moves the OsmUrlToBounds function into a class of its own (it's used in Main.java and BoundingBoxSelection.java and might come in handy somewhere else)
  • Upon opening the download dialog it parses the clipboard contents and adjusts the bounding box if it can find an URL
  • The user can hit CTRL+V "anywhere" to also parse the clipboard contents. This needs a better implementation as the keyboard shortcut is not customizeable and probably won't work on other systems (i.e. where meta+v is used instead of ctrl). As far as I understand, the normal shortcut manager is not yet exposed to the download dialog.
  • "Anywhere" means if the plugin does not handle CTRL+V. E.g. pasting stuff into a textbox won't work
  • The previously posted patch is included

Apparently there is no way to watch the clipboard for changes and auto update apart from owner-hacks or timed checks. The fact that the URL can be pasted "anywhere" is not exposed in the UI as I couldn't think of an appropriate place and wording.

comment:6 by stoecker, 15 years ago

That patch is fine, but I'm not entirely sure of point 2 is a good idea (automatically parsing clipboard on entry). This would result in different behaviour whether I have a URL in clipboard or not:

When I have a selected area in the editor and open load dialog, then this will not work in case I have a URL in clipboard, as in that case the URL would be loaded again.

Could you please remove the automatical loading or handle it with a hidden option set to false for default?

comment:7 by xeen, 15 years ago

Owner: changed from framm to anonymous
Status: newassigned
Summary: [PATCH #2] make pasting OSM download URL less fiddly[PATCH #3] make pasting OSM download URL less fiddly

by xeen, 15 years ago

Against latest source with comments fixed

comment:8 by anonymous, 15 years ago

Resolution: fixed
Status: assignedclosed

Applied in r1307. xeen, could you please contact me under "openstreetmap _ dstoecker de"

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain anonymous.
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.