user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH] view: add [thread overview] anchor next to Date:
@ 2021-04-28  6:55 Eric Wong
  0 siblings, 0 replies; only message in thread
From: Eric Wong @ 2021-04-28  6:55 UTC (permalink / raw)
  To: meta; +Cc: Son Luong Ngoc

The existing Subject: anchor to #r may not be 100% obvious,
and we can't stick the phrase "[thread overview]" into the
same line as the Subject without introducing ambiguity.

Fortunately, we have the Date: header directly under it.
Adding "[thread overview]" after the Date: is unambiguous
and won't make the line too long for valid emails.

This hopefully improves navigation ever-so-slightly thanks
to comments by Son Luong Ngoc.

Reported-by: Son Luong Ngoc <>
 lib/PublicInbox/ | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/ b/lib/PublicInbox/
index f4f6da11..530c878f 100644
--- a/lib/PublicInbox/
+++ b/lib/PublicInbox/
@@ -694,7 +694,7 @@ sub _msg_page_prepare_obuf {
 	for my $v ($eml->header('Date')) {
 		$v = ascii_html($v);
 		obfuscate_addrs($obfs_ibx, $v) if $obfs_ibx; # possible :P
-		$rv .= "Date: $v\n";
+		$rv .= qq{Date: $v\t<a\nhref="#r">[thread overview]</a>\n};
 	if (!$nr) { # first (and only) message, common case
 		$ctx->{-title_html} = join(' - ', @title);
@@ -739,7 +739,8 @@ sub thread_skel ($$$) {
 			$$skel .= SKEL_EXPAND."\n ";
 			$$skel .= ghost_parent('../', $parent) . "\n";
 		} else {
-			$$skel .= '[no followups] '.SKEL_EXPAND."\n";
+			$$skel .= "<a\nid=r>[no followups]</a> ".
+					SKEL_EXPAND."\n";
 		$ctx->{next_msg} = undef;
 		$ctx->{parent_msg} = $parent;

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-04-28  6:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-28  6:55 [PATCH] view: add [thread overview] anchor next to Date: Eric Wong

user/dev discussion of public-inbox itself

This inbox may be cloned and mirrored by anyone:

	git clone --mirror
	git clone --mirror http://czquwvybam4bgbro.onion/meta
	git clone --mirror http://hjrcffqmbrq6wope.onion/meta
	git clone --mirror http://ou63pmih66umazou.onion/meta

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V1 meta meta/ \
	public-inbox-index meta

Example config snippet for mirrors.
Newsgroups are available over NNTP:
 note: .onion URLs require Tor:

code repositories for project(s) associated with this inbox:

AGPL code for this site: git clone