qgis / QGIS

QGIS is a free, open source, cross platform (lin/win/mac) geographical information system (GIS)
https://qgis.org
GNU General Public License v2.0
10.59k stars 3k forks source link

add API to have a short and long message version #31917

Open jonathan-geoseer opened 5 years ago

jonathan-geoseer commented 5 years ago

Hi, Add this WFS and add the featuretype bivalves (it's the only one): http://si.icnf.pt:80/geoserver/BDG/atlas_bivalves_2007/wfs

QGIS can't add the layer and raises an error (its a server problem). The problem QGIS side is that the error is far too long for the error bar, so it tries to show scrolly buttons except the scrolly buttons seem to be "top" and "bottom" meaning you can't see the middle of the message. You have to copy/paste it all to a text file (or look in the error log). The error message: Layer atlas_bivalves_2007: Download of features for layer BDG:atlas_bivalves_2007 failed or partially failed: Server generated an exception in GetFeature response: java.lang.RuntimeException: java.io.IOException java.io.IOException null ERROR: parse error - invalid geometry Hint: "POLYGON ((-�" <-- parse error at position 12 within geometry. You may attempt reloading the layer with F5

gioman commented 5 years ago

Hi, Add this WFS and add the featuretype bivalves (it's the only one): http://si.icnf.pt:80/geoserver/BDG/atlas_bivalves_2007/wfs

QGIS can't add the layer and raises an error (its a server problem).

No error here with this service. Please provide another example.

jonathan-geoseer commented 5 years ago

That service works for me too today.

I don't think it's worth the time to find another service when it may/may-not be working when a dev looks at this given their extremely intermittent nature. The bug is simply that over-long messages don't display correctly, it's not constrained to a specific service. I imagine it's easy enough to replicate for a dev - just feed in a large chunk of lorum-ipsum text (or the above error message) into whatever part of the QGIS API prints messages and you'll probably see it.

gioman commented 5 years ago

I don't think it's worth the time to find another service when it may/may-not be working when a dev looks at this given their extremely intermittent nature. The bug is simply that over-long messages don't display correctly, it's not constrained to a specific service. I imagine it's easy enough to replicate for a dev - just feed in a large chunk of lorum-ipsum text (or the above error message) into whatever part of the QGIS API prints messages and you'll probably see it.

see my other comment: I think that the proper place where to look for long warnings and error messages is the log.

roya0045 commented 5 years ago

I agree with @gioman on this one, as a user I feel like the warning/ error is simply there to raise a flag and if you deem the issue important enough, you check the log and otherwise ignore it. If the message needs more than two lines, it probably means that the message should be reformatted to be shorter.

nyalldawson commented 5 years ago

My 2c: I think we should avoid long messages in the bar by adding API to have a short and long message version. The short message would show in the bar along with a "more details" button which would show the full message.

It's really not nice UX to see these truncated warnings, it looks quite amateur in my opinion.

gioman commented 5 years ago

My 2c: I think we should avoid long messages in the bar by adding API to have a short and long message version. The short message would show in the bar along with a "more details" button which would show the full message.

It's really not nice UX to see these truncated warnings, it looks quite amateur in my opinion.

of course this would be ideal, but among the 1250 open tickets tagged as bug this to me feels real very low priority :)

AlisterH commented 1 year ago

Unfortunately some of the messages are getting longer and longer. There should probably be some effort to keep important messages concise. The warning message shown when loading a project saved with an old QGIS version is now so long that I suspect most people wouldn't be able to read it. Even if the whole thing was visible they might not have time to read it, as it times out very quickly, ignoring the timeout setting in Settings>Options>General>Application. This is what it looks like on my 1920x1200 display when I have a layers panel on the left and a processing panel on the right: image In this case I think the length has increased partly because newer versions of QGIS have started writing a longer description of themselves into the project file. Surely there is no real need to append the code name of the release to the end of the version number? This particular message would certainly be better without it. And it wouldn't hurt to shorten the message further by deleting the first instance of "version".