user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
Search results ordered by [date|relevance]  view[summary|nested|Atom feed]
thread overview below | download mbox.gz: |
* [PATCH 3/5] view: increase MAX_INLINE_QUOTED threshold to 12
  @ 2014-08-28  2:47  7% ` Eric Wong
  0 siblings, 0 replies; 1+ results
From: Eric Wong @ 2014-08-28  2:47 UTC (permalink / raw)
  To: meta; +Cc: Eric Wong

12 lines is half an 80x24 terminal, so it is probably a reasonable
amount to quote.  Often 5 lines was not enough for context.  This
feature is mainly to reduce scrolling necessary to view pages.
---
 lib/PublicInbox/View.pm | 2 +-
 t/feed.t                | 9 +++++++++
 t/view.t                | 9 ++++++++-
 3 files changed, 18 insertions(+), 2 deletions(-)

diff --git a/lib/PublicInbox/View.pm b/lib/PublicInbox/View.pm
index 0d97428..2794339 100644
--- a/lib/PublicInbox/View.pm
+++ b/lib/PublicInbox/View.pm
@@ -11,7 +11,7 @@ use Email::MIME::ContentType qw/parse_content_type/;
 require POSIX;
 
 # TODO: make these constants tunable
-use constant MAX_INLINE_QUOTED => 5;
+use constant MAX_INLINE_QUOTED => 12; # half an 80x24 terminal
 use constant MAX_TRUNC_LEN => 72;
 use constant PRE_WRAP => '<pre style="white-space:pre-wrap">';
 
diff --git a/t/feed.t b/t/feed.t
index 880716c..978e215 100644
--- a/t/feed.t
+++ b/t/feed.t
@@ -31,6 +31,15 @@ Date: Thu, 01 Jan 1970 00:00:00 +0000
 > I quote to much
 > I quote to much
 > I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
+> I quote to much
 
 msg $i
 
diff --git a/t/view.t b/t/view.t
index bc6fbed..91ba168 100644
--- a/t/view.t
+++ b/t/view.t
@@ -18,7 +18,14 @@ OK
 > We generate links to a separate full page where quoted-text is inline.
 > This is
 >
-> Currently 5 lines
+> Currently 12 lines
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
+> See MAX_INLINE_QUOTED
 > See MAX_INLINE_QUOTED
 
 hello world
-- 
EW


^ permalink raw reply related	[relevance 7%]

Results 1-1 of 1 | reverse | options above
-- pct% links below jump to the message on this page, permalinks otherwise --
2014-08-28  2:47     [PATCH 1/5] view: Email::Address cache purge is optional Eric Wong
2014-08-28  2:47  7% ` [PATCH 3/5] view: increase MAX_INLINE_QUOTED threshold to 12 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).