Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Offer to fix missing http:// in website tag #6831

Closed
boothym opened this issue Sep 4, 2019 · 7 comments
Closed

Offer to fix missing http:// in website tag #6831

boothym opened this issue Sep 4, 2019 · 7 comments
Assignees
Labels
validation An issue with the validation or Q/A code
Milestone

Comments

@boothym
Copy link
Contributor

boothym commented Sep 4, 2019

A website tag without http:// is highlighted as an issue - it would be good if iD offered to "upgrade" or fix this by adding the protocol.

Also, you'll notice I had to scroll down to actually see the website field. Perhaps iD could move fields which are an issue higher up in the list, or even into the issues section just below the yellow box?
website

@quincylvania quincylvania added the validation An issue with the validation or Q/A code label Sep 5, 2019
@Adamant36
Copy link

A website tag without http:// is highlighted as an issue

Would there be a way to make it check if the website has https first and then go with that instead of http if it does? If so, I think it would be a good idea to pick https when it's available.

@kymckay
Copy link
Collaborator

kymckay commented Sep 6, 2019

I considered this when implementing the validation, but didn't follow it up for two reasons:

  1. https is preferred when available, my understanding is that you'd need to send a request to every site to check that which seems like a bad idea (especially for a field that can have arbitrary values)
  2. the value might not even be a website, in which case prepending the protocol only hides an issue that would hopefully be noticed when the user looks at the value

These don't necessarily mean a quick-fix can't be added, it would be convenient for users who're paying attention. I'm just not sure we can guarantee it's always a valid fix - in which case it seems unsuitable for a quick fix.

@boothym
Copy link
Contributor Author

boothym commented Sep 8, 2019

the value might not even be a website, in which case prepending the protocol only hides an issue that would hopefully be noticed when the user looks at the value

Well, if the website field is down at the bottom and you need to scroll down to see it, users might not even notice it.

Also, saying "invalid website" doesn't exactly explain the problem to users who might not realise http is needed - www.example.com looks like a valid website, so that needs some explaining.

I'm just not sure we can guarantee it's always a valid fix - in which case it seems unsuitable for a quick fix.

Not sure you can guarantee any fix in iD at the moment will always be a valid fix...?

@quincylvania
Copy link
Collaborator

A fix would be nice here, but it's true iD can't be sure whether a site is http or https. Sometimes they redirect to each other but sometimes they don't. There's possibly a safe way to query SSL status, but we can't just go loading any arbitrary site on the user's behalf.

I'm inclined to just remove this type of website validation check altogether. The data improvements seem relatively minor compared to the cost of prompting the user.

@pnorman
Copy link
Contributor

pnorman commented Sep 9, 2019

I can't see a safe way to query the site. Privacy forbids giving an arbitrary site the users personal information like they would get in an HTTP request

@boothym
Copy link
Contributor Author

boothym commented Sep 11, 2019

osmose checks for this error, gives the choice of both, and displays both so you can easily click and check the website: http://osmose.openstreetmap.fr/en/map/?#zoom=13&lat=55.93953&lon=-3.1811&item=3093&level=1%2C2%2C3&tags=&fixable=online

However before you remove the check I have some suggestions:

  • Tell the user why it is invalid - "missing http:// or https://" or similar

  • Move the invalid field up to the top under the issues heading, see below. Maybe could do the same with other error fields?

website

If it must be removed, then iD should highlight the form field with a red border when it is missing http - this happens already in Firefox but not Chrome.

@quincylvania quincylvania self-assigned this Oct 1, 2019
@quincylvania quincylvania added this to the 2.15.6 milestone Oct 1, 2019
@quincylvania
Copy link
Collaborator

I removed the warning. Perhaps eventually we can flag formatting at the field level instead of the feature level, as some browsers already do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
validation An issue with the validation or Q/A code
Projects
None yet
Development

No branches or pull requests

5 participants