From 9eb69a0593875ba8425d5a74a2e01fe05218be85 Mon Sep 17 00:00:00 2001 From: Andrew Bonventre Date: Tue, 15 Dec 2015 12:33:58 -0500 Subject: [PATCH] Add dropdown to jump to patch set in change view Feature: Issue 3645 Change-Id: I5b38ce872295c5d39790d3768ca581f07c050785 --- polygerrit-ui/app/elements/gr-ajax.html | 7 + .../app/elements/gr-change-view.html | 156 +++++++++++++----- polygerrit-ui/app/elements/gr-file-list.html | 50 +++--- polygerrit-ui/app/scripts/app.js | 2 +- .../app/test/gr-change-view-test.html | 60 +++++++ polygerrit-ui/app/test/gr-file-list-test.html | 126 ++++++++++++++ polygerrit-ui/app/test/index.html | 1 + 7 files changed, 331 insertions(+), 71 deletions(-) create mode 100644 polygerrit-ui/app/test/gr-file-list-test.html diff --git a/polygerrit-ui/app/elements/gr-ajax.html b/polygerrit-ui/app/elements/gr-ajax.html index 9671b37e6d..97f35281a2 100644 --- a/polygerrit-ui/app/elements/gr-ajax.html +++ b/polygerrit-ui/app/elements/gr-ajax.html @@ -79,6 +79,13 @@ limitations under the License. }, }, + ready: function() { + // Used for debugging which element a request came from. + var headers = this.$.xhr.headers; + headers['x-requesting-element-id'] = this.id || 'gr-ajax (no id)'; + this.$.xhr.headers = headers; + }, + generateRequest: function() { return this.$.xhr.generateRequest(); }, diff --git a/polygerrit-ui/app/elements/gr-change-view.html b/polygerrit-ui/app/elements/gr-change-view.html index 8bef101571..35153d42c6 100644 --- a/polygerrit-ui/app/elements/gr-change-view.html +++ b/polygerrit-ui/app/elements/gr-change-view.html @@ -38,6 +38,7 @@ limitations under the License. height: 4.1em; } .header { + align-items: center; background-color: var(--view-background-color); display: flex; max-width: var(--max-constrained-width); @@ -57,6 +58,15 @@ limitations under the License. overflow: hidden; text-overflow: ellipsis; } + .patchSelectLabel { + margin-left: var(--default-horizontal-margin); + } + .header select { + margin-left: .5em; + } + .header gr-reply-dropdown { + margin-left: var(--default-horizontal-margin); + } section { margin: 10px 0; padding: 10px var(--default-horizontal-margin); @@ -87,26 +97,39 @@ limitations under the License. } + url="[[_computeCommentsPath(_changeNum)]]" + last-response="{{_comments}}"> +
Loading...

- [[change._number]]: - [[change.subject]] + [[_change._number]]: + [[_change.subject]]

+ + Reply
@@ -115,13 +138,13 @@ limitations under the License. - + - + - + - + @@ -147,21 +170,20 @@ limitations under the License.
Owner[[change.owner.name]][[_change.owner.name]]
Reviewers @@ -129,15 +152,15 @@ limitations under the License.
Project[[change.project]][[_change.project]]
Branch[[change.branch]][[_change.branch]]
Topic[[change.topic]][[_change.topic]]
StrategyUpdated + date-str="[[_change.updated]]">
-
[[_computeCurrentRevisionMessage(change)]]
+
[[_commitInfo.message]]
+ change-num="[[_changeNum]]" + patch-num="[[_patchNum]]" + comments="[[_comments]]"> + change-num="[[_changeNum]]" + messages="[[_change.messages]]" + comments="[[_comments]]">
diff --git a/polygerrit-ui/app/test/gr-file-list-test.html b/polygerrit-ui/app/test/gr-file-list-test.html new file mode 100644 index 0000000000..f474f15c35 --- /dev/null +++ b/polygerrit-ui/app/test/gr-file-list-test.html @@ -0,0 +1,126 @@ + + + + +gr-file-list + + + + + + + + + + + + + + + + diff --git a/polygerrit-ui/app/test/index.html b/polygerrit-ui/app/test/index.html index 42cd24f7c0..231f960006 100644 --- a/polygerrit-ui/app/test/index.html +++ b/polygerrit-ui/app/test/index.html @@ -33,6 +33,7 @@ limitations under the License. 'gr-diff-side-test.html', 'gr-diff-test.html', 'gr-diff-view-test.html', + 'gr-file-list-test.html', 'gr-reply-dropdown-test.html', 'gr-search-bar-test.html', ].forEach(function(file) {