Merge "Rename Save to Send with better tooltip"

This commit is contained in:
Tao Zhou
2019-12-19 12:57:22 +00:00
committed by Gerrit Code Review
7 changed files with 14 additions and 34 deletions

View File

@@ -269,16 +269,6 @@ limitations under the License.
</section>
<section class="actions">
<div class="left">
<template is="dom-if" if="[[canBeStarted]]">
<gr-button
link
secondary
disabled="[[_isState(knownLatestState, 'not-latest')]]"
class="action save"
has-tooltip
title="[[_saveTooltip]]"
on-click="_saveTapHandler">Save</gr-button>
</template>
<span
id="checkingStatusLabel"
hidden$="[[!_isState(knownLatestState, 'checking')]]">
@@ -297,6 +287,18 @@ limitations under the License.
id="cancelButton"
class="action cancel"
on-click="_cancelTapHandler">Cancel</gr-button>
<template is="dom-if" if="[[canBeStarted]]">
<!-- Use 'Send' here as the change may only about reviewers / ccs
and when this button is visible, the next button will always
be 'Start review' -->
<gr-button
link
disabled="[[_isState(knownLatestState, 'not-latest')]]"
class="action save"
has-tooltip
title="[[_saveTooltip]]"
on-click="_saveClickHandler">Send</gr-button>
</template>
<gr-button
id="sendButton"
link

View File

@@ -43,7 +43,7 @@
};
const ButtonTooltips = {
SAVE: 'Save reply but do not send notification',
SAVE: 'Send but do not send notification or change review state',
START_REVIEW: 'Mark as ready for review and send reply',
SEND: 'Send reply',
};
@@ -686,7 +686,7 @@
this._rebuildReviewerArrays(this.change.reviewers, this._owner);
}
_saveTapHandler(e) {
_saveClickHandler(e) {
e.preventDefault();
if (!this.$.ccs.submitEntryText()) {
// Do not proceed with the save if there is an invalid email entry in

View File

@@ -116,13 +116,6 @@ limitations under the License.
:host([link][primary]) {
--text-color: var(--primary-button-background-color);
}
:host([secondary]) {
--background-color: var(--secondary-button-text-color);
--text-color: var(--secondary-button-background-color);
}
:host([link][secondary]) {
--text-color: var(--secondary-button-text-color);
}
/* Keep below color definition for primary so that this takes precedence
when disabled. */

View File

@@ -110,25 +110,21 @@ limitations under the License.
<gr-button
id="replyBtn"
link
secondary
class="action reply"
on-click="_handleCommentReply">Reply</gr-button>
<gr-button
id="quoteBtn"
link
secondary
class="action quote"
on-click="_handleCommentQuote">Quote</gr-button>
<gr-button
id="ackBtn"
link
secondary
class="action ack"
on-click="_handleCommentAck">Ack</gr-button>
<gr-button
id="doneBtn"
link
secondary
class="action done"
on-click="_handleCommentDone">Done</gr-button>
</div>

View File

@@ -119,7 +119,6 @@ limitations under the License.
--gr-button: {
height: 20px;
padding: 0 var(--spacing-s);
color: var(--default-button-text-color);
}
}
.editMessage {
@@ -268,7 +267,6 @@ limitations under the License.
<gr-button
id="deleteBtn"
link
secondary
class$="action delete [[_computeDeleteButtonClass(_isAdmin, draft)]]"
on-click="_handleCommentDelete">
<iron-icon id="icon" icon="gr-icons:delete"></iron-icon>
@@ -325,22 +323,18 @@ limitations under the License.
<div class="rightActions">
<gr-button
link
secondary
class="action cancel hideOnPublished"
on-click="_handleCancel">Cancel</gr-button>
<gr-button
link
secondary
class="action discard hideOnPublished"
on-click="_handleDiscard">Discard</gr-button>
<gr-button
link
secondary
class="action edit hideOnPublished"
on-click="_handleEdit">Edit</gr-button>
<gr-button
link
secondary
disabled$="[[_computeSaveDisabled(_messageText, comment, resolved)]]"
class="action save hideOnPublished"
on-click="_handleSave">Save</gr-button>
@@ -351,7 +345,6 @@ limitations under the License.
<template is="dom-if" if="[[!_hasHumanReply]]">
<gr-button
link
secondary
class="action fix"
on-click="_handleFix"
disabled="[[robotButtonDisabled]]">

View File

@@ -36,7 +36,6 @@ html {
--primary-button-text-color: white;
/* Used on text color for change list that doesn't need user's attention. */
--reviewed-text-color: black;
--secondary-button-text-color: #212121;
--tooltip-text-color: white;
--vote-text-color-recommended: #388e3c;
--vote-text-color-disliked: #d32f2f;
@@ -52,7 +51,6 @@ html {
--dialog-background-color: var(--background-color-primary);
--dropdown-background-color: var(--background-color-primary);
--expanded-background-color: var(--background-color-tertiary);
--secondary-button-background-color: var(--background-color-primary);
--select-background-color: var(--background-color-secondary);
--shell-command-background-color: var(--background-color-secondary);
--shell-command-decoration-background-color: var(--background-color-tertiary);

View File

@@ -36,7 +36,6 @@ limitations under the License.
--primary-button-text-color: var(--primary-text-color);
/* Used on text color for change list doesn't need user's attention. */
--reviewed-text-color: #dadce0;
--secondary-button-text-color: var(--deemphasized-text-color);
--tooltip-text-color: white;
--vote-text-color-recommended: #388e3c;
--vote-text-color-disliked: #d32f2f;
@@ -56,7 +55,6 @@ limitations under the License.
--emphasis-color: #383f4a;
--hover-background-color: rgba(161, 194, 250, 0.2);
--primary-button-background-color: var(--link-color);
--secondary-button-background-color: var(--primary-text-color);
--selection-background-color: rgba(161, 194, 250, 0.1);
--tooltip-background-color: #111;
--unresolved-comment-background-color: #385a9a;