[PATCH v2 20/20] nmbug-status: Add inter-message padding
authorW. Trevor King <wking@tremily.us>
Mon, 10 Feb 2014 18:40:41 +0000 (10:40 +1600)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:59:53 +0000 (09:59 -0800)
c9/d7adcf850a7594692b439c82acb689e3a30969 [new file with mode: 0644]

diff --git a/c9/d7adcf850a7594692b439c82acb689e3a30969 b/c9/d7adcf850a7594692b439c82acb689e3a30969
new file mode 100644 (file)
index 0000000..578b0ae
--- /dev/null
@@ -0,0 +1,135 @@
+Return-Path: <wking@tremily.us>\r
+X-Original-To: notmuch@notmuchmail.org\r
+Delivered-To: notmuch@notmuchmail.org\r
+Received: from localhost (localhost [127.0.0.1])\r
+       by olra.theworths.org (Postfix) with ESMTP id 39C39431FBD\r
+       for <notmuch@notmuchmail.org>; Mon, 10 Feb 2014 10:45:03 -0800 (PST)\r
+X-Virus-Scanned: Debian amavisd-new at olra.theworths.org\r
+X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References"\r
+X-Spam-Flag: NO\r
+X-Spam-Score: 0\r
+X-Spam-Level: \r
+X-Spam-Status: No, score=0 tagged_above=-999 required=5\r
+       tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, RCVD_IN_DNSWL_NONE=-0.0001]\r
+       autolearn=disabled\r
+Received: from olra.theworths.org ([127.0.0.1])\r
+       by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024)\r
+       with ESMTP id ZgmNMfpUcvjl for <notmuch@notmuchmail.org>;\r
+       Mon, 10 Feb 2014 10:44:57 -0800 (PST)\r
+Received: from qmta08.westchester.pa.mail.comcast.net\r
+       (qmta08.westchester.pa.mail.comcast.net [76.96.62.80])\r
+       by olra.theworths.org (Postfix) with ESMTP id 5AF15429E3E\r
+       for <notmuch@notmuchmail.org>; Mon, 10 Feb 2014 10:44:02 -0800 (PST)\r
+Received: from omta16.westchester.pa.mail.comcast.net ([76.96.62.88])\r
+       by qmta08.westchester.pa.mail.comcast.net with comcast\r
+       id Qhyh1n0041uE5Es58ik2H3; Mon, 10 Feb 2014 18:44:02 +0000\r
+Received: from odin.tremily.us ([24.18.63.50])\r
+       by omta16.westchester.pa.mail.comcast.net with comcast\r
+       id Qii11n00t152l3L3cii2Dq; Mon, 10 Feb 2014 18:42:02 +0000\r
+Received: from mjolnir.tremily.us (unknown [192.168.0.140])\r
+       by odin.tremily.us (Postfix) with ESMTPS id 6DD3710167C9;\r
+       Mon, 10 Feb 2014 10:42:01 -0800 (PST)\r
+Received: (nullmailer pid 1287 invoked by uid 1000);\r
+       Mon, 10 Feb 2014 18:40:46 -0000\r
+From: "W. Trevor King" <wking@tremily.us>\r
+To: notmuch@notmuchmail.org\r
+Subject: [PATCH v2 20/20] nmbug-status: Add inter-message padding\r
+Date: Mon, 10 Feb 2014 10:40:41 -0800\r
+Message-Id:\r
+ <366eaf80c23346e9a6a8ae8251083f3774beb5bb.1392056624.git.wking@tremily.us>\r
+X-Mailer: git-send-email 1.8.5.2.8.g0f6c0d1\r
+In-Reply-To: <cover.1392056624.git.wking@tremily.us>\r
+References: <cover.1392056624.git.wking@tremily.us>\r
+In-Reply-To: <cover.1392056624.git.wking@tremily.us>\r
+References: <cover.1392056624.git.wking@tremily.us>\r
+DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=comcast.net;\r
+       s=q20121106; t=1392057842;\r
+       bh=QVJnvehNfrBFhIDIN2fzvrXlBCpN4Jm+EDUzF2p5Tpo=;\r
+       h=Received:Received:Received:Received:From:To:Subject:Date:\r
+       Message-Id;\r
+       b=SIi5IHMD46eZqvzqQh3aOpOS3Ref9aeIRJWqA7uilqy3RTNDAS3sL7KiamZpRX6Pb\r
+       HN+knJy+a4aaX5ZUehCMC2ZZWVWZmmvD9FaZYQCteylu21MfWeyy9IQWDwdFhN/MHZ\r
+       0716wNThm04A9d35iuFgG30FRNJj/yZiEWqYYhZka7zOO2kkF0yJllwaXj96Q3CV3p\r
+       0O8F4j9xQbIeyQplC6Ck9CVv6fK6lARjgdhLlvesLuf/NGjviaHLAhjb+GiZQ9U6EU\r
+       SRF2z0mt471iWH0GiC+MbN3kMo8iXSN9qFny2Fp2zRMIGtUlag2Xykit4SsmkcTUeW\r
+       zLaGYEWY1Qe3g==\r
+Cc: Tomi Ollila <tomi.ollila@iki.fi>\r
+X-BeenThere: notmuch@notmuchmail.org\r
+X-Mailman-Version: 2.1.13\r
+Precedence: list\r
+List-Id: "Use and development of the notmuch mail system."\r
+       <notmuch.notmuchmail.org>\r
+List-Unsubscribe: <http://notmuchmail.org/mailman/options/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=unsubscribe>\r
+List-Archive: <http://notmuchmail.org/pipermail/notmuch>\r
+List-Post: <mailto:notmuch@notmuchmail.org>\r
+List-Help: <mailto:notmuch-request@notmuchmail.org?subject=help>\r
+List-Subscribe: <http://notmuchmail.org/mailman/listinfo/notmuch>,\r
+       <mailto:notmuch-request@notmuchmail.org?subject=subscribe>\r
+X-List-Received-Date: Mon, 10 Feb 2014 18:45:03 -0000\r
+\r
+We already had the tbody with a blank row separating threads (which is\r
+not colored); this commit adds a bit of spacing to separate messages\r
+within a thread.  It will also add a bit of colored padding above the\r
+first message and below the final message, but the main goal is to add\r
+padding *between* two-row message blocks.\r
+\r
+                                               <--- new padding\r
+  thread-1, message-1, row-1  (class="message-first")\r
+  thread-1, message-1, row-2  (class="message-last")\r
+                                               <--- new padding\r
+    spacer tbody with a blank row\r
+                                               <--- new padding\r
+  thread-2, message-1, row-1  (class="message-first")\r
+  thread-2, message-1, row-2  (class="message-last")\r
+                                               <--- new padding\r
+                                               <--- new padding\r
+  thread-2, message-2, row-1  (class="message-first")\r
+  thread-2, message-2, row-2  (class="message-last")\r
+                                               <--- new padding\r
+---\r
+ devel/nmbug/nmbug-status | 11 +++++++++--\r
+ 1 file changed, 9 insertions(+), 2 deletions(-)\r
+\r
+diff --git a/devel/nmbug/nmbug-status b/devel/nmbug/nmbug-status\r
+index 7209dd1..c4532f1 100755\r
+--- a/devel/nmbug/nmbug-status\r
++++ b/devel/nmbug/nmbug-status\r
+@@ -208,11 +208,11 @@ class HtmlPage (Page):\r
+             stream.write('  <tbody>\n')\r
+             for message_display_data in thread:\r
+                 stream.write((\r
+-                    '    <tr>\n'\r
++                    '    <tr class="message-first">\n'\r
+                     '      <td>{date}</td>\n'\r
+                     '      <td><code>{message-id-term}</code></td>\n'\r
+                     '    </tr>\n'\r
+-                    '    <tr>\n'\r
++                    '    <tr class="message-last">\n'\r
+                     '      <td>{from}</td>\n'\r
+                     '      <td>{subject}</td>\n'\r
+                     '    </tr>\n'\r
+@@ -255,6 +255,12 @@ _PAGES['html'] = HtmlPage(\r
+     table {{\r
+       border-spacing: 0;\r
+     }}\r
++    tr.message-first td {{\r
++      padding-top: {inter_message_padding};\r
++    }}\r
++    tr.message-last td {{\r
++      padding-bottom: {inter_message_padding};\r
++    }}\r
+     td {{\r
+       padding-left: {border_radius};\r
+       padding-right: {border_radius};\r
+@@ -288,6 +294,7 @@ For more infomation see <a href="http://notmuchmail.org/nmbug">nmbug</a>\r
+ <h3>Views</h3>\r
+ '''.format(date=datetime.datetime.utcnow().date(),\r
+            encoding=_ENCODING,\r
++           inter_message_padding='0.25em',\r
+            border_radius='0.5em'),\r
+     footer='</body>\n</html>\n',\r
+     )\r
+-- \r
+1.8.5.2.8.g0f6c0d1\r
+\r