diff options
author | Chris Poucet <poucet@google.com> | 2023-08-23 07:23:13 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2023-08-23 07:23:13 +0000 |
commit | 8a8c85aaf25d2f129c4359e889bf3167cc781719 (patch) | |
tree | 2f1e6d088bf061f12dc7457c0394a1224c05dc48 | |
parent | a203dc38a4a9b3d5ec2cde918f346416a49fa357 (diff) |
Revert "Show the check-mark before the CL-name in related-changes view"
This reverts commit a203dc38a4a9b3d5ec2cde918f346416a49fa357.
Reason for revert: Still discussing UX
Change-Id: Icf20162c2401acbe46bed681baedb31b147fa042
-rw-r--r-- | polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-change.ts | 40 |
1 files changed, 14 insertions, 26 deletions
diff --git a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-change.ts b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-change.ts index 9bd56bed2e..90b05f627b 100644 --- a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-change.ts +++ b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-change.ts @@ -3,7 +3,7 @@ * Copyright 2021 Google LLC * SPDX-License-Identifier: Apache-2.0 */ -import {LitElement, css, html, nothing} from 'lit'; +import {LitElement, css, html} from 'lit'; import {customElement, property} from 'lit/decorators.js'; import {sharedStyles} from '../../../styles/shared-styles'; import { @@ -87,11 +87,10 @@ export class GrRelatedChange extends LitElement { .submittableCheck { padding-left: var(--spacing-s); color: var(--positive-green-text-color); - display: inline; - width: 20px; + display: none; } - .submittableCheck.submittable:after { - content: '✓'; + .submittableCheck.submittable { + display: inline; } `, ]; @@ -103,14 +102,22 @@ export class GrRelatedChange extends LitElement { const linkClass = this.computeLinkClass(change); return html` <div class="changeContainer"> - ${this.showSubmittableCheck ? this.renderSubmittableCheck() : nothing} <a href=${ifDefined(this.href)} aria-label=${ifDefined(this.label)} class=${linkClass} ><slot></slot ></a> - + ${this.showSubmittableCheck + ? html`<span + tabindex="-1" + title="Submittable" + class="submittableCheck ${linkClass}" + role="img" + aria-label="Submittable" + >✓</span + >` + : ''} ${this.showChangeStatus ? html`<span class=${this.computeChangeStatusClass(change)}> (${this.computeChangeStatus(change)}) @@ -120,25 +127,6 @@ export class GrRelatedChange extends LitElement { `; } - private renderSubmittableCheck() { - if (this.change?.submittable) { - return html`<span - tabindex="-1" - title="Submittable" - class="submittableCheck submittable" - role="img" - aria-label="Submittable" - ></span>`; - } else { - // Empty place-holder to ensure that columns line up. - return html`<span - tabindex="-1" - class="submittableCheck" - role="img" - ></span>`; - } - } - private computeLinkClass(change: ChangeInfo | RelatedChangeAndCommitInfo) { const statuses = []; if (change.status === ChangeStatus.ABANDONED) { |