user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
* [PATCH 0/2] view: permalink Thread: display cleanups
@ 2016-01-30 23:39 Eric Wong
  2016-01-30 23:39 ` [PATCH 1/2] view: do not kill whitespace in permalink thread timestamp Eric Wong
  2016-01-30 23:39 ` [PATCH 2/2] view: cleanup permalink Thread: header display Eric Wong
  0 siblings, 2 replies; 3+ messages in thread
From: Eric Wong @ 2016-01-30 23:39 UTC (permalink / raw)
  To: meta

I noticed some oddities in the pseudo "Thread:" header in the
per-message view from "permalink".  These fix it.

I'm not sure if "Thread:" is a good word to display, even;
since it's not a real email header (at least not from the
raw message itself...)

Perhaps ":thread [ expand | mbox.gz | scroll down ]" makes things
more obvious?

2 changes:
      view: do not kill whitespace in permalink thread timestamp
      view: cleanup permalink Thread: header display

 lib/PublicInbox/View.pm | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] view: do not kill whitespace in permalink thread timestamp
  2016-01-30 23:39 [PATCH 0/2] view: permalink Thread: display cleanups Eric Wong
@ 2016-01-30 23:39 ` Eric Wong
  2016-01-30 23:39 ` [PATCH 2/2] view: cleanup permalink Thread: header display Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2016-01-30 23:39 UTC (permalink / raw)
  To: meta

There's no need to HTML escape a timestamp we generate ourselves.
We need to preserve the leading space and can't use the "oneline"
semantics to preserve alignment.
---
 lib/PublicInbox/View.pm | 1 -
 1 file changed, 1 deletion(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index be18633..e72243b 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -772,7 +772,6 @@ sub _inline_header {
 	my $f = $mime->header('X-PI-From');
 	my $d = _msg_date($mime);
 	$f = PublicInbox::Hval->new_oneline($f)->as_html;
-	$d = PublicInbox::Hval->new_oneline($d)->as_html;
 	my $pfx = ' ' . $d . ' ' . indent_for($level);
 	my $attr = $f;
 	$state->{first_level} ||= $level;
-- 
EW


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] view: cleanup permalink Thread: header display
  2016-01-30 23:39 [PATCH 0/2] view: permalink Thread: display cleanups Eric Wong
  2016-01-30 23:39 ` [PATCH 1/2] view: do not kill whitespace in permalink thread timestamp Eric Wong
@ 2016-01-30 23:39 ` Eric Wong
  1 sibling, 0 replies; 3+ messages in thread
From: Eric Wong @ 2016-01-30 23:39 UTC (permalink / raw)
  To: meta

The word "skip" can be confusing.  Instead, spell out "scroll down"
for the user to read and only display that text when the thread
is sufficiently long.
---
 lib/PublicInbox/View.pm | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index e72243b..88ab2d2 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -475,8 +475,11 @@ sub thread_inline {
 		return;
 	}
 
-	$$dst .= "~$nr messages (<a\nhref=\"#b\">skip</a> / " .
-		 $expand . ")\n";
+	$$dst .= "~$nr messages ($expand";
+	if ($nr > MAX_INLINE_QUOTED) {
+		$$dst .= qq! / <a\nhref="#b">[scroll down]</a>!;
+	}
+	$$dst .= ")\n";
 
 	my $subj = $srch->subject_path($cur->header('Subject'));
 	my $state = {
-- 
EW


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-01-30 23:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-01-30 23:39 [PATCH 0/2] view: permalink Thread: display cleanups Eric Wong
2016-01-30 23:39 ` [PATCH 1/2] view: do not kill whitespace in permalink thread timestamp Eric Wong
2016-01-30 23:39 ` [PATCH 2/2] view: cleanup permalink Thread: header display Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).