Update Suggest edit button UI - add icon - smaller height to be same height as header - rename to suggest edit - similar to Change #364535 Screenshot: https://imgur.com/a/1yU93kx Release-Notes: skip Google-Bug-Id: b/273191391 Change-Id: Icea10c5774408164c53d2667882d244ff115f6d0
diff --git a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts index bfa27a2..de6a39c9 100644 --- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts +++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment.ts
@@ -494,6 +494,15 @@ margin-left: var(--spacing-m); cursor: pointer; } + .suggestEdit { + /** same height as header */ + --margin: calc(0px - var(--spacing-s)); + margin-right: var(--spacing-s); + } + .suggestEdit gr-icon { + color: inherit; + margin-right: var(--spacing-s); + } `, ]; } @@ -800,8 +809,9 @@ return html`<gr-button link class="action suggestEdit" + title="This button copies the text to make a suggestion" @click=${this.createSuggestEdit} - >Suggest Fix</gr-button + ><gr-icon icon="edit" id="icon" filled></gr-icon> Suggest edit</gr-button >`; }
diff --git a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.ts b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.ts index f0a5fea..7aec8c2 100644 --- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.ts +++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_test.ts
@@ -832,7 +832,7 @@ ); element.editing = true; }); - test('renders suggest fix button', () => { + test('renders suggest edit button', () => { assert.dom.equal( queryAndAssert(element, 'gr-button.suggestEdit'), /* HTML */ `<gr-button @@ -840,8 +840,9 @@ link="" role="button" tabindex="0" + title="This button copies the text to make a suggestion" > - Suggest Fix + <gr-icon icon="edit" id="icon" filled></gr-icon> Suggest edit </gr-button> ` ); });