From 06a7d0ef5b5933a7f458a29ece343594100bd894 Mon Sep 17 00:00:00 2001 From: Wyatt Allen Date: Thu, 26 Jul 2018 12:02:41 -0700 Subject: [PATCH] Rename "Project" to "Repo" in some visual labels Despite the size of this commit, the change is cosmetic. While renaming the "Project" key in the change metadata is straightforward, renaming the change list column header involves work in multiple components. This is because the headers to be shown are defined inside the change table behavior and are used by multiple other components. Consequently, the label is renamed in users of that behavior and tests are updated. Also remove a redundant test, rename change table methods for consistency, and update labels in notification settings. Bug: Issue 7755 Change-Id: I174c3fa203725f63b79dec86280263d6299f73cf --- .../gr-change-table-behavior.html | 2 +- .../gr-change-table-behavior_test.html | 8 ++-- .../gr-change-list-item.html | 18 ++++----- .../gr-change-list-item.js | 6 +-- .../gr-change-list-item_test.html | 38 +++++-------------- .../gr-change-list/gr-change-list_test.html | 6 +-- .../gr-change-metadata.html | 2 +- .../gr-change-table-editor_test.html | 8 ++-- .../gr-watched-projects-editor.html | 4 +- .../app/styles/gr-change-list-styles.html | 10 ++--- 10 files changed, 42 insertions(+), 60 deletions(-) diff --git a/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior.html b/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior.html index d18e442480..ff9b54ae33 100644 --- a/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior.html +++ b/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior.html @@ -30,7 +30,7 @@ limitations under the License. 'Status', 'Owner', 'Assignee', - 'Project', + 'Repo', 'Branch', 'Updated', 'Size', diff --git a/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior_test.html b/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior_test.html index dc98b59067..4d6913beae 100644 --- a/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior_test.html +++ b/polygerrit-ui/app/behaviors/gr-change-table-behavior/gr-change-table-behavior_test.html @@ -63,7 +63,7 @@ limitations under the License. 'Status', 'Owner', 'Assignee', - 'Project', + 'Repo', 'Branch', 'Updated', 'Size', @@ -74,7 +74,7 @@ limitations under the License. 'Subject', 'Status', 'Assignee', - 'Project', + 'Repo', 'Branch', 'Size', ]; @@ -83,13 +83,13 @@ limitations under the License. }); test('isColumnHidden', () => { - const columnToCheck = 'Project'; + const columnToCheck = 'Repo'; let columnsToDisplay = [ 'Subject', 'Status', 'Owner', 'Assignee', - 'Project', + 'Repo', 'Branch', 'Updated', 'Size', diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.html b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.html index eab1b0133a..6890d53510 100644 --- a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.html +++ b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item.html @@ -169,21 +169,21 @@ limitations under the License. -- - - - [[_computeProjectDisplay(change)]] + + + [[_computeRepoDisplay(change)]] - [[_computeProjectDisplay(change, 'true')]] + class="truncatedRepo" + href$="[[_computeRepoUrl(change)]]" + title$="[[_computeRepoDisplay(change)]]"> + [[_computeRepoDisplay(change, 'true')]] - + [[change.branch]]
- Project + Repo diff --git a/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor_test.html b/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor_test.html index daf94378ac..587cc3b0d8 100644 --- a/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor_test.html +++ b/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor_test.html @@ -47,7 +47,7 @@ limitations under the License. 'Status', 'Owner', 'Assignee', - 'Project', + 'Repo', 'Branch', 'Updated', ]; @@ -90,7 +90,7 @@ limitations under the License. 'Status', 'Owner', 'Assignee', - 'Project', + 'Repo', 'Branch', 'Updated', ]); @@ -151,7 +151,7 @@ limitations under the License. 'Status', 'Owner', 'Assignee', - 'Project', + 'Repo', 'Branch', 'Updated', ]); @@ -163,7 +163,7 @@ limitations under the License. 'Status', 'Owner', 'Assignee', - 'Project', + 'Repo', 'Branch', 'Updated', 'Size', diff --git a/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor.html b/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor.html index 52649db97f..7846b7abae 100644 --- a/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor.html +++ b/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor.html @@ -49,7 +49,7 @@ limitations under the License. - + @@ -98,7 +98,7 @@ limitations under the License. id="newProject" query="[[_query]]" threshold="1" - placeholder="Project"> + placeholder="Repo">
ProjectRepo