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

long urls don't break in activity page cards #4727

Closed
judell opened this issue Dec 22, 2017 · 8 comments
Closed

long urls don't break in activity page cards #4727

judell opened this issue Dec 22, 2017 · 8 comments
Labels

Comments

@judell
Copy link
Contributor

judell commented Dec 22, 2017

We're doing this:

image

But it looks like we also (or instead?) need to do this:

image

@judell
Copy link
Contributor Author

judell commented Dec 22, 2017

/cc @dawariley

@judell
Copy link
Contributor Author

judell commented Feb 9, 2018

The PubMedCommons import turned up a bunch of these, e.g.:

image

@segdeha
Copy link

segdeha commented Feb 9, 2018

URLs in practice can be upwards of 2000 characters, so another solution, rather than just wrapping the URL, would be to do as many services these days do and display a subset of the characters of the URL while preserving the full URL in the title attribute of the anchor tag.

<a href="[full URL]" title="[full URL]">[no protocol, full domain name, X number of characters of the path, ellipsis if the path has been truncated]</a>

So, a long URL might be rendered like the following:

<a href="https://github.com/hypothesis/h/issues/4727#issuecomment-364552455" title="https://github.com/hypothesis/h/issues/4727#issuecomment-364552455">github.com/hypothesis/h/…</a>

@dwhly
Copy link
Member

dwhly commented Feb 14, 2018

another solution, rather than just wrapping the URL, would be to do as many services these days do and display a subset of the characters of the URL while preserving the full URL in the title attribute of the anchor tag

I like this (with enough characters that normal info about the domain and page is shown so that a human can say "oh, yeah, that page". 30-40?)

But another Q of course is: What do we do in the sidebar? I think we should tend towards harmonizing the two.

@dawachan
Copy link

Thanks for bringing this to our attention @judell. The solution I would also propose would be to truncate the url, not simply wrapping. Text wrapping is an improvement to it overspilling the 'div' layer which it currently does. I think the more reliable and robust solution for long urls is to truncate the url for the reasons @segdeha has outlined above.

@dawachan
Copy link

No further UX/design input is needed and if everyone is ok with the truncating solution it is good to go from my point of view, I will move it out of the design queue into one of the other columns as it is now up to @ajpeddakotla and the delivery team to pick this up when there is time. Thanks for including me!

@dwhly
Copy link
Member

dwhly commented Feb 15, 2018

Per discussion in our product meeting today w/ @dawariley and @ajpeddakotla, lets make sure we harmonize solution we're using in sidebar and activity pages.

@robertknight
Copy link
Member

screenshot 2018-05-08 12 24 58

It looks to me like this was fixed by #4943

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

6 participants