From 4c3fa09766deb2f698a206a938d87800e1b7edb7 Mon Sep 17 00:00:00 2001 From: Becky Siegel Date: Tue, 3 Oct 2017 15:58:16 +0100 Subject: [PATCH] Update patchset selector styles Also fixed patchset dropdown so that 'edit' does not display as 'Patchset edit' Change-Id: I14f02f878d0e459644511cebfd3a2208cfd2e053 --- .../gr-file-list-header/gr-file-list-header.html | 2 +- .../change/gr-messages-list/gr-messages-list.html | 2 +- .../gr-patch-range-select/gr-patch-range-select.html | 9 +++++++++ .../gr-patch-range-select/gr-patch-range-select.js | 5 +++-- .../gr-patch-range-select_test.html | 4 ++-- .../shared/gr-dropdown-list/gr-dropdown-list.html | 10 ++++++---- 6 files changed, 22 insertions(+), 10 deletions(-) diff --git a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.html b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.html index 57b3c1014b..911b947318 100644 --- a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.html +++ b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header.html @@ -112,7 +112,7 @@ limitations under the License. .separator { background-color: rgba(0, 0, 0, .3); height: 1.5em; - margin: 0 .4em; + margin: 0 .6em; width: 1px; } .separator.transparent { diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.html b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.html index 0fa6f4dcc6..ab494b4fdb 100644 --- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.html +++ b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list.html @@ -60,7 +60,7 @@ limitations under the License. .separator { background-color: rgba(0, 0, 0, .3); height: 1.5em; - margin: 0 .4em; + margin: 0 .6em; width: 1px; } .separator.transparent { diff --git a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.html b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.html index ab52e15e34..b363ca0a1d 100644 --- a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.html +++ b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.html @@ -32,8 +32,17 @@ limitations under the License. max-width: 15em; } .arrow { + color: rgba(0,0,0,.7); margin: 0 .5em; } + gr-dropdown-list { + --trigger-style: { + color: rgba(0,0,0,.7); + text-transform: none; + font-family: var(--font-family); + } + --trigger-hover-color: rgba(0,0,0,.6); + } @media screen and (max-width: 50em) { .filesWeblinks { display: none; diff --git a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js index 4ca9fb9d64..15a0ad020b 100644 --- a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js +++ b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select.js @@ -102,8 +102,9 @@ dropdownContent.push({ disabled: this._computeRightDisabled(patchNum, basePatchNum, _sortedRevisions), - triggerText: `Patchset ${patchNum}`, - text: `Patchset ${patchNum}` + + triggerText: `${patchNum === 'edit' ? '': 'Patchset '}` + + patchNum, + text: `${patchNum === 'edit' ? '': 'Patchset '}${patchNum}` + `${this._computePatchSetCommentsString( this.comments, patchNum)}`, mobileText: this._computeMobileText(patchNum, this.comments, diff --git a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_test.html b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_test.html index d49974bf9f..95c71e7e34 100644 --- a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_test.html +++ b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_test.html @@ -246,8 +246,8 @@ limitations under the License. }, { disabled: false, - triggerText: 'Patchset edit', - text: 'Patchset edit', + triggerText: 'edit', + text: 'edit', mobileText: 'edit', bottomText: '', value: 'edit', diff --git a/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.html b/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.html index 91c2def985..0916a899b6 100644 --- a/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.html +++ b/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list.html @@ -72,10 +72,6 @@ limitations under the License. background-color: #f2f2f2; } } - gr-button { - --gr-button-arrow-color: var(--color-link); - --gr-button-arrow-hover-color: var(--color-link-hover); - } paper-item:not(:last-of-type) { border-bottom: 1px solid #ddd; } @@ -94,6 +90,12 @@ limitations under the License. justify-content: space-between; flex-direction: row; width: 100%; + } + gr-button { + --gr-button: { + @apply --trigger-style; + } + --gr-button-hover-color: var(--trigger-hover-color); } gr-date-formatter { color: rgba(0,0,0,.54);