Modify

Opened 4 years ago

Closed 9 months ago

Last modified 8 months ago

#13901 closed enhancement (fixed)

Add tag2link plugin to core

Reported by: openstreetmap.org-user-d1g Owned by: simon04
Priority: normal Milestone: 20.01
Component: Core tag2link Version:
Keywords: Cc:

Description

There no better alternatives to what it does, right? If there no alternatives, simply include it in core?

Additionally it doesn't clutter main interface with menus and buttons, but provides context items.

Attachments (2)

mapcss-tag2link.patch (16.6 KB) - added by simon04 10 months ago.
twitter.png (64.7 KB) - added by Klumbumbus 10 months ago.

Download all attachments as: .zip

Change History (28)

comment:1 Changed 10 months ago by simon04

In 15673/josm:

see #13901 - Reimplement Tag2Link in core

The plugin tag2link has been created and maintained by Don-vip.

comment:2 Changed 10 months ago by simon04

Milestone: 20.01
Owner: changed from team to simon04
Status: newassigned
Summary: tag2link -> coreAdd tag2link plugin to core

Changed 10 months ago by simon04

Attachment: mapcss-tag2link.patch added

comment:3 Changed 10 months ago by simon04

Originally I planned to rewrite the functionality to a MapCSS based syntax. However, everything got so complex that I gave up. attachment:mapcss-tag2link.patch

To keep it simple, I implemented the rules as a plain Java function.

In r15673, I migrated the first half of the ruleset. The country specific rules (FR, NL, CZ) are outstanding.

comment:4 Changed 10 months ago by Don-vip

I don't like the idea of maintaining these rules in Java code... Did you start to code #18542? It's a much better way for the OSM community (i.e: not us) to maintain the rules.

comment:5 Changed 10 months ago by simon04

In 15677/josm:

fix #18542, see #13901 - Obtain tag2link rules from Wikidata

comment:6 Changed 10 months ago by simon04

In 15679/josm:

see #13901 see #18542 - Obtain tag2link rules from OSM Sophox

comment:7 Changed 10 months ago by Don-vip

Component: CoreCore tag2link

comment:8 Changed 10 months ago by simon04

In 15686/josm:

see #13901 - deprecate tag2link plugin

comment:9 Changed 10 months ago by simon04

In 15687/josm:

see #13901 - Tag2Link: add popup menu separator

comment:10 Changed 10 months ago by Don-vip

Why didn't you use addSeparator()?

comment:11 Changed 10 months ago by Klumbumbus

I noticed a problem (related to #14465): If you not all selected objects have key then you get additional links leading to nowhere other than the naked link, e.g. https://twitter.com/

Changed 10 months ago by Klumbumbus

Attachment: twitter.png added

comment:12 in reply to:  10 Changed 10 months ago by simon04

Replying to Don-vip:

Why didn't you use addSeparator()?

Because I cannot remove that one in popupMenuWillBecomeInvisible (since addSeparator "returns" void).

comment:13 Changed 10 months ago by stoecker

I don't like much that this change causes permanent web accesses to non-JOSM servers for elements which are not users-selected. We're giving a telemetry of user actions this way to providers we haven't under control.

Last edited 10 months ago by stoecker (previous) (diff)

comment:14 Changed 10 months ago by Don-vip

I'm not sure the new Tag2Link class fits in the gui/util package, there is nothing related to Swing here. It would probably fit better in tools package. There are also a few SonarQube issues introduced: https://josm.openstreetmap.de/sonar/project/issues?id=josm&open=AW-Ruc2pdKVGF04AqhG2&resolved=false&sinceLeakPeriod=true&types=BUG

The search engine should also be configurable, we can't force JOSM users to use DuckDuckGo. It can be the default but we should also propose Qwant, Bing and Google.

comment:15 Changed 10 months ago by simon04

In 15701/josm:

see #13901 - fix SonarQube issues

comment:16 Changed 10 months ago by simon04

In 15702/josm:

see #13901 - move Tag2Link to tools/

comment:17 in reply to:  14 ; Changed 10 months ago by simon04

Replying to Klumbumbus:

If you not all selected objects have key then you get additional links leading to nowhere other than the naked link, e.g. https://twitter.com/

Please check the tooltip – the links have different URLs, but their names/labels are indistinguishable. Let's continue in #14465.

Replying to stoecker:

I don't like much that this change causes permanent web accesses to non-JOSM servers for elements which are not users-selected. We're giving a telemetry of user actions this way to providers we haven't under control.

ticket:16542#comment:9

Replying to Don-vip:

I'm not sure the new Tag2Link class fits in the gui/util package, there is nothing related to Swing here.

Done in r15702.

Replying to Don-vip:

It would probably fit better in tools package. There are also a few SonarQube issues introduced: https://josm.openstreetmap.de/sonar/project/issues?id=josm&open=AW-Ruc2pdKVGF04AqhG2&resolved=false&sinceLeakPeriod=true&types=BUG

Fixed in r15701.

Replying to Don-vip:

The search engine should also be configurable, we can't force JOSM users to use DuckDuckGo. It can be the default but we should also propose Qwant, Bing and Google.

#18555

comment:18 in reply to:  17 Changed 10 months ago by Klumbumbus

comment:19 Changed 9 months ago by simon04

Resolution: fixed
Status: assignedclosed

comment:20 Changed 9 months ago by simon04

JOSM/i18n: remove convtag2link – [o35307]

comment:21 Changed 9 months ago by simon04

In 15794/josm:

see #13901 - Tag2Link: add http:// to website

comment:22 Changed 9 months ago by skyper

Needs documentation in the wiki, probably an own page wikitr:/Help/Action/Tag2Link and links from the other wiki pages.

comment:23 Changed 9 months ago by Don-vip

Agreed. @Simon the new wikidata/sophox features need to be documented. I don't know myself where to go to add new rules, and what is the difference between the two endpoints.

comment:25 Changed 9 months ago by skyper

Thanks, I changed internal links as wikitr: is better for translation (wiki:/Help/Action/Tag2Link?action=diff&version=5)

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

comment:26 Changed 8 months ago by Don-vip

In 16037/josm:

see #13901 - double test timeout

Modify Ticket

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