bellroy / lesswrong

Less Wrong platform
http://lesswrong.org/
Other
47 stars 23 forks source link

Add anchor to permalinks #338

Open frediy opened 9 years ago

frediy commented 9 years ago

From gwe...@gmail.com on April 13, 2011 02:50:39

While looking at an old comment of mine, < http://lesswrong.com/lw/3a0/the_long_now/3625 > (wondering how to integrate it into http://www.gwern.net/About.html#long-content ), I realized that when I clicked on 'permalink', I couldn't see my comment, because the site banner and tags and spacing and whatnot not took up an entire screen.

On other forum software, there is even more visual cruft, but it's not such an issue for me because the permalink URLs include a

address fragment which will jump to the actual content.

In this comment's case, the URL I would like the permalink to point to would be < http://lesswrong.com/lw/3a0/the_long_now/3625#body_t1_3625 >. (I extracted the #body_t1_3625 from the HTML source.)

In general, I think it would be considerably better for permalinks if they pointed straight at the comment.

Original issue: http://code.google.com/p/lesswrong/issues/detail?id=240

frediy commented 9 years ago

From Matthew.Fallshaw on April 18, 2011 21:33:05

Or, easier to implement, http://lesswrong.com/lw/3a0/the_long_now/3625#comments which would give some context (because some context helps when it's an external link).

(You need a bigger screen :)

Status: Accepted
Labels: -Milestone-Future Milestone-Now

frediy commented 9 years ago

From gwe...@gmail.com on April 19, 2011 07:30:33

OK, I didn't know that #comments was a workable anchor. That makes this a really easy change, doesn't it? Just toss in a '+ "#comments"' somewhere.

And my screen is plenty big (I paid extra for the 17 inch laptop screen); what I need is a LW which doesn't take up a quarter of the screen to display an ugly banner; a tenth of the screen because one line wraps due to useless links like 'top comments'; 2 full lines to tell me something I already know about permalinks; like 7 lines for 'Comments', save/report, 'Article navigation', and so on; and another few lines repeating the lines about permalinks - all with generous dollops of whitespace to make it take up an entire screen. >.<

frediy commented 9 years ago

From Matthew.Fallshaw on April 19, 2011 10:00:26

And my screen is plenty big

I think I failed to be as funny as I thought I was. LW should work on 17" screens.

frediy commented 9 years ago

From gwe...@gmail.com on April 19, 2011 10:19:01

This is kind of a separate bug report, I suppose ('LW takes up too much screen estate'), but I'll go with it it.

It works in the sense that nothing is outright broken; it doesn't work in the sense that I can see a comment without always having to page down.

Attached is a screenshot of what I see; note that this is a fullscreened XMonad with zero window manager decoration, minimizalized Firefox toolbars/real-estate, and fairly small font settings. (The only thing I could do to free up even more space for LW would be to remove the StumbleUpon toolbar, which might make the very first line visible at the bottom of the screen.)

Attachment: xwd-130323331529664.png

frediy commented 9 years ago

From gwe...@gmail.com on April 20, 2011 19:52:59

So, not that I know Python or anything, but at a guess, some change like this is required:

diff --git a/ r2 / r2 /lib/pages/pages.py b/ r2 / r2 /lib/pages/pages.py index 9f64551..d23091a 100644 --- a/ r2 / r2 /lib/pages/pages.py +++ b/ r2 / r2 /lib/pages/pages.py

  • wrapped = Wrapped(link, link_title=comment.make_permalink_title(link), for_comment_permalink=True)
  • wrapped = Wrapped(link+"#comments", link_title=comment.make_permalink_title(link), for_comment_permalink=True) wrapped.render_class = CommentPermalink return wrapped
frediy commented 9 years ago

From RedWordS...@gmail.com on July 28, 2011 15:21:08

With the redesign and availability of anchors, although they still need to be manually added, recategorizing as a feature request and changing title.

Summary: Add anchor to permalinks
Labels: -Type-Defect -Milestone-Now Type-Feature Milestone-Future SEO Component-UI

frediy commented 9 years ago

From Matthew.Fallshaw on August 02, 2012 23:05:27

Cc: Matthew.Fallshaw