Tighten vertical spacing in messages

In this change:
- Move and align the message reply button with the message content
  that it actually quotes when clicked.
- Do not show the message reply button if the message is "automated".
- Reduce margin around message reply button and make it "link" style.
- Remove the trailing margin from the top-level comment formatted text.
- Reduce the vertical spacing between blocks (e.g. paragraphs) in
  formatted texts.

Bug: Issue 7468
Change-Id: Iaec387ea32139062f90d37a5647394f644e9f17f
diff --git a/polygerrit-ui/app/elements/change/gr-message/gr-message.html b/polygerrit-ui/app/elements/change/gr-message/gr-message.html
index 845bdaf..e04eeb7 100644
--- a/polygerrit-ui/app/elements/change/gr-message/gr-message.html
+++ b/polygerrit-ui/app/elements/change/gr-message/gr-message.html
@@ -126,13 +126,13 @@
         top: 10px;
       }
       .replyContainer {
-        padding: .5em 0 1em;
+        padding: .5em 0 0 0;
       }
       .positiveVote {
-        box-shadow: inset 0 4.4em #d4ffd4;
+        box-shadow: inset 0 3.8em #d4ffd4;
       }
       .negativeVote {
-        box-shadow: inset 0 4.4em #ffd4d4;
+        box-shadow: inset 0 3.8em #ffd4d4;
       }
       gr-account-label {
         --gr-account-label-text-style: {
@@ -156,9 +156,13 @@
           <div class="content">
             <div class="message hideOnOpen">[[message.message]]</div>
             <gr-formatted-text
+                no-trailing-margin
                 class="message hideOnCollapsed"
                 content="[[message.message]]"
                 config="[[_commentLinks]]"></gr-formatted-text>
+            <div class="replyContainer" hidden$="[[!showReplyButton]]" hidden>
+              <gr-button link small on-tap="_handleReplyTap">Reply</gr-button>
+            </div>
             <gr-comment-list
                 comments="[[comments]]"
                 change-num="[[changeNum]]"
@@ -196,9 +200,6 @@
           </a>
         </template>
       </div>
-      <div class="replyContainer" hidden$="[[!showReplyButton]]" hidden>
-        <gr-button small on-tap="_handleReplyTap">Reply</gr-button>
-      </div>
     </div>
     <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
   </template>
diff --git a/polygerrit-ui/app/elements/change/gr-message/gr-message.js b/polygerrit-ui/app/elements/change/gr-message/gr-message.js
index 5c49c1c..d907f3b 100644
--- a/polygerrit-ui/app/elements/change/gr-message/gr-message.js
+++ b/polygerrit-ui/app/elements/change/gr-message/gr-message.js
@@ -131,7 +131,8 @@
     },
 
     _computeShowReplyButton(message, loggedIn) {
-      return !!message.message && loggedIn;
+      return !!message.message && loggedIn &&
+          !this._computeIsAutomated(message);
     },
 
     _computeExpanded(expanded) {
@@ -163,7 +164,7 @@
 
     _computeIsAutomated(message) {
       return !!(message.reviewer ||
-          message.type === 'REVIEWER_UPDATE' ||
+          this._computeIsReviewerUpdate(message) ||
           (message.tag && message.tag.startsWith('autogenerated')));
     },
 
diff --git a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.html b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.html
index 28a9e0e..1ef5a0c 100644
--- a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.html
+++ b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text.html
@@ -28,7 +28,7 @@
       ul,
       blockquote,
       gr-linked-text.pre {
-        margin: 0 0 1.4em 0;
+        margin: 0 0 .8em 0;
       }
       p,
       ul,