Modify

Opened 2 months ago

Closed 2 months ago

Last modified 2 months ago

#15550 closed defect (fixed)

Note tooltip needs automatic line break

Reported by: Klumbumbus Owned by: team
Priority: normal Milestone: 17.11
Component: Core notes Version:
Keywords: template_report regression Cc:

Description (last modified by Klumbumbus)

The note text is too long and can't be displayed completely with the new note tooltip.

I think the width of the tooltip should be <= the current width of the mapview.


URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-11-12 21:14:52 +0100 (Sun, 12 Nov 2017)
Build-Date:2017-11-12 20:24:34
Revision:13119
Relative:URL: ^/trunk

Identification: JOSM/1.5 (13119 de) Windows 10 64-Bit
OS Build number: Windows 10 Pro 1703 (15063)
Memory Usage: 1313 MB / 3641 MB (745 MB allocated, but free)
Java version: 1.8.0_151-b12, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: \Display0 1680x1050
Maximum Screen Size: 1680x1050
VM arguments: [-Djava.security.manager, -Djava.security.policy=file:<java.home>\lib\security\javaws.policy, -DtrustProxy=true, -Djnlpx.home=<java.home>\bin, -Djnlpx.origFilenameArg=C:\Program Files (x86)\josm-latest-mehr-RAM.jnlp, -Djnlpx.remove=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.heapsize=1024m,4096m, -Djnlpx.splashport=63433, -Djnlpx.jvm=<java.home>\bin\javaw.exe]
Dataset consistency test: No problems found

Plugins:
+ AddrInterpolation (33692)
+ DirectDownload (33160)
+ DirectUpload (33182)
+ FastDraw (33731)
+ HouseNumberTaggingTool (33714)
+ Mapillary (v1.5.8)
+ OpeningHoursEditor (33185)
+ ShapeTools (1230)
+ Tracer2 (33700)
+ alignways (33784)
+ apache-commons (33668)
+ apache-http (32699)
+ buildings_tools (33735)
+ contourmerge (1032)
+ editgpx (33782)
+ imagery-xml-bounds (33560)
+ imagery_offset_db (33774)
+ jogl (1.1.0)
+ log4j (32699)
+ measurement (33760)
+ osm-obj-info (1505407450)
+ photo_geotagging (33494)
+ photoadjust (33746)
+ reltoolbox (33708)
+ reverter (33572)
+ tag2link (33382)
+ tageditor (33579)
+ tagging-preset-tester (33004)
+ terracer (33608)
+ turnlanes-tagging (254)
+ turnrestrictions (33780)
+ undelete (33480)
+ utilsplugin2 (33742)
+ wikipedia (33696)

Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/OneClick&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/StolpersteineLight&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Presets/NewTags&zip=1
+ %UserProfile%\Documents\OSM\josm\data\defaultpresets.xml
+ https://raw.githubusercontent.com/yopaseopor/traffic_signs_preset_JOSM/master/DE.zip
+ %UserProfile%\Documents\OSM\TestNew\newpresets.xml
+ %UserProfile%\Downloads\_bicycle-aqua.zip

Map paint styles:
+ %UserProfile%\Documents\OSM\josm\styles\standard\elemstyles.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/HiDPISupport&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/NewHighwayColors&zip=1
+ https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Streets&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Maxspeed&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lane_and_Road_Attributes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/sac_scale&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ShowID&zip=1
- %UserProfile%\Documents\OSM\eigene styles\PriorityRoad\PriorityRoad_1.0.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/LayerChecker&zip=1
- %UserProfile%\Documents\OSM\eigene styles\layer checker\layer checker_1.2.mapcss
- %UserProfile%\Documents\OSM\TestNew\newicons.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Surface&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&style&zip=1
- %UserProfile%\Documents\OSM\patches\old MPs\dataquality.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Sidewalks&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Cycleways&style&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Osmc&style&zip=1
- https://raw.githubusercontent.com/species/josm-preset-wheelchair/master/sidewalks_kerbs.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/LitObjects&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Lit&style&zip=1
- %UserProfile%\Documents\OSM\eigene styles\Tourenplanung.mapcss
- %UserProfile%\Documents\OSM\eigene styles\SpecificBuildingValues\SpecificBuildingValues.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_buildings&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Modified&zip=1
- https://github.com/bastik/mapcss-tools/raw/osm/mapnik2mapcss/osm-results/mapnik.zip
- %UserProfile%\Documents\OSM\eigene styles\area-symbol.zip
- http://www.freietonne.de/ft_icons/josm/FreieTonne_rules_presets_zip.php
- http://www.openrailwaymap.org/styles/standard.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/MaxspeedIcons&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/DestinationSignRelation&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/ParkingLanes&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Incline&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/PTStops&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/AdvertisingStyle&zip=1
- https://www.dropbox.com/s/qo3ai47fpv241jf/Styles_Fixme_and_Notes.zip?raw=1
- https://github.com/gmgeo/osmic-josm-style/archive/master.zip
- https://josm.openstreetmap.de/josmfile?page=Styles/hazmat&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Suburb&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/Coloured_Postcode&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/RecyclingMaterials&zip=1
- %UserProfile%\Documents\OSM\eigene styles\maxspeed\maxspeed_2.9_01 basierend auf 2.7_02 Zahlen.mapcss
- https://josm.openstreetmap.de/josmfile?page=Styles/Bench&zip=1
- https://josm.openstreetmap.de/josmfile?page=Styles/PublicTransportV2&zip=1

