From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id B569E203C3 for ; Thu, 21 Jul 2016 01:23:05 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 1/2] www: label sections and hopefully improve navigation Date: Thu, 21 Jul 2016 01:23:02 +0000 Message-Id: <20160721012303.15165-2-e@80x24.org> In-Reply-To: <20160721012303.15165-1-e@80x24.org> References: <20160721012303.15165-1-e@80x24.org> List-Id: Clearly label "Thread overview" and "Reply instructions" so users can quickly skip stuff they're not interested in. Additionally, note the fact the thread view allows quick navigation within the thread to avoid extra network requests and improve the display for single-message threads. Finally, use
to better-delineate sections of each page. --- lib/PublicInbox/View.pm | 19 ++++++++++++------- lib/PublicInbox/WwwStream.pm | 2 +- 2 files changed, 13 insertions(+), 8 deletions(-) diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm index 4906864..5f99644 100644 --- a/lib/PublicInbox/View.pm +++ b/lib/PublicInbox/View.pm @@ -61,10 +61,12 @@ sub msg_reply { push @$arg, '/path/to/YOUR_REPLY'; $arg = join(" \\\n ", '', @$arg); <You may reply publically to this message via -plain-text email using any one of the following methods: +
Reply instructions:
+
+You may reply publically to this message via plain-text email
+using any one of the following methods:
 
 * Save the following mbox file, import it into your mail client,
   and reply-to-all from there: index";
-	$skel .= "\n$nr+ messages in thread: (download: ";
-	$skel .= "mbox.gz";
+	$skel .= ", back to index\n\n";
+	$skel .= "Thread overview: ";
+	$skel .= $nr == 1 ? '(only message)' : "$nr+ messages";
+	$skel .= " (download: mbox.gz";
 	$skel .= " / follow: Atom feed)\n";
+	$skel .= "-- links below jump to the message on this page --\n";
 	$ctx->{-upfx} = '../../';
 	$ctx->{cur_level} = 0;
 	$ctx->{dst} = \$skel;
@@ -523,6 +527,7 @@ sub thread_skel {
 			qq(/ Atom feed);
 
 	my $parent = in_reply_to($hdr);
+	$$dst .= "\nThread overview: ";
 	if ($nr <= 1) {
 		if (defined $parent) {
 			$$dst .= "($expand)\n ";
diff --git a/lib/PublicInbox/WwwStream.pm b/lib/PublicInbox/WwwStream.pm
index bce384b..bdc8048 100644
--- a/lib/PublicInbox/WwwStream.pm
+++ b/lib/PublicInbox/WwwStream.pm
@@ -80,7 +80,7 @@ sub _html_end {
 			join("\n", map { "\tgit clone --mirror $_" } @urls);
 	}
 	my $url = PublicInbox::Hval::prurl($ctx->{env}, PI_URL);
-	'
'.join("\n",
+	'
'.join("\n",
 		'- ' . $desc,
 		$urls,
 		'Served with public-inbox: '.
-- 
EW