integral icon indicating copy to clipboard operation
integral copied to clipboard

UX Improvement: When creating list URLs add option to use domain as root of the URL.

Open phil9690 opened this issue 6 years ago • 2 comments

Description of issue

When creating a new list item that is a link, I have to give the full URL for links within my own domain. I should be able to just use the path without any domain and it will automatically know to prepend my domain URL.

e.g. I want to be able to add a list item with the url http://mydomain.com/foo/bar, when I create the item I should only have to add the URL /foo/bar.

Current behaviour

Have to enter full URL for list item links.

Expected behaviour

Auto prepend domain URL onto list item links when the domain hasn't been provided. Alternatively add a checkbox to say this is an internal link which

phil9690 avatar Nov 06 '18 11:11 phil9690

This validation is carried out by Parsley (client side only) - It automatically validates the field with a URL regex because as it is a URL type. Workaround for this would be to change the type of the field to text. However then the only validation that would be carried out would be a presence check.

Possible improvement would be to carry out a custom validation, validates URL regex OR valid path.

patricklindsay avatar Nov 08 '18 00:11 patricklindsay

We could also make a request to the URL and check if we get a healthy response, if we get a 404 or anything like that, then inform the user the link is broken. This would stop users adding broken links to the page, as regex would only catch a valid URL, but not a broken link.

phil9690 avatar Nov 12 '18 12:11 phil9690