INIshell-ng

Issue 874: Better handling of coordinates

Reported by Mathias Bavay, Feb 9, 2021

Curently, if there is a regex in the XML to validate coordinates, 
the globe symbols does not get displayed (it either validates text 
filed for coordinates or for provided regexp, not both). But 
removing a validation regexp means there is no negative feedback if 
the user provide something more or less random.

Ideally, we would have a new property "coordinates=TRUE" 
in the XML that would allow Inishell to automatically validate the 
input and either shows invalid entry or globe...

Comment 1 by Michael Reisecker, Feb 9, 2021

How about just "validate=coordinates"?
This would make it clear that setting both properties (validate and 
coordinates) does not make sense.

Comment 2 by Mathias Bavay, Feb 15, 2021

Yes, that would be great! And in the code, we should apply the 
validation regex for the coordinates (so the user either sees a 
warning or the globe).

Comment 3 by Michael Reisecker, Feb 16, 2021

What do you think - warning-colored globe (so it hints to what's 
expected) or the familiar warning triangle?

Comment 4 by Mathias Bavay, Feb 19, 2021

I was thinking about the familiar warning triangle...

Comment 5 by Michael Reisecker, Feb 21, 2021

I still think we should support more generic coordinates.

One idea would be to:

- use coords="true" or coord="utm" or 
coord="regex" after all (allow all)
- show a globe if "coords" is set, and make it a link for 
lat/lon and UTM
- rely on issue 808 some time being implemented
- then it would be possible for example to have several UTM fields 
all marked as coordinate fields connected to all be mandatory if one 
is set

But then the XML developer would fix the coordinates format, so 
maybe just extend the existing regex to UTM ( resp. switch to string 
operations recognizing more formats)?

Or just leave it and say generic regex validation is enough...

Comment 6 by Mathias Bavay, Feb 22, 2021

Oops, I did not see your comments before implementing and 
committing... So, I have implemented support for latlon coordinates 
with the 'validate="coordinates"' approach.
Status: Started

Comment 7 by Michael Reisecker, Feb 22, 2021

No problem - as you said it's not clear it's worth it anyway... feel 
free to close!

Created: 8 months 9 days ago by Mathias Bavay

Updated: 7 months 26 days ago

Status: Started

Followed by: 1 person

Labels:
Type:Enhancement
Priority:High