Validator rules:
+ https://raw.githubusercontent.com/<user.name>n-a-bauer/josm-validators/master/mtb.validator.mapcss
+ %UserProfile%\Documents\OSM\TestNew\new.validator.mapcss
+ https://josm.openstreetmap.de/josmfile?page=Rules/GermanySpecific&zip=1
- %UserProfile%\Documents\OSM\TestNew\germ.validator.mapcss
- https://josm.openstreetmap.de/josmfile?page=Rules/CzechRepublicAddressSystem&zip=1

Last errors/warnings:
- W: Could not fetch Wikidata label for Q2554836
- W: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "os.name" "read"). Ursache: java.lang.RuntimeException: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "os.name" "read"). Ursache: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "os.name" "read")
- W: Could not fetch Wikidata label for Q2554836
- W: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "os.name" "read"). Ursache: java.lang.RuntimeException: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "os.name" "read"). Ursache: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "os.name" "read")
- W: Could not fetch Wikidata label for Q2554836
- W: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "os.name" "read"). Ursache: java.lang.RuntimeException: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "os.name" "read"). Ursache: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "os.name" "read")
- W: Could not fetch Wikidata label for Q2554836
- W: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "os.name" "read"). Ursache: java.lang.RuntimeException: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "os.name" "read"). Ursache: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "os.name" "read")
- W: Could not fetch Wikidata label for Q2554836
- W: java.util.concurrent.ExecutionException: java.lang.RuntimeException: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "os.name" "read"). Ursache: java.lang.RuntimeException: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "os.name" "read"). Ursache: java.security.AccessControlException: access denied ("java.util.PropertyPermission" "os.name" "read")

Attachments (6)

long_note.gif (479.0 KB) - added by Klumbumbus 2 months ago.
non_URL.png (10.4 KB) - added by Klumbumbus 2 months ago.
Notes_wide_window.png (123.9 KB) - added by Klumbumbus 2 months ago.
Notes_small_window.png (105.2 KB) - added by Klumbumbus 2 months ago.
Notes_long_link.png (112.0 KB) - added by Klumbumbus 2 months ago.
note77430.png (28.9 KB) - added by Klumbumbus 2 months ago.

Download all attachments as: .zip

Change History (24)

Changed 2 months ago by Klumbumbus

Attachment: long_note.gif added

comment:1 Changed 2 months ago by Klumbumbus

Description: modified (diff)

comment:2 Changed 2 months ago by Don-vip

Stop moving, I can't see the node id :D

comment:3 Changed 2 months ago by Don-vip

Resolution: fixed
Status: newclosed

In 13122/josm:

fix #15550 - Automatic line break of note tooltips (tested on western and ideographic scripts)

comment:5 Changed 2 months ago by Don-vip

Resolution: fixed
Status: closedreopened

OK the "cut at each sentence" does not work. People are writing very long sentences... But I didn't find how to resize properly/dynamically the new widget...

comment:6 Changed 2 months ago by Klumbumbus

Can the the width of the mapview be accessed? If then what about line breaks at the last whitespace before the width of the tooltip reaches 75% of the width of the mapview? And for URLs maybe split them at / if this is possible.

Changed 2 months ago by Klumbumbus

Attachment: non_URL.png added

comment:7 Changed 2 months ago by Klumbumbus

The current implementation also creates links, which are not URLs:

comment:8 Changed 2 months ago by Don-vip

In 13128/josm:

see #15550, see #11217 - better detection of URLs in notes

comment:9 Changed 2 months ago by Don-vip

In 13157/josm:

see #15550 - better (?) resizing of note tooltips

comment:10 Changed 2 months ago by Don-vip

I can't find a perfect solution. Can you please test and tell me if it's ok now?

Changed 2 months ago by Klumbumbus

Attachment: Notes_wide_window.png added

Changed 2 months ago by Klumbumbus

Attachment: Notes_small_window.png added

Changed 2 months ago by Klumbumbus

Attachment: Notes_long_link.png added

comment:11 Changed 2 months ago by Klumbumbus

The text is cut off when the notes tooltip is resized. compare attachment:Notes_wide_window.png​ with attachment:Notes_small_window.png

Also long links are cut off. This doesn't look nice but could be acceptable as the links work nevertheless. See attachment:Notes_long_link.png

comment:12 Changed 2 months ago by Don-vip

In 13162/josm:

see #15550 - much better dynamic resizing of note tooltips

comment:13 Changed 2 months ago by Don-vip

It should be finally OK now. Can you please test?

comment:14 Changed 2 months ago by Klumbumbus

Resizing works fine now in most cases. There is still text overflow at https://www.openstreetmap.org/note/77430 attachment:note77430.png

I also just notices a small bug for the links. If a . follows the link (end of sentence) then the dot is wrongly added to the link. See https://www.openstreetmap.org/note/1182494 or https://www.openstreetmap.org/note/1067888.

For brackets it already works fine (see https://www.openstreetmap.org/note/77430).

Changed 2 months ago by Klumbumbus

Attachment: note77430.png added

comment:15 Changed 2 months ago by Don-vip

Resolution: fixed
Status: reopenedclosed

In 13165/josm:

fix #15550 - last tweaks in note tooltips size, placement and URL detection

comment:16 Changed 2 months ago by Klumbumbus

Thanks! I hope you don't regret it to start working on the notes tooltip ;)

comment:17 Changed 2 months ago by Don-vip

I didn't think it would be so difficult :) Can you please make a final test? :)

comment:18 Changed 2 months ago by Klumbumbus

It's fine now and a major improvement compared to the old tooltips before r13111.

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.

Add Comment


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

 
Note: See TracTickets for help on using tickets.