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
This commit is contained in:
@@ -126,13 +126,13 @@ limitations under the License.
|
||||
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 @@ limitations under the License.
|
||||
<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 @@ limitations under the License.
|
||||
</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>
|
||||
|
||||
@@ -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')));
|
||||
},
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@ limitations under the License.
|
||||
ul,
|
||||
blockquote,
|
||||
gr-linked-text.pre {
|
||||
margin: 0 0 1.4em 0;
|
||||
margin: 0 0 .8em 0;
|
||||
}
|
||||
p,
|
||||
ul,
|
||||
|
||||
Reference in New Issue
Block a user