open domain urls in new window by default #543
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
open domain urls in new window by default
add external link icon to signify leaving the site
add nowrap to entry domain element to prevent awkward line breaks
it's probably worth having a discussion about this functionality change. the main thing is it forces the entry urls to open in a new window rather than giving the user the choice to do either. This is sort of why I kept the main title link the same, so there's still a way to open in-window links if desired, but that could be good or bad
Some data:
hacker news - opens external links in same window
slashdot - opens external links in new window
reddit - opens external links in new window
mastodon - opens external links in new window
I ran across this blog post https://css-tricks.com/use-target_blank/ . Granted, it's from a decade ago, but seems to heavily lean anti-new window and gives quite a lengthy list on why. Some of those, I agree with, but the comments go into detail that basically make it seem like saying "non-tech-savvy" could potentially get confused either way (leaving the site suddenly could be confusing or opening a new window could be confusing), so I feel like that data isn't super evident for or against. There was a comment saying inconsistent can be bad, which is technically what I've done here as some links are same, some are new window. In my head, this seemed good, as it gives the user choice, but of course that means people would have to memorize which is which (which is why I added the icon as well, to hopefully assist with that)
edit: one thing I wanted to mention was the now whitespace around the entry url
( domain )
now rather than(domain)
, this happened with a recent PR, and speaking with Benti it was sort of unintentional, but I kind of like the breathing room it gives (especially with the icon added in), so thought to keep it, but just added the nowrap as I was seeing it line break some times where(
appeared by itself on one line and the rest of the link was on a new linebefore entry list page:
before single entry view:
after entry list page:
after single entry view: