about summary refs log tree commit homepage
path: root/lib/PublicInbox/View.pm
diff options
context:
space:
mode:
authorEric Wong <e@80x24.org>2021-04-28 06:55:22 +0000
committerEric Wong <e@80x24.org>2021-04-28 19:30:43 +0000
commit0761fa9470bf37bc2febd4f680b0fc4a304eae83 (patch)
tree84700a262f9ff9ddb146eea1a03d54ecfd35b473 /lib/PublicInbox/View.pm
parent2ad73a71e64085e7814df8880f90120c87d515cb (diff)
downloadpublic-inbox-0761fa9470bf37bc2febd4f680b0fc4a304eae83.tar.gz
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 <sluongng@gmail.com>
Link: https://public-inbox.org/git/YHhfsqfTJ9NzRwS1@C02YX140LVDN.corpad.adbkng.com/
Diffstat (limited to 'lib/PublicInbox/View.pm')
-rw-r--r--lib/PublicInbox/View.pm5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index f4f6da11..530c878f 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -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;