Add eslint-plugin-prettier and format all *_html.js
The only manual change needed to fix a test due to textContent match
Change-Id: Ic9e561f7d482e7a680b3c4bfe58decdbd5d4ec10
diff --git a/package.json b/package.json
index 18e76bf..526d201 100644
--- a/package.json
+++ b/package.json
@@ -11,8 +11,10 @@
"eslint-plugin-html": "^6.0.0",
"eslint-plugin-import": "^2.20.1",
"eslint-plugin-jsdoc": "^19.2.0",
+ "eslint-plugin-prettier": "^3.1.3",
"fried-twinkie": "^0.2.2",
"polymer-cli": "^1.9.11",
+ "prettier": "2.0.5",
"typescript": "^3.7.4",
"web-component-tester": "^6.5.1"
},
diff --git a/polygerrit-ui/app/.eslintrc.js b/polygerrit-ui/app/.eslintrc.js
index fc24278..0302a76 100644
--- a/polygerrit-ui/app/.eslintrc.js
+++ b/polygerrit-ui/app/.eslintrc.js
@@ -156,7 +156,7 @@
"import/no-cycle": 0,
"import/no-useless-path-segments": 2,
"import/no-unused-modules": 2,
- "import/no-default-export": 2
+ "import/no-default-export": 2,
},
// List of allowed globals in all files
@@ -242,12 +242,22 @@
"rules": {
"max-len": "off"
}
+ },
+ {
+ "files": ["*_html.js"],
+ "rules": {
+ "prettier/prettier": ["error", {
+ "bracketSpacing": false,
+ "singleQuote": true,
+ }]
+ }
}
],
"plugins": [
"html",
"jsdoc",
- "import"
+ "import",
+ "prettier"
],
"settings": {
"html/report-bad-indent": "error"
diff --git a/polygerrit-ui/app/BUILD b/polygerrit-ui/app/BUILD
index f382e42..ca021db 100644
--- a/polygerrit-ui/app/BUILD
+++ b/polygerrit-ui/app/BUILD
@@ -89,6 +89,7 @@
"@npm//eslint-plugin-html",
"@npm//eslint-plugin-import",
"@npm//eslint-plugin-jsdoc",
+ "@npm//eslint-plugin-prettier",
],
)
diff --git a/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section_html.js b/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section_html.js
index 5f35f55..c46cf30 100644
--- a/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-access-section/gr-access-section_html.js
@@ -17,101 +17,141 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- margin-bottom: var(--spacing-l);
- }
- fieldset {
- border: 1px solid var(--border-color);
- }
- .name {
- align-items: center;
- display: flex;
- }
- .header,
- #deletedContainer {
- align-items: center;
- background: var(--table-header-background-color);
- border-bottom: 1px dotted var(--border-color);
- display: flex;
- justify-content: space-between;
- min-height: 3em;
- padding: 0 var(--spacing-m);
- }
- #deletedContainer {
- border-bottom: 0;
- }
- .sectionContent {
- padding: var(--spacing-m);
- }
- #editBtn,
- .editing #editBtn.global,
- #deletedContainer,
- .deleted #mainContainer,
- #addPermission,
- #deleteBtn,
- .editingRef .name,
- .editRefInput {
- display: none;
- }
- .editing #editBtn,
- .editingRef .editRefInput {
- display: flex;
- }
- .deleted #deletedContainer {
- display: flex;
- }
- .editing #addPermission,
- #mainContainer,
- .editing #deleteBtn {
- display: block;
- }
- .editing #deleteBtn,
- #undoRemoveBtn {
- padding-right: var(--spacing-m);
- }
- </style>
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <fieldset id="section" class\$="gr-form-styles [[_computeSectionClass(editing, canUpload, ownerOf, _editingRef, _deleted)]]">
- <div id="mainContainer">
- <div class="header">
- <div class="name">
- <h3>[[_computeSectionName(section.id)]]</h3>
- <gr-button id="editBtn" link="" class\$="[[_computeEditBtnClass(section.id)]]" on-click="editReference">
- <iron-icon id="icon" icon="gr-icons:create"></iron-icon>
- </gr-button>
- </div>
- <iron-input class="editRefInput" bind-value="{{section.id}}" type="text" on-input="_handleValueChange">
- <input class="editRefInput" bind-value="{{section.id}}" is="iron-input" type="text" on-input="_handleValueChange">
- </iron-input>
- <gr-button link="" id="deleteBtn" on-click="_handleRemoveReference">Remove</gr-button>
- </div><!-- end header -->
- <div class="sectionContent">
- <template is="dom-repeat" items="{{_permissions}}" as="permission">
- <gr-permission name="[[_computePermissionName(section.id, permission, permissionValues, capabilities)]]" permission="{{permission}}" labels="[[labels]]" section="[[section.id]]" editing="[[editing]]" groups="[[groups]]" on-added-permission-removed="_handleAddedPermissionRemoved">
- </gr-permission>
- </template>
- <div id="addPermission">
- Add permission:
- <select id="permissionSelect">
- <!-- called with a third parameter so that permissions update
+ <style include="shared-styles">
+ :host {
+ display: block;
+ margin-bottom: var(--spacing-l);
+ }
+ fieldset {
+ border: 1px solid var(--border-color);
+ }
+ .name {
+ align-items: center;
+ display: flex;
+ }
+ .header,
+ #deletedContainer {
+ align-items: center;
+ background: var(--table-header-background-color);
+ border-bottom: 1px dotted var(--border-color);
+ display: flex;
+ justify-content: space-between;
+ min-height: 3em;
+ padding: 0 var(--spacing-m);
+ }
+ #deletedContainer {
+ border-bottom: 0;
+ }
+ .sectionContent {
+ padding: var(--spacing-m);
+ }
+ #editBtn,
+ .editing #editBtn.global,
+ #deletedContainer,
+ .deleted #mainContainer,
+ #addPermission,
+ #deleteBtn,
+ .editingRef .name,
+ .editRefInput {
+ display: none;
+ }
+ .editing #editBtn,
+ .editingRef .editRefInput {
+ display: flex;
+ }
+ .deleted #deletedContainer {
+ display: flex;
+ }
+ .editing #addPermission,
+ #mainContainer,
+ .editing #deleteBtn {
+ display: block;
+ }
+ .editing #deleteBtn,
+ #undoRemoveBtn {
+ padding-right: var(--spacing-m);
+ }
+ </style>
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <fieldset
+ id="section"
+ class$="gr-form-styles [[_computeSectionClass(editing, canUpload, ownerOf, _editingRef, _deleted)]]"
+ >
+ <div id="mainContainer">
+ <div class="header">
+ <div class="name">
+ <h3>[[_computeSectionName(section.id)]]</h3>
+ <gr-button
+ id="editBtn"
+ link=""
+ class$="[[_computeEditBtnClass(section.id)]]"
+ on-click="editReference"
+ >
+ <iron-icon id="icon" icon="gr-icons:create"></iron-icon>
+ </gr-button>
+ </div>
+ <iron-input
+ class="editRefInput"
+ bind-value="{{section.id}}"
+ type="text"
+ on-input="_handleValueChange"
+ >
+ <input
+ class="editRefInput"
+ bind-value="{{section.id}}"
+ is="iron-input"
+ type="text"
+ on-input="_handleValueChange"
+ />
+ </iron-input>
+ <gr-button link="" id="deleteBtn" on-click="_handleRemoveReference"
+ >Remove</gr-button
+ >
+ </div>
+ <!-- end header -->
+ <div class="sectionContent">
+ <template is="dom-repeat" items="{{_permissions}}" as="permission">
+ <gr-permission
+ name="[[_computePermissionName(section.id, permission, permissionValues, capabilities)]]"
+ permission="{{permission}}"
+ labels="[[labels]]"
+ section="[[section.id]]"
+ editing="[[editing]]"
+ groups="[[groups]]"
+ on-added-permission-removed="_handleAddedPermissionRemoved"
+ >
+ </gr-permission>
+ </template>
+ <div id="addPermission">
+ Add permission:
+ <select id="permissionSelect">
+ <!-- called with a third parameter so that permissions update
after a new section is added. -->
- <template is="dom-repeat" items="[[_computePermissions(section.id, capabilities, labels, section.value.permissions.*)]]">
- <option value="[[item.value.id]]">[[item.value.name]]</option>
- </template>
- </select>
- <gr-button link="" id="addBtn" on-click="_handleAddPermission">Add</gr-button>
- </div>
- <!-- end addPermission -->
- </div><!-- end sectionContent -->
- </div><!-- end mainContainer -->
- <div id="deletedContainer">
- <span>[[_computeSectionName(section.id)]] was deleted</span>
- <gr-button link="" id="undoRemoveBtn" on-click="_handleUndoRemove">Undo</gr-button>
- </div><!-- end deletedContainer -->
- </fieldset>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <template
+ is="dom-repeat"
+ items="[[_computePermissions(section.id, capabilities, labels, section.value.permissions.*)]]"
+ >
+ <option value="[[item.value.id]]">[[item.value.name]]</option>
+ </template>
+ </select>
+ <gr-button link="" id="addBtn" on-click="_handleAddPermission"
+ >Add</gr-button
+ >
+ </div>
+ <!-- end addPermission -->
+ </div>
+ <!-- end sectionContent -->
+ </div>
+ <!-- end mainContainer -->
+ <div id="deletedContainer">
+ <span>[[_computeSectionName(section.id)]] was deleted</span>
+ <gr-button link="" id="undoRemoveBtn" on-click="_handleUndoRemove"
+ >Undo</gr-button
+ >
+ </div>
+ <!-- end deletedContainer -->
+ </fieldset>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list_html.js b/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list_html.js
index ffc10d7..136f6b6 100644
--- a/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-admin-group-list/gr-admin-group-list_html.js
@@ -17,44 +17,67 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-table-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <gr-list-view create-new="[[_createNewCapability]]" filter="[[_filter]]" items="[[_groups]]" items-per-page="[[_groupsPerPage]]" loading="[[_loading]]" offset="[[_offset]]" on-create-clicked="_handleCreateClicked" path="[[_path]]">
- <table id="list" class="genericList">
- <tbody><tr class="headerRow">
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-table-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <gr-list-view
+ create-new="[[_createNewCapability]]"
+ filter="[[_filter]]"
+ items="[[_groups]]"
+ items-per-page="[[_groupsPerPage]]"
+ loading="[[_loading]]"
+ offset="[[_offset]]"
+ on-create-clicked="_handleCreateClicked"
+ path="[[_path]]"
+ >
+ <table id="list" class="genericList">
+ <tbody>
+ <tr class="headerRow">
<th class="name topHeader">Group Name</th>
<th class="description topHeader">Group Description</th>
<th class="visibleToAll topHeader">Visible To All</th>
</tr>
- <tr id="loading" class\$="loadingMsg [[computeLoadingClass(_loading)]]">
+ <tr id="loading" class$="loadingMsg [[computeLoadingClass(_loading)]]">
<td>Loading...</td>
</tr>
- </tbody><tbody class\$="[[computeLoadingClass(_loading)]]">
- <template is="dom-repeat" items="[[_shownGroups]]">
- <tr class="table">
- <td class="name">
- <a href\$="[[_computeGroupUrl(item.group_id)]]">[[item.name]]</a>
- </td>
- <td class="description">[[item.description]]</td>
- <td class="visibleToAll">[[_visibleToAll(item)]]</td>
- </tr>
- </template>
- </tbody>
- </table>
- </gr-list-view>
- <gr-overlay id="createOverlay" with-backdrop="">
- <gr-dialog id="createDialog" class="confirmDialog" disabled="[[!_hasNewGroupName]]" confirm-label="Create" confirm-on-enter="" on-confirm="_handleCreateGroup" on-cancel="_handleCloseCreate">
- <div class="header" slot="header">
- Create Group
- </div>
- <div class="main" slot="main">
- <gr-create-group-dialog has-new-group-name="{{_hasNewGroupName}}" params="[[params]]" id="createNewModal"></gr-create-group-dialog>
- </div>
- </gr-dialog>
- </gr-overlay>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </tbody>
+ <tbody class$="[[computeLoadingClass(_loading)]]">
+ <template is="dom-repeat" items="[[_shownGroups]]">
+ <tr class="table">
+ <td class="name">
+ <a href$="[[_computeGroupUrl(item.group_id)]]">[[item.name]]</a>
+ </td>
+ <td class="description">[[item.description]]</td>
+ <td class="visibleToAll">[[_visibleToAll(item)]]</td>
+ </tr>
+ </template>
+ </tbody>
+ </table>
+ </gr-list-view>
+ <gr-overlay id="createOverlay" with-backdrop="">
+ <gr-dialog
+ id="createDialog"
+ class="confirmDialog"
+ disabled="[[!_hasNewGroupName]]"
+ confirm-label="Create"
+ confirm-on-enter=""
+ on-confirm="_handleCreateGroup"
+ on-cancel="_handleCloseCreate"
+ >
+ <div class="header" slot="header">
+ Create Group
+ </div>
+ <div class="main" slot="main">
+ <gr-create-group-dialog
+ has-new-group-name="{{_hasNewGroupName}}"
+ params="[[params]]"
+ id="createNewModal"
+ ></gr-create-group-dialog>
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view_html.js b/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view_html.js
index 0bc9431..b62a41b 100644
--- a/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-admin-view/gr-admin-view_html.js
@@ -17,137 +17,167 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-menu-page-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-page-nav-styles">
- gr-dropdown-list {
- --trigger-style: {
- text-transform: none;
- }
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-menu-page-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-page-nav-styles">
+ gr-dropdown-list {
+ --trigger-style: {
+ text-transform: none;
}
- .breadcrumbText {
- /* Same as dropdown trigger so chevron spacing is consistent. */
- padding: 5px 4px;
- }
- iron-icon {
- margin: 0 var(--spacing-xs);
- }
- .breadcrumb {
- align-items: center;
- display: flex;
- }
- .mainHeader {
- align-items: baseline;
- border-bottom: 1px solid var(--border-color);
- display: flex;
- }
- .selectText {
- display: none;
- }
- .selectText.show {
- display: inline-block;
- }
- main.breadcrumbs:not(.table) {
- margin-top: var(--spacing-l);
- }
- </style>
- <gr-page-nav class="navStyles">
- <ul class="sectionContent">
- <template id="adminNav" is="dom-repeat" items="[[_filteredLinks]]">
- <li class\$="sectionTitle [[_computeSelectedClass(item.view, params)]]">
- <a class="title" href="[[_computeLinkURL(item)]]" rel="noopener">[[item.name]]</a>
+ }
+ .breadcrumbText {
+ /* Same as dropdown trigger so chevron spacing is consistent. */
+ padding: 5px 4px;
+ }
+ iron-icon {
+ margin: 0 var(--spacing-xs);
+ }
+ .breadcrumb {
+ align-items: center;
+ display: flex;
+ }
+ .mainHeader {
+ align-items: baseline;
+ border-bottom: 1px solid var(--border-color);
+ display: flex;
+ }
+ .selectText {
+ display: none;
+ }
+ .selectText.show {
+ display: inline-block;
+ }
+ main.breadcrumbs:not(.table) {
+ margin-top: var(--spacing-l);
+ }
+ </style>
+ <gr-page-nav class="navStyles">
+ <ul class="sectionContent">
+ <template id="adminNav" is="dom-repeat" items="[[_filteredLinks]]">
+ <li class$="sectionTitle [[_computeSelectedClass(item.view, params)]]">
+ <a class="title" href="[[_computeLinkURL(item)]]" rel="noopener"
+ >[[item.name]]</a
+ >
+ </li>
+ <template is="dom-repeat" items="[[item.children]]" as="child">
+ <li class$="[[_computeSelectedClass(child.view, params)]]">
+ <a href$="[[_computeLinkURL(child)]]" rel="noopener"
+ >[[child.name]]</a
+ >
</li>
- <template is="dom-repeat" items="[[item.children]]" as="child">
- <li class\$="[[_computeSelectedClass(child.view, params)]]">
- <a href\$="[[_computeLinkURL(child)]]" rel="noopener">[[child.name]]</a>
+ </template>
+ <template is="dom-if" if="[[item.subsection]]">
+ <!--If a section has a subsection, render that.-->
+ <li class$="[[_computeSelectedClass(item.subsection.view, params)]]">
+ <a
+ class="title"
+ href$="[[_computeLinkURL(item.subsection)]]"
+ rel="noopener"
+ >
+ [[item.subsection.name]]</a
+ >
+ </li>
+ <!--Loop through the links in the sub-section.-->
+ <template
+ is="dom-repeat"
+ items="[[item.subsection.children]]"
+ as="child"
+ >
+ <li
+ class$="subsectionItem [[_computeSelectedClass(child.view, params, child.detailType)]]"
+ >
+ <a href$="[[_computeLinkURL(child)]]">[[child.name]]</a>
</li>
</template>
- <template is="dom-if" if="[[item.subsection]]">
- <!--If a section has a subsection, render that.-->
- <li class\$="[[_computeSelectedClass(item.subsection.view, params)]]">
- <a class="title" href\$="[[_computeLinkURL(item.subsection)]]" rel="noopener">
- [[item.subsection.name]]</a>
- </li>
- <!--Loop through the links in the sub-section.-->
- <template is="dom-repeat" items="[[item.subsection.children]]" as="child">
- <li class\$="subsectionItem [[_computeSelectedClass(child.view, params, child.detailType)]]">
- <a href\$="[[_computeLinkURL(child)]]">[[child.name]]</a>
- </li>
- </template>
- </template>
</template>
- </ul>
- </gr-page-nav>
- <template is="dom-if" if="[[_subsectionLinks.length]]">
- <section class="mainHeader">
- <span class="breadcrumb">
- <span class="breadcrumbText">[[_breadcrumbParentName]]</span>
- <iron-icon icon="gr-icons:chevron-right"></iron-icon>
- </span>
- <gr-dropdown-list lowercase="" id="pageSelect" value="[[_computeSelectValue(params)]]" items="[[_subsectionLinks]]" on-value-change="_handleSubsectionChange">
- </gr-dropdown-list>
- </section>
- </template>
- <template is="dom-if" if="[[_showRepoList]]" restamp="true">
- <main class="table">
- <gr-repo-list class="table" params="[[params]]"></gr-repo-list>
- </main>
- </template>
- <template is="dom-if" if="[[_showGroupList]]" restamp="true">
- <main class="table">
- <gr-admin-group-list class="table" params="[[params]]">
- </gr-admin-group-list>
- </main>
- </template>
- <template is="dom-if" if="[[_showPluginList]]" restamp="true">
- <main class="table">
- <gr-plugin-list class="table" params="[[params]]"></gr-plugin-list>
- </main>
- </template>
- <template is="dom-if" if="[[_showRepoMain]]" restamp="true">
- <main class="breadcrumbs">
- <gr-repo repo="[[params.repo]]"></gr-repo>
- </main>
- </template>
- <template is="dom-if" if="[[_showGroup]]" restamp="true">
- <main class="breadcrumbs">
- <gr-group group-id="[[params.groupId]]" on-name-changed="_updateGroupName"></gr-group>
- </main>
- </template>
- <template is="dom-if" if="[[_showGroupMembers]]" restamp="true">
- <main class="breadcrumbs">
- <gr-group-members group-id="[[params.groupId]]"></gr-group-members>
- </main>
- </template>
- <template is="dom-if" if="[[_showRepoDetailList]]" restamp="true">
- <main class="table breadcrumbs">
- <gr-repo-detail-list params="[[params]]" class="table"></gr-repo-detail-list>
- </main>
- </template>
- <template is="dom-if" if="[[_showGroupAuditLog]]" restamp="true">
- <main class="table breadcrumbs">
- <gr-group-audit-log group-id="[[params.groupId]]" class="table"></gr-group-audit-log>
- </main>
- </template>
- <template is="dom-if" if="[[_showRepoCommands]]" restamp="true">
- <main class="breadcrumbs">
- <gr-repo-commands repo="[[params.repo]]"></gr-repo-commands>
- </main>
- </template>
- <template is="dom-if" if="[[_showRepoAccess]]" restamp="true">
- <main class="breadcrumbs">
- <gr-repo-access path="[[path]]" repo="[[params.repo]]"></gr-repo-access>
- </main>
- </template>
- <template is="dom-if" if="[[_showRepoDashboards]]" restamp="true">
- <main class="table breadcrumbs">
- <gr-repo-dashboards repo="[[params.repo]]"></gr-repo-dashboards>
- </main>
- </template>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
- <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
+ </template>
+ </ul>
+ </gr-page-nav>
+ <template is="dom-if" if="[[_subsectionLinks.length]]">
+ <section class="mainHeader">
+ <span class="breadcrumb">
+ <span class="breadcrumbText">[[_breadcrumbParentName]]</span>
+ <iron-icon icon="gr-icons:chevron-right"></iron-icon>
+ </span>
+ <gr-dropdown-list
+ lowercase=""
+ id="pageSelect"
+ value="[[_computeSelectValue(params)]]"
+ items="[[_subsectionLinks]]"
+ on-value-change="_handleSubsectionChange"
+ >
+ </gr-dropdown-list>
+ </section>
+ </template>
+ <template is="dom-if" if="[[_showRepoList]]" restamp="true">
+ <main class="table">
+ <gr-repo-list class="table" params="[[params]]"></gr-repo-list>
+ </main>
+ </template>
+ <template is="dom-if" if="[[_showGroupList]]" restamp="true">
+ <main class="table">
+ <gr-admin-group-list class="table" params="[[params]]">
+ </gr-admin-group-list>
+ </main>
+ </template>
+ <template is="dom-if" if="[[_showPluginList]]" restamp="true">
+ <main class="table">
+ <gr-plugin-list class="table" params="[[params]]"></gr-plugin-list>
+ </main>
+ </template>
+ <template is="dom-if" if="[[_showRepoMain]]" restamp="true">
+ <main class="breadcrumbs">
+ <gr-repo repo="[[params.repo]]"></gr-repo>
+ </main>
+ </template>
+ <template is="dom-if" if="[[_showGroup]]" restamp="true">
+ <main class="breadcrumbs">
+ <gr-group
+ group-id="[[params.groupId]]"
+ on-name-changed="_updateGroupName"
+ ></gr-group>
+ </main>
+ </template>
+ <template is="dom-if" if="[[_showGroupMembers]]" restamp="true">
+ <main class="breadcrumbs">
+ <gr-group-members group-id="[[params.groupId]]"></gr-group-members>
+ </main>
+ </template>
+ <template is="dom-if" if="[[_showRepoDetailList]]" restamp="true">
+ <main class="table breadcrumbs">
+ <gr-repo-detail-list
+ params="[[params]]"
+ class="table"
+ ></gr-repo-detail-list>
+ </main>
+ </template>
+ <template is="dom-if" if="[[_showGroupAuditLog]]" restamp="true">
+ <main class="table breadcrumbs">
+ <gr-group-audit-log
+ group-id="[[params.groupId]]"
+ class="table"
+ ></gr-group-audit-log>
+ </main>
+ </template>
+ <template is="dom-if" if="[[_showRepoCommands]]" restamp="true">
+ <main class="breadcrumbs">
+ <gr-repo-commands repo="[[params.repo]]"></gr-repo-commands>
+ </main>
+ </template>
+ <template is="dom-if" if="[[_showRepoAccess]]" restamp="true">
+ <main class="breadcrumbs">
+ <gr-repo-access path="[[path]]" repo="[[params.repo]]"></gr-repo-access>
+ </main>
+ </template>
+ <template is="dom-if" if="[[_showRepoDashboards]]" restamp="true">
+ <main class="table breadcrumbs">
+ <gr-repo-dashboards repo="[[params.repo]]"></gr-repo-dashboards>
+ </main>
+ </template>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog_html.js b/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog_html.js
index 12dc29c..3810d32 100644
--- a/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-confirm-delete-item-dialog/gr-confirm-delete-item-dialog_html.js
@@ -17,21 +17,29 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- width: 30em;
- }
- </style>
- <gr-dialog confirm-label="Delete [[_computeItemName(itemType)]]" confirm-on-enter="" on-confirm="_handleConfirmTap" on-cancel="_handleCancelTap">
- <div class="header" slot="header">[[_computeItemName(itemType)]] Deletion</div>
- <div class="main" slot="main">
- <label for="branchInput">
- Do you really want to delete the following [[_computeItemName(itemType)]]?
- </label>
- <div>
- [[item]]
- </div>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ width: 30em;
+ }
+ </style>
+ <gr-dialog
+ confirm-label="Delete [[_computeItemName(itemType)]]"
+ confirm-on-enter=""
+ on-confirm="_handleConfirmTap"
+ on-cancel="_handleCancelTap"
+ >
+ <div class="header" slot="header">
+ [[_computeItemName(itemType)]] Deletion
+ </div>
+ <div class="main" slot="main">
+ <label for="branchInput">
+ Do you really want to delete the following
+ [[_computeItemName(itemType)]]?
+ </label>
+ <div>
+ [[item]]
</div>
- </gr-dialog>
+ </div>
+ </gr-dialog>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog_html.js b/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog_html.js
index 8f11af3..f18da81 100644
--- a/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-create-change-dialog/gr-create-change-dialog_html.js
@@ -17,64 +17,101 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- input:not([type="checkbox"]),
- gr-autocomplete,
- iron-autogrow-textarea {
- width: 100%;
- }
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ input:not([type='checkbox']),
+ gr-autocomplete,
+ iron-autogrow-textarea {
+ width: 100%;
+ }
+ .value {
+ width: 32em;
+ }
+ .hide {
+ display: none;
+ }
+ @media only screen and (max-width: 40em) {
.value {
- width: 32em;
+ width: 29em;
}
- .hide {
- display: none;
- }
- @media only screen and (max-width: 40em) {
- .value {
- width: 29em;
- }
- }
- </style>
- <div class="gr-form-styles">
- <section class\$="[[_computeBranchClass(baseChange)]]">
- <span class="title">Select branch for new change</span>
- <span class="value">
- <gr-autocomplete id="branchInput" text="{{branch}}" query="[[_query]]" placeholder="Destination branch">
- </gr-autocomplete>
- </span>
- </section>
- <section class\$="[[_computeBranchClass(baseChange)]]">
- <span class="title">Provide base commit sha1 for change</span>
- <span class="value">
- <iron-input maxlength="40" placeholder="(optional)" bind-value="{{baseCommit}}">
- <input is="iron-input" id="baseCommitInput" maxlength="40" placeholder="(optional)" bind-value="{{baseCommit}}">
- </iron-input>
- </span>
- </section>
- <section>
- <span class="title">Enter topic for new change</span>
- <span class="value">
- <iron-input maxlength="1024" placeholder="(optional)" bind-value="{{topic}}">
- <input is="iron-input" id="tagNameInput" maxlength="1024" placeholder="(optional)" bind-value="{{topic}}">
- </iron-input>
- </span>
- </section>
- <section id="description">
- <span class="title">Description</span>
- <span class="value">
- <iron-autogrow-textarea id="messageInput" class="message" autocomplete="on" rows="4" max-rows="15" bind-value="{{subject}}" placeholder="Insert the description of the change.">
- </iron-autogrow-textarea>
- </span>
- </section>
- <section class\$="[[_computePrivateSectionClass(_privateChangesEnabled)]]">
- <label class="title" for="privateChangeCheckBox">Private change</label>
- <span class="value">
- <input type="checkbox" id="privateChangeCheckBox" checked\$="[[_formatBooleanString(privateByDefault)]]">
- </span>
- </section>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ }
+ </style>
+ <div class="gr-form-styles">
+ <section class$="[[_computeBranchClass(baseChange)]]">
+ <span class="title">Select branch for new change</span>
+ <span class="value">
+ <gr-autocomplete
+ id="branchInput"
+ text="{{branch}}"
+ query="[[_query]]"
+ placeholder="Destination branch"
+ >
+ </gr-autocomplete>
+ </span>
+ </section>
+ <section class$="[[_computeBranchClass(baseChange)]]">
+ <span class="title">Provide base commit sha1 for change</span>
+ <span class="value">
+ <iron-input
+ maxlength="40"
+ placeholder="(optional)"
+ bind-value="{{baseCommit}}"
+ >
+ <input
+ is="iron-input"
+ id="baseCommitInput"
+ maxlength="40"
+ placeholder="(optional)"
+ bind-value="{{baseCommit}}"
+ />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <span class="title">Enter topic for new change</span>
+ <span class="value">
+ <iron-input
+ maxlength="1024"
+ placeholder="(optional)"
+ bind-value="{{topic}}"
+ >
+ <input
+ is="iron-input"
+ id="tagNameInput"
+ maxlength="1024"
+ placeholder="(optional)"
+ bind-value="{{topic}}"
+ />
+ </iron-input>
+ </span>
+ </section>
+ <section id="description">
+ <span class="title">Description</span>
+ <span class="value">
+ <iron-autogrow-textarea
+ id="messageInput"
+ class="message"
+ autocomplete="on"
+ rows="4"
+ max-rows="15"
+ bind-value="{{subject}}"
+ placeholder="Insert the description of the change."
+ >
+ </iron-autogrow-textarea>
+ </span>
+ </section>
+ <section class$="[[_computePrivateSectionClass(_privateChangesEnabled)]]">
+ <label class="title" for="privateChangeCheckBox">Private change</label>
+ <span class="value">
+ <input
+ type="checkbox"
+ id="privateChangeCheckBox"
+ checked$="[[_formatBooleanString(privateByDefault)]]"
+ />
+ </span>
+ </section>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog_html.js b/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog_html.js
index 2cdde81..bc1f24c 100644
--- a/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-create-group-dialog/gr-create-group-dialog_html.js
@@ -17,26 +17,26 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- :host {
- display: inline-block;
- }
- input {
- width: 20em;
- }
- </style>
- <div class="gr-form-styles">
- <div id="form">
- <section>
- <span class="title">Group name</span>
- <iron-input bind-value="{{_name}}">
- <input is="iron-input" bind-value="{{_name}}">
- </iron-input>
- </section>
- </div>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ :host {
+ display: inline-block;
+ }
+ input {
+ width: 20em;
+ }
+ </style>
+ <div class="gr-form-styles">
+ <div id="form">
+ <section>
+ <span class="title">Group name</span>
+ <iron-input bind-value="{{_name}}">
+ <input is="iron-input" bind-value="{{_name}}" />
+ </iron-input>
+ </section>
</div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog_html.js b/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog_html.js
index 3a6df2f..62a2e0f 100644
--- a/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-create-pointer-dialog/gr-create-pointer-dialog_html.js
@@ -17,44 +17,68 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- :host {
- display: inline-block;
- }
- input {
- width: 20em;
- }
- /* Add css selector with #id to increase priority
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ :host {
+ display: inline-block;
+ }
+ input {
+ width: 20em;
+ }
+ /* Add css selector with #id to increase priority
(otherwise ".gr-form-styles section" rule wins) */
- .hideItem,
- #itemAnnotationSection.hideItem {
- display: none;
- }
- </style>
- <div class="gr-form-styles">
- <div id="form">
- <section id="itemNameSection">
- <span class="title">[[detailType]] name</span>
- <iron-input placeholder="[[detailType]] Name" bind-value="{{_itemName}}">
- <input is="iron-input" placeholder="[[detailType]] Name" bind-value="{{_itemName}}">
- </iron-input>
- </section>
- <section id="itemRevisionSection">
- <span class="title">Initial Revision</span>
- <iron-input placeholder="Revision (Branch or SHA-1)" bind-value="{{_itemRevision}}">
- <input is="iron-input" placeholder="Revision (Branch or SHA-1)" bind-value="{{_itemRevision}}">
- </iron-input>
- </section>
- <section id="itemAnnotationSection" class\$="[[_computeHideItemClass(itemDetail)]]">
- <span class="title">Annotation</span>
- <iron-input placeholder="Annotation (Optional)" bind-value="{{_itemAnnotation}}">
- <input is="iron-input" placeholder="Annotation (Optional)" bind-value="{{_itemAnnotation}}">
- </iron-input>
- </section>
- </div>
+ .hideItem,
+ #itemAnnotationSection.hideItem {
+ display: none;
+ }
+ </style>
+ <div class="gr-form-styles">
+ <div id="form">
+ <section id="itemNameSection">
+ <span class="title">[[detailType]] name</span>
+ <iron-input
+ placeholder="[[detailType]] Name"
+ bind-value="{{_itemName}}"
+ >
+ <input
+ is="iron-input"
+ placeholder="[[detailType]] Name"
+ bind-value="{{_itemName}}"
+ />
+ </iron-input>
+ </section>
+ <section id="itemRevisionSection">
+ <span class="title">Initial Revision</span>
+ <iron-input
+ placeholder="Revision (Branch or SHA-1)"
+ bind-value="{{_itemRevision}}"
+ >
+ <input
+ is="iron-input"
+ placeholder="Revision (Branch or SHA-1)"
+ bind-value="{{_itemRevision}}"
+ />
+ </iron-input>
+ </section>
+ <section
+ id="itemAnnotationSection"
+ class$="[[_computeHideItemClass(itemDetail)]]"
+ >
+ <span class="title">Annotation</span>
+ <iron-input
+ placeholder="Annotation (Optional)"
+ bind-value="{{_itemAnnotation}}"
+ >
+ <input
+ is="iron-input"
+ placeholder="Annotation (Optional)"
+ bind-value="{{_itemAnnotation}}"
+ />
+ </iron-input>
+ </section>
</div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog_html.js b/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog_html.js
index 65666ea..680986c 100644
--- a/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-create-repo-dialog/gr-create-repo-dialog_html.js
@@ -17,66 +17,87 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- :host {
- display: inline-block;
- }
- input {
- width: 20em;
- }
- gr-autocomplete {
- width: 20em;
- }
- </style>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ :host {
+ display: inline-block;
+ }
+ input {
+ width: 20em;
+ }
+ gr-autocomplete {
+ width: 20em;
+ }
+ </style>
- <div class="gr-form-styles">
- <div id="form">
- <section>
- <span class="title">Repository name</span>
- <iron-input autocomplete="on" bind-value="{{_repoConfig.name}}">
- <input is="iron-input" id="repoNameInput" autocomplete="on" bind-value="{{_repoConfig.name}}">
- </iron-input>
- </section>
- <section>
- <span class="title">Rights inherit from</span>
- <span class="value">
- <gr-autocomplete id="rightsInheritFromInput" text="{{_repoConfig.parent}}" query="[[_query]]" placeholder="Optional, defaults to 'All-Projects'">
- </gr-autocomplete>
- </span>
- </section>
- <section>
- <span class="title">Owner</span>
- <span class="value">
- <gr-autocomplete id="ownerInput" text="{{_repoOwner}}" value="{{_repoOwnerId}}" query="[[_queryGroups]]">
- </gr-autocomplete>
- </span>
- </section>
- <section>
- <span class="title">Create initial empty commit</span>
- <span class="value">
- <gr-select id="initialCommit" bind-value="{{_repoConfig.create_empty_commit}}">
- <select>
- <option value="false">False</option>
- <option value="true">True</option>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">Only serve as parent for other repositories</span>
- <span class="value">
- <gr-select id="parentRepo" bind-value="{{_repoConfig.permissions_only}}">
- <select>
- <option value="false">False</option>
- <option value="true">True</option>
- </select>
- </gr-select>
- </span>
- </section>
- </div>
+ <div class="gr-form-styles">
+ <div id="form">
+ <section>
+ <span class="title">Repository name</span>
+ <iron-input autocomplete="on" bind-value="{{_repoConfig.name}}">
+ <input
+ is="iron-input"
+ id="repoNameInput"
+ autocomplete="on"
+ bind-value="{{_repoConfig.name}}"
+ />
+ </iron-input>
+ </section>
+ <section>
+ <span class="title">Rights inherit from</span>
+ <span class="value">
+ <gr-autocomplete
+ id="rightsInheritFromInput"
+ text="{{_repoConfig.parent}}"
+ query="[[_query]]"
+ placeholder="Optional, defaults to 'All-Projects'"
+ >
+ </gr-autocomplete>
+ </span>
+ </section>
+ <section>
+ <span class="title">Owner</span>
+ <span class="value">
+ <gr-autocomplete
+ id="ownerInput"
+ text="{{_repoOwner}}"
+ value="{{_repoOwnerId}}"
+ query="[[_queryGroups]]"
+ >
+ </gr-autocomplete>
+ </span>
+ </section>
+ <section>
+ <span class="title">Create initial empty commit</span>
+ <span class="value">
+ <gr-select
+ id="initialCommit"
+ bind-value="{{_repoConfig.create_empty_commit}}"
+ >
+ <select>
+ <option value="false">False</option>
+ <option value="true">True</option>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">Only serve as parent for other repositories</span>
+ <span class="value">
+ <gr-select
+ id="parentRepo"
+ bind-value="{{_repoConfig.permissions_only}}"
+ >
+ <select>
+ <option value="false">False</option>
+ <option value="true">True</option>
+ </select>
+ </gr-select>
+ </span>
+ </section>
</div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log_html.js b/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log_html.js
index 0958e7c..130efbb 100644
--- a/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-group-audit-log/gr-group-audit-log_html.js
@@ -17,52 +17,54 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-table-styles">
- /* GenericList style centers the last column, but we don't want that here. */
- .genericList tr th:last-of-type,
- .genericList tr td:last-of-type {
- text-align: left;
- }
- </style>
- <table id="list" class="genericList">
- <tbody><tr class="headerRow">
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-table-styles">
+ /* GenericList style centers the last column, but we don't want that here. */
+ .genericList tr th:last-of-type,
+ .genericList tr td:last-of-type {
+ text-align: left;
+ }
+ </style>
+ <table id="list" class="genericList">
+ <tbody>
+ <tr class="headerRow">
<th class="date topHeader">Date</th>
<th class="type topHeader">Type</th>
<th class="member topHeader">Member</th>
<th class="by-user topHeader">By User</th>
</tr>
- <tr id="loading" class\$="loadingMsg [[computeLoadingClass(_loading)]]">
+ <tr id="loading" class$="loadingMsg [[computeLoadingClass(_loading)]]">
<td>Loading...</td>
</tr>
- </tbody><tbody class\$="[[computeLoadingClass(_loading)]]">
- <template is="dom-repeat" items="[[_auditLog]]">
- <tr class="table">
- <td class="date">
- <gr-date-formatter has-tooltip="" date-str="[[item.date]]">
- </gr-date-formatter>
- </td>
- <td class="type">[[itemType(item.type)]]</td>
- <td class="member">
- <template is="dom-if" if="[[_isGroupEvent(item.type)]]">
- <a href\$="[[_computeGroupUrl(item.member)]]">
- [[_getNameForGroup(item.member)]]
- </a>
- </template>
- <template is="dom-if" if="[[!_isGroupEvent(item.type)]]">
- <gr-account-link account="[[item.member]]"></gr-account-link>
- [[_getIdForUser(item.member)]]
- </template>
- </td>
- <td class="by-user">
- <gr-account-link account="[[item.user]]"></gr-account-link>
- [[_getIdForUser(item.user)]]
- </td>
- </tr>
- </template>
- </tbody>
- </table>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </tbody>
+ <tbody class$="[[computeLoadingClass(_loading)]]">
+ <template is="dom-repeat" items="[[_auditLog]]">
+ <tr class="table">
+ <td class="date">
+ <gr-date-formatter has-tooltip="" date-str="[[item.date]]">
+ </gr-date-formatter>
+ </td>
+ <td class="type">[[itemType(item.type)]]</td>
+ <td class="member">
+ <template is="dom-if" if="[[_isGroupEvent(item.type)]]">
+ <a href$="[[_computeGroupUrl(item.member)]]">
+ [[_getNameForGroup(item.member)]]
+ </a>
+ </template>
+ <template is="dom-if" if="[[!_isGroupEvent(item.type)]]">
+ <gr-account-link account="[[item.member]]"></gr-account-link>
+ [[_getIdForUser(item.member)]]
+ </template>
+ </td>
+ <td class="by-user">
+ <gr-account-link account="[[item.user]]"></gr-account-link>
+ [[_getIdForUser(item.user)]]
+ </td>
+ </tr>
+ </template>
+ </tbody>
+ </table>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members_html.js b/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members_html.js
index 79a88fd..c5577c2 100644
--- a/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-group-members/gr-group-members_html.js
@@ -17,130 +17,168 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-table-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-subpage-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="shared-styles">
- .input {
- width: 15em;
- }
- gr-autocomplete {
- width: 20em;
- }
- a {
- color: var(--primary-text-color);
- text-decoration: none;
- }
- a:hover {
- text-decoration: underline;
- }
- th {
- border-bottom: 1px solid var(--border-color);
- font-weight: var(--font-weight-bold);
- text-align: left;
- }
- .canModify #groupMemberSearchInput,
- .canModify #saveGroupMember,
- .canModify .deleteHeader,
- .canModify .deleteColumn,
- .canModify #includedGroupSearchInput,
- .canModify #saveIncludedGroups,
- .canModify .deleteIncludedHeader,
- .canModify #saveIncludedGroups {
- display: none;
- }
- </style>
- <main class\$="gr-form-styles [[_computeHideItemClass(_groupOwner, _isAdmin)]]">
- <div id="loading" class\$="[[_computeLoadingClass(_loading)]]">
- Loading...
- </div>
- <div id="loadedContent" class\$="[[_computeLoadingClass(_loading)]]">
- <h1 id="Title">[[_groupName]]</h1>
- <div id="form">
- <h3 id="members">Members</h3>
- <fieldset>
- <span class="value">
- <gr-autocomplete id="groupMemberSearchInput" text="{{_groupMemberSearchName}}" value="{{_groupMemberSearchId}}" query="[[_queryMembers]]" placeholder="Name Or Email">
- </gr-autocomplete>
- </span>
- <gr-button id="saveGroupMember" on-click="_handleSavingGroupMember" disabled="[[!_groupMemberSearchId]]">
- Add
- </gr-button>
- <table id="groupMembers">
- <tbody><tr class="headerRow">
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-table-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-subpage-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="shared-styles">
+ .input {
+ width: 15em;
+ }
+ gr-autocomplete {
+ width: 20em;
+ }
+ a {
+ color: var(--primary-text-color);
+ text-decoration: none;
+ }
+ a:hover {
+ text-decoration: underline;
+ }
+ th {
+ border-bottom: 1px solid var(--border-color);
+ font-weight: var(--font-weight-bold);
+ text-align: left;
+ }
+ .canModify #groupMemberSearchInput,
+ .canModify #saveGroupMember,
+ .canModify .deleteHeader,
+ .canModify .deleteColumn,
+ .canModify #includedGroupSearchInput,
+ .canModify #saveIncludedGroups,
+ .canModify .deleteIncludedHeader,
+ .canModify #saveIncludedGroups {
+ display: none;
+ }
+ </style>
+ <main
+ class$="gr-form-styles [[_computeHideItemClass(_groupOwner, _isAdmin)]]"
+ >
+ <div id="loading" class$="[[_computeLoadingClass(_loading)]]">
+ Loading...
+ </div>
+ <div id="loadedContent" class$="[[_computeLoadingClass(_loading)]]">
+ <h1 id="Title">[[_groupName]]</h1>
+ <div id="form">
+ <h3 id="members">Members</h3>
+ <fieldset>
+ <span class="value">
+ <gr-autocomplete
+ id="groupMemberSearchInput"
+ text="{{_groupMemberSearchName}}"
+ value="{{_groupMemberSearchId}}"
+ query="[[_queryMembers]]"
+ placeholder="Name Or Email"
+ >
+ </gr-autocomplete>
+ </span>
+ <gr-button
+ id="saveGroupMember"
+ on-click="_handleSavingGroupMember"
+ disabled="[[!_groupMemberSearchId]]"
+ >
+ Add
+ </gr-button>
+ <table id="groupMembers">
+ <tbody>
+ <tr class="headerRow">
<th class="nameHeader">Name</th>
<th class="emailAddressHeader">Email Address</th>
<th class="deleteHeader">Delete Member</th>
</tr>
- </tbody><tbody>
- <template is="dom-repeat" items="[[_groupMembers]]">
- <tr>
- <td class="nameColumn">
- <gr-account-link account="[[item]]"></gr-account-link>
- </td>
- <td>[[item.email]]</td>
- <td class="deleteColumn">
- <gr-button class="deleteMembersButton" on-click="_handleDeleteMember">
- Delete
- </gr-button>
- </td>
- </tr>
- </template>
- </tbody>
- </table>
- </fieldset>
- <h3 id="includedGroups">Included Groups</h3>
- <fieldset>
- <span class="value">
- <gr-autocomplete id="includedGroupSearchInput" text="{{_includedGroupSearchName}}" value="{{_includedGroupSearchId}}" query="[[_queryIncludedGroup]]" placeholder="Group Name">
- </gr-autocomplete>
- </span>
- <gr-button id="saveIncludedGroups" on-click="_handleSavingIncludedGroups" disabled="[[!_includedGroupSearchId]]">
- Add
- </gr-button>
- <table id="includedGroups">
- <tbody><tr class="headerRow">
+ </tbody>
+ <tbody>
+ <template is="dom-repeat" items="[[_groupMembers]]">
+ <tr>
+ <td class="nameColumn">
+ <gr-account-link account="[[item]]"></gr-account-link>
+ </td>
+ <td>[[item.email]]</td>
+ <td class="deleteColumn">
+ <gr-button
+ class="deleteMembersButton"
+ on-click="_handleDeleteMember"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ </template>
+ </tbody>
+ </table>
+ </fieldset>
+ <h3 id="includedGroups">Included Groups</h3>
+ <fieldset>
+ <span class="value">
+ <gr-autocomplete
+ id="includedGroupSearchInput"
+ text="{{_includedGroupSearchName}}"
+ value="{{_includedGroupSearchId}}"
+ query="[[_queryIncludedGroup]]"
+ placeholder="Group Name"
+ >
+ </gr-autocomplete>
+ </span>
+ <gr-button
+ id="saveIncludedGroups"
+ on-click="_handleSavingIncludedGroups"
+ disabled="[[!_includedGroupSearchId]]"
+ >
+ Add
+ </gr-button>
+ <table id="includedGroups">
+ <tbody>
+ <tr class="headerRow">
<th class="groupNameHeader">Group Name</th>
<th class="descriptionHeader">Description</th>
<th class="deleteIncludedHeader">
Delete Group
</th>
</tr>
- </tbody><tbody>
- <template is="dom-repeat" items="[[_includedGroups]]">
- <tr>
- <td class="nameColumn">
- <template is="dom-if" if="[[item.url]]">
- <a href\$="[[_computeGroupUrl(item.url)]]" rel="noopener">
- [[item.name]]
- </a>
- </template>
- <template is="dom-if" if="[[!item.url]]">
+ </tbody>
+ <tbody>
+ <template is="dom-repeat" items="[[_includedGroups]]">
+ <tr>
+ <td class="nameColumn">
+ <template is="dom-if" if="[[item.url]]">
+ <a href$="[[_computeGroupUrl(item.url)]]" rel="noopener">
[[item.name]]
- </template>
- </td>
- <td>[[item.description]]</td>
- <td class="deleteColumn">
- <gr-button class="deleteIncludedGroupButton" on-click="_handleDeleteIncludedGroup">
- Delete
- </gr-button>
- </td>
- </tr>
- </template>
- </tbody>
- </table>
- </fieldset>
- </div>
+ </a>
+ </template>
+ <template is="dom-if" if="[[!item.url]]">
+ [[item.name]]
+ </template>
+ </td>
+ <td>[[item.description]]</td>
+ <td class="deleteColumn">
+ <gr-button
+ class="deleteIncludedGroupButton"
+ on-click="_handleDeleteIncludedGroup"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ </template>
+ </tbody>
+ </table>
+ </fieldset>
</div>
- </main>
- <gr-overlay id="overlay" with-backdrop="">
- <gr-confirm-delete-item-dialog class="confirmDialog" on-confirm="_handleDeleteConfirm" on-cancel="_handleConfirmDialogCancel" item="[[_itemName]]" item-type="[[_itemType]]"></gr-confirm-delete-item-dialog>
- </gr-overlay>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </div>
+ </main>
+ <gr-overlay id="overlay" with-backdrop="">
+ <gr-confirm-delete-item-dialog
+ class="confirmDialog"
+ on-confirm="_handleDeleteConfirm"
+ on-cancel="_handleConfirmDialogCancel"
+ item="[[_itemName]]"
+ item-type="[[_itemType]]"
+ ></gr-confirm-delete-item-dialog>
+ </gr-overlay>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-group/gr-group_html.js b/polygerrit-ui/app/elements/admin/gr-group/gr-group_html.js
index 37f964e..0097d6d 100644
--- a/polygerrit-ui/app/elements/admin/gr-group/gr-group_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-group/gr-group_html.js
@@ -17,99 +17,144 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-subpage-styles">
- h3.edited:after {
- color: var(--deemphasized-text-color);
- content: ' *';
- }
- .inputUpdateBtn {
- margin-top: var(--spacing-s);
- }
- </style>
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <main class="gr-form-styles read-only">
- <div id="loading" class\$="[[_computeLoadingClass(_loading)]]">
- Loading...
- </div>
- <div id="loadedContent" class\$="[[_computeLoadingClass(_loading)]]">
- <h1 id="Title">[[_groupName]]</h1>
- <h2 id="configurations">General</h2>
- <div id="form">
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-subpage-styles">
+ h3.edited:after {
+ color: var(--deemphasized-text-color);
+ content: ' *';
+ }
+ .inputUpdateBtn {
+ margin-top: var(--spacing-s);
+ }
+ </style>
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <main class="gr-form-styles read-only">
+ <div id="loading" class$="[[_computeLoadingClass(_loading)]]">
+ Loading...
+ </div>
+ <div id="loadedContent" class$="[[_computeLoadingClass(_loading)]]">
+ <h1 id="Title">[[_groupName]]</h1>
+ <h2 id="configurations">General</h2>
+ <div id="form">
+ <fieldset>
+ <h3 id="groupUUID">Group UUID</h3>
<fieldset>
- <h3 id="groupUUID">Group UUID</h3>
- <fieldset>
- <gr-copy-clipboard text="[[groupId]]"></gr-copy-clipboard>
- </fieldset>
- <h3 id="groupName" class\$="[[_computeHeaderClass(_rename)]]">
- Group Name
- </h3>
- <fieldset>
- <span class="value">
- <gr-autocomplete id="groupNameInput" text="{{_groupConfig.name}}" disabled="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]"></gr-autocomplete>
- </span>
- <span class="value" disabled\$="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]">
- <gr-button id="inputUpdateNameBtn" on-click="_handleSaveName" disabled="[[!_rename]]">
- Rename Group</gr-button>
- </span>
- </fieldset>
- <h3 id="groupOwner" class\$="[[_computeHeaderClass(_owner)]]">
- Owners
- </h3>
- <fieldset>
- <span class="value">
- <gr-autocomplete id="groupOwnerInput" text="{{_groupConfig.owner}}" value="{{_groupConfigOwner}}" query="[[_query]]" disabled="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]">
- </gr-autocomplete>
- </span>
- <span class="value" disabled\$="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]">
- <gr-button id="inputUpdateOwnerBtn" on-click="_handleSaveOwner" disabled="[[!_owner]]">
- Change Owners</gr-button>
- </span>
- </fieldset>
- <h3 class\$="[[_computeHeaderClass(_description)]]">
- Description
- </h3>
- <fieldset>
- <div>
- <iron-autogrow-textarea class="description" autocomplete="on" bind-value="{{_groupConfig.description}}" disabled="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]"></iron-autogrow-textarea>
- </div>
- <span class="value" disabled\$="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]">
- <gr-button on-click="_handleSaveDescription" disabled="[[!_description]]">
- Save Description
- </gr-button>
- </span>
- </fieldset>
- <h3 id="options" class\$="[[_computeHeaderClass(_options)]]">
- Group Options
- </h3>
- <fieldset id="visableToAll">
- <section>
- <span class="title">
- Make group visible to all registered users
- </span>
- <span class="value">
- <gr-select id="visibleToAll" bind-value="{{_groupConfig.options.visible_to_all}}">
- <select disabled\$="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]">
- <template is="dom-repeat" items="[[_submitTypes]]">
- <option value="[[item.value]]">[[item.label]]</option>
- </template>
- </select>
- </gr-select>
- </span>
- </section>
- <span class="value" disabled\$="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]">
- <gr-button on-click="_handleSaveOptions" disabled="[[!_options]]">
- Save Group Options
- </gr-button>
- </span>
- </fieldset>
+ <gr-copy-clipboard text="[[groupId]]"></gr-copy-clipboard>
</fieldset>
- </div>
+ <h3 id="groupName" class$="[[_computeHeaderClass(_rename)]]">
+ Group Name
+ </h3>
+ <fieldset>
+ <span class="value">
+ <gr-autocomplete
+ id="groupNameInput"
+ text="{{_groupConfig.name}}"
+ disabled="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]"
+ ></gr-autocomplete>
+ </span>
+ <span
+ class="value"
+ disabled$="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]"
+ >
+ <gr-button
+ id="inputUpdateNameBtn"
+ on-click="_handleSaveName"
+ disabled="[[!_rename]]"
+ >
+ Rename Group</gr-button
+ >
+ </span>
+ </fieldset>
+ <h3 id="groupOwner" class$="[[_computeHeaderClass(_owner)]]">
+ Owners
+ </h3>
+ <fieldset>
+ <span class="value">
+ <gr-autocomplete
+ id="groupOwnerInput"
+ text="{{_groupConfig.owner}}"
+ value="{{_groupConfigOwner}}"
+ query="[[_query]]"
+ disabled="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]"
+ >
+ </gr-autocomplete>
+ </span>
+ <span
+ class="value"
+ disabled$="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]"
+ >
+ <gr-button
+ id="inputUpdateOwnerBtn"
+ on-click="_handleSaveOwner"
+ disabled="[[!_owner]]"
+ >
+ Change Owners</gr-button
+ >
+ </span>
+ </fieldset>
+ <h3 class$="[[_computeHeaderClass(_description)]]">
+ Description
+ </h3>
+ <fieldset>
+ <div>
+ <iron-autogrow-textarea
+ class="description"
+ autocomplete="on"
+ bind-value="{{_groupConfig.description}}"
+ disabled="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]"
+ ></iron-autogrow-textarea>
+ </div>
+ <span
+ class="value"
+ disabled$="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]"
+ >
+ <gr-button
+ on-click="_handleSaveDescription"
+ disabled="[[!_description]]"
+ >
+ Save Description
+ </gr-button>
+ </span>
+ </fieldset>
+ <h3 id="options" class$="[[_computeHeaderClass(_options)]]">
+ Group Options
+ </h3>
+ <fieldset id="visableToAll">
+ <section>
+ <span class="title">
+ Make group visible to all registered users
+ </span>
+ <span class="value">
+ <gr-select
+ id="visibleToAll"
+ bind-value="{{_groupConfig.options.visible_to_all}}"
+ >
+ <select
+ disabled$="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]"
+ >
+ <template is="dom-repeat" items="[[_submitTypes]]">
+ <option value="[[item.value]]">[[item.label]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <span
+ class="value"
+ disabled$="[[_computeGroupDisabled(_groupOwner, _isAdmin, _groupIsInternal)]]"
+ >
+ <gr-button on-click="_handleSaveOptions" disabled="[[!_options]]">
+ Save Group Options
+ </gr-button>
+ </span>
+ </fieldset>
+ </fieldset>
</div>
- </main>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </div>
+ </main>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-permission/gr-permission_html.js b/polygerrit-ui/app/elements/admin/gr-permission/gr-permission_html.js
index 1b57336..ef4f1da 100644
--- a/polygerrit-ui/app/elements/admin/gr-permission/gr-permission_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-permission/gr-permission_html.js
@@ -17,91 +17,127 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- margin-bottom: var(--spacing-m);
- }
- .header {
- align-items: baseline;
- display: flex;
- justify-content: space-between;
- margin: var(--spacing-s) var(--spacing-m);
- }
- .rules {
- background: var(--table-header-background-color);
- border: 1px solid var(--border-color);
- border-bottom: 0;
- }
- .editing .rules {
- border-bottom: 1px solid var(--border-color);
- }
- .title {
- margin-bottom: var(--spacing-s);
- }
- #addRule,
- #removeBtn {
- display: none;
- }
- .right {
- display: flex;
- align-items: center;
- }
- .editing #removeBtn {
- display: block;
- margin-left: var(--spacing-xl);
- }
- .editing #addRule {
- display: block;
- padding: var(--spacing-m);
- }
- #deletedContainer,
- .deleted #mainContainer {
- display: none;
- }
- .deleted #deletedContainer {
- align-items: baseline;
- border: 1px solid var(--border-color);
- display: flex;
- justify-content: space-between;
- padding: var(--spacing-m);
- }
- #mainContainer {
- display: block;
- }
- </style>
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-menu-page-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <section id="permission" class\$="gr-form-styles [[_computeSectionClass(editing, _deleted)]]">
- <div id="mainContainer">
- <div class="header">
- <span class="title">[[name]]</span>
- <div class="right">
- <template is="dom-if" if="[[!_permissionIsOwnerOrGlobal(permission.id, section)]]">
- <paper-toggle-button id="exclusiveToggle" checked="{{permission.value.exclusive}}" on-change="_handleValueChange" disabled\$="[[!editing]]"></paper-toggle-button>Exclusive
- </template>
- <gr-button link="" id="removeBtn" on-click="_handleRemovePermission">Remove</gr-button>
- </div>
- </div><!-- end header -->
- <div class="rules">
- <template is="dom-repeat" items="{{_rules}}" as="rule">
- <gr-rule-editor has-range="[[_computeHasRange(name)]]" label="[[_label]]" editing="[[editing]]" group-id="[[rule.id]]" group-name="[[_computeGroupName(groups, rule.id)]]" permission="[[permission.id]]" rule="{{rule}}" section="[[section]]" on-added-rule-removed="_handleAddedRuleRemoved"></gr-rule-editor>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ margin-bottom: var(--spacing-m);
+ }
+ .header {
+ align-items: baseline;
+ display: flex;
+ justify-content: space-between;
+ margin: var(--spacing-s) var(--spacing-m);
+ }
+ .rules {
+ background: var(--table-header-background-color);
+ border: 1px solid var(--border-color);
+ border-bottom: 0;
+ }
+ .editing .rules {
+ border-bottom: 1px solid var(--border-color);
+ }
+ .title {
+ margin-bottom: var(--spacing-s);
+ }
+ #addRule,
+ #removeBtn {
+ display: none;
+ }
+ .right {
+ display: flex;
+ align-items: center;
+ }
+ .editing #removeBtn {
+ display: block;
+ margin-left: var(--spacing-xl);
+ }
+ .editing #addRule {
+ display: block;
+ padding: var(--spacing-m);
+ }
+ #deletedContainer,
+ .deleted #mainContainer {
+ display: none;
+ }
+ .deleted #deletedContainer {
+ align-items: baseline;
+ border: 1px solid var(--border-color);
+ display: flex;
+ justify-content: space-between;
+ padding: var(--spacing-m);
+ }
+ #mainContainer {
+ display: block;
+ }
+ </style>
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-menu-page-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <section
+ id="permission"
+ class$="gr-form-styles [[_computeSectionClass(editing, _deleted)]]"
+ >
+ <div id="mainContainer">
+ <div class="header">
+ <span class="title">[[name]]</span>
+ <div class="right">
+ <template
+ is="dom-if"
+ if="[[!_permissionIsOwnerOrGlobal(permission.id, section)]]"
+ >
+ <paper-toggle-button
+ id="exclusiveToggle"
+ checked="{{permission.value.exclusive}}"
+ on-change="_handleValueChange"
+ disabled$="[[!editing]]"
+ ></paper-toggle-button
+ >Exclusive
</template>
- <div id="addRule">
- <gr-autocomplete id="groupAutocomplete" text="{{_groupFilter}}" query="[[_query]]" placeholder="Add group" on-commit="_handleAddRuleItem">
- </gr-autocomplete>
- </div>
- <!-- end addRule -->
- </div> <!-- end rules -->
- </div><!-- end mainContainer -->
- <div id="deletedContainer">
- <span>[[name]] was deleted</span>
- <gr-button link="" id="undoRemoveBtn" on-click="_handleUndoRemove">Undo</gr-button>
- </div><!-- end deletedContainer -->
- </section>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-button link="" id="removeBtn" on-click="_handleRemovePermission"
+ >Remove</gr-button
+ >
+ </div>
+ </div>
+ <!-- end header -->
+ <div class="rules">
+ <template is="dom-repeat" items="{{_rules}}" as="rule">
+ <gr-rule-editor
+ has-range="[[_computeHasRange(name)]]"
+ label="[[_label]]"
+ editing="[[editing]]"
+ group-id="[[rule.id]]"
+ group-name="[[_computeGroupName(groups, rule.id)]]"
+ permission="[[permission.id]]"
+ rule="{{rule}}"
+ section="[[section]]"
+ on-added-rule-removed="_handleAddedRuleRemoved"
+ ></gr-rule-editor>
+ </template>
+ <div id="addRule">
+ <gr-autocomplete
+ id="groupAutocomplete"
+ text="{{_groupFilter}}"
+ query="[[_query]]"
+ placeholder="Add group"
+ on-commit="_handleAddRuleItem"
+ >
+ </gr-autocomplete>
+ </div>
+ <!-- end addRule -->
+ </div>
+ <!-- end rules -->
+ </div>
+ <!-- end mainContainer -->
+ <div id="deletedContainer">
+ <span>[[name]] was deleted</span>
+ <gr-button link="" id="undoRemoveBtn" on-click="_handleUndoRemove"
+ >Undo</gr-button
+ >
+ </div>
+ <!-- end deletedContainer -->
+ </section>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-plugin-config-array-editor/gr-plugin-config-array-editor_html.js b/polygerrit-ui/app/elements/admin/gr-plugin-config-array-editor/gr-plugin-config-array-editor_html.js
index d97e2b37..be35035 100644
--- a/polygerrit-ui/app/elements/admin/gr-plugin-config-array-editor/gr-plugin-config-array-editor_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-plugin-config-array-editor/gr-plugin-config-array-editor_html.js
@@ -17,66 +17,83 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- .wrapper {
- width: 30em;
- }
- .existingItems {
- background: var(--table-header-background-color);
- border: 1px solid var(--border-color);
- border-radius: var(--border-radius);
- }
- gr-button {
- float: right;
- margin-left: var(--spacing-m);
- width: 4.5em;
- }
- .row {
- align-items: center;
- display: flex;
- justify-content: space-between;
- padding: var(--spacing-m) 0;
- width: 100%;
- }
- .existingItems .row {
- padding: var(--spacing-m);
- }
- .existingItems .row:not(:first-of-type) {
- border-top: 1px solid var(--border-color);
- }
- input {
- flex-grow: 1;
- }
- .hide {
- display: none;
- }
- .placeholder {
- color: var(--deemphasized-text-color);
- padding-top: var(--spacing-m);
- }
- </style>
- <div class="wrapper gr-form-styles">
- <template is="dom-if" if="[[pluginOption.info.values.length]]">
- <div class="existingItems">
- <template is="dom-repeat" items="[[pluginOption.info.values]]">
- <div class="row">
- <span>[[item]]</span>
- <gr-button link="" disabled\$="[[disabled]]" data-item\$="[[item]]" on-click="_handleDelete">Delete</gr-button>
- </div>
- </template>
- </div>
- </template>
- <template is="dom-if" if="[[!pluginOption.info.values.length]]">
- <div class="row placeholder">None configured.</div>
- </template>
- <div class\$="row [[_computeShowInputRow(disabled)]]">
- <iron-input on-keydown="_handleInputKeydown" bind-value="{{_newValue}}">
- <input is="iron-input" id="input" on-keydown="_handleInputKeydown" bind-value="{{_newValue}}">
- </iron-input>
- <gr-button id="addButton" disabled\$="[[!_newValue.length]]" link="" on-click="_handleAddTap">Add</gr-button>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ .wrapper {
+ width: 30em;
+ }
+ .existingItems {
+ background: var(--table-header-background-color);
+ border: 1px solid var(--border-color);
+ border-radius: var(--border-radius);
+ }
+ gr-button {
+ float: right;
+ margin-left: var(--spacing-m);
+ width: 4.5em;
+ }
+ .row {
+ align-items: center;
+ display: flex;
+ justify-content: space-between;
+ padding: var(--spacing-m) 0;
+ width: 100%;
+ }
+ .existingItems .row {
+ padding: var(--spacing-m);
+ }
+ .existingItems .row:not(:first-of-type) {
+ border-top: 1px solid var(--border-color);
+ }
+ input {
+ flex-grow: 1;
+ }
+ .hide {
+ display: none;
+ }
+ .placeholder {
+ color: var(--deemphasized-text-color);
+ padding-top: var(--spacing-m);
+ }
+ </style>
+ <div class="wrapper gr-form-styles">
+ <template is="dom-if" if="[[pluginOption.info.values.length]]">
+ <div class="existingItems">
+ <template is="dom-repeat" items="[[pluginOption.info.values]]">
+ <div class="row">
+ <span>[[item]]</span>
+ <gr-button
+ link=""
+ disabled$="[[disabled]]"
+ data-item$="[[item]]"
+ on-click="_handleDelete"
+ >Delete</gr-button
+ >
+ </div>
+ </template>
</div>
+ </template>
+ <template is="dom-if" if="[[!pluginOption.info.values.length]]">
+ <div class="row placeholder">None configured.</div>
+ </template>
+ <div class$="row [[_computeShowInputRow(disabled)]]">
+ <iron-input on-keydown="_handleInputKeydown" bind-value="{{_newValue}}">
+ <input
+ is="iron-input"
+ id="input"
+ on-keydown="_handleInputKeydown"
+ bind-value="{{_newValue}}"
+ />
+ </iron-input>
+ <gr-button
+ id="addButton"
+ disabled$="[[!_newValue.length]]"
+ link=""
+ on-click="_handleAddTap"
+ >Add</gr-button
+ >
</div>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list_html.js b/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list_html.js
index 90192c4..042364f 100644
--- a/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-plugin-list/gr-plugin-list_html.js
@@ -17,39 +17,48 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-table-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <gr-list-view filter="[[_filter]]" items-per-page="[[_pluginsPerPage]]" items="[[_plugins]]" loading="[[_loading]]" offset="[[_offset]]" path="[[_path]]">
- <table id="list" class="genericList">
- <tbody><tr class="headerRow">
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-table-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <gr-list-view
+ filter="[[_filter]]"
+ items-per-page="[[_pluginsPerPage]]"
+ items="[[_plugins]]"
+ loading="[[_loading]]"
+ offset="[[_offset]]"
+ path="[[_path]]"
+ >
+ <table id="list" class="genericList">
+ <tbody>
+ <tr class="headerRow">
<th class="name topHeader">Plugin Name</th>
<th class="version topHeader">Version</th>
<th class="status topHeader">Status</th>
</tr>
- <tr id="loading" class\$="loadingMsg [[computeLoadingClass(_loading)]]">
+ <tr id="loading" class$="loadingMsg [[computeLoadingClass(_loading)]]">
<td>Loading...</td>
</tr>
- </tbody><tbody class\$="[[computeLoadingClass(_loading)]]">
- <template is="dom-repeat" items="[[_shownPlugins]]">
- <tr class="table">
- <td class="name">
- <template is="dom-if" if="[[item.index_url]]">
- <a href\$="[[_computePluginUrl(item.index_url)]]">[[item.id]]</a>
- </template>
- <template is="dom-if" if="[[!item.index_url]]">
- [[item.id]]
- </template>
- </td>
- <td class="version">[[item.version]]</td>
- <td class="status">[[_status(item)]]</td>
- </tr>
- </template>
- </tbody>
- </table>
- </gr-list-view>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </tbody>
+ <tbody class$="[[computeLoadingClass(_loading)]]">
+ <template is="dom-repeat" items="[[_shownPlugins]]">
+ <tr class="table">
+ <td class="name">
+ <template is="dom-if" if="[[item.index_url]]">
+ <a href$="[[_computePluginUrl(item.index_url)]]">[[item.id]]</a>
+ </template>
+ <template is="dom-if" if="[[!item.index_url]]">
+ [[item.id]]
+ </template>
+ </td>
+ <td class="version">[[item.version]]</td>
+ <td class="status">[[_status(item)]]</td>
+ </tr>
+ </template>
+ </tbody>
+ </table>
+ </gr-list-view>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_html.js b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_html.js
index 9a27371..5f0739a 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo-access/gr-repo-access_html.js
@@ -17,75 +17,123 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-subpage-styles">
- gr-button,
- #inheritsFrom,
- #editInheritFromInput,
- .editing #inheritFromName,
- .weblinks,
- .editing .invisible{
- display: none;
- }
- #inheritsFrom.show {
- display: flex;
- min-height: 2em;
- align-items: center;
- }
- .weblink {
- margin-right: var(--spacing-xs);
- }
- .weblinks.show,
- .referenceContainer {
- display: block;
- }
- .rightsText {
- margin-right: var(--spacing-s);
- }
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-subpage-styles">
+ gr-button,
+ #inheritsFrom,
+ #editInheritFromInput,
+ .editing #inheritFromName,
+ .weblinks,
+ .editing .invisible {
+ display: none;
+ }
+ #inheritsFrom.show {
+ display: flex;
+ min-height: 2em;
+ align-items: center;
+ }
+ .weblink {
+ margin-right: var(--spacing-xs);
+ }
+ .weblinks.show,
+ .referenceContainer {
+ display: block;
+ }
+ .rightsText {
+ margin-right: var(--spacing-s);
+ }
- .editing gr-button,
- .admin #editBtn {
- display: inline-block;
- margin: var(--spacing-l) 0;
- }
- .editing #editInheritFromInput {
- display: inline-block;
- }
- </style>
- <style include="gr-menu-page-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <main class\$="[[_computeMainClass(_ownerOf, _canUpload, _editing)]]">
- <div id="loading" class\$="[[_computeLoadingClass(_loading)]]">
- Loading...
- </div>
- <div id="loadedContent" class\$="[[_computeLoadingClass(_loading)]]">
- <h3 id="inheritsFrom" class\$="[[_computeShowInherit(_inheritsFrom)]]">
- <span class="rightsText">Rights Inherit From</span>
- <a href\$="[[_computeParentHref(_inheritsFrom.name)]]" rel="noopener" id="inheritFromName">
- [[_inheritsFrom.name]]</a>
- <gr-autocomplete id="editInheritFromInput" text="{{_inheritFromFilter}}" query="[[_query]]" on-commit="_handleUpdateInheritFrom"></gr-autocomplete>
- </h3>
- <div class\$="weblinks [[_computeWebLinkClass(_weblinks)]]">
- History:
- <template is="dom-repeat" items="[[_weblinks]]" as="link">
- <a href="[[link.url]]" class="weblink" rel="noopener" target="[[link.target]]">
- [[link.name]]
- </a>
- </template>
- </div>
- <gr-button id="editBtn" on-click="_handleEdit">[[_editOrCancel(_editing)]]</gr-button>
- <gr-button id="saveBtn" primary="" class\$="[[_computeSaveBtnClass(_ownerOf)]]" on-click="_handleSave" disabled="[[!_modified]]">Save</gr-button>
- <gr-button id="saveReviewBtn" primary="" class\$="[[_computeSaveReviewBtnClass(_canUpload)]]" on-click="_handleSaveForReview" disabled="[[!_modified]]">Save for review</gr-button>
- <template is="dom-repeat" items="{{_sections}}" initial-count="5" target-framerate="60" as="section">
- <gr-access-section capabilities="[[_capabilities]]" section="{{section}}" labels="[[_labels]]" can-upload="[[_canUpload]]" editing="[[_editing]]" owner-of="[[_ownerOf]]" groups="[[_groups]]" on-added-section-removed="_handleAddedSectionRemoved"></gr-access-section>
+ .editing gr-button,
+ .admin #editBtn {
+ display: inline-block;
+ margin: var(--spacing-l) 0;
+ }
+ .editing #editInheritFromInput {
+ display: inline-block;
+ }
+ </style>
+ <style include="gr-menu-page-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <main class$="[[_computeMainClass(_ownerOf, _canUpload, _editing)]]">
+ <div id="loading" class$="[[_computeLoadingClass(_loading)]]">
+ Loading...
+ </div>
+ <div id="loadedContent" class$="[[_computeLoadingClass(_loading)]]">
+ <h3 id="inheritsFrom" class$="[[_computeShowInherit(_inheritsFrom)]]">
+ <span class="rightsText">Rights Inherit From</span>
+ <a
+ href$="[[_computeParentHref(_inheritsFrom.name)]]"
+ rel="noopener"
+ id="inheritFromName"
+ >
+ [[_inheritsFrom.name]]</a
+ >
+ <gr-autocomplete
+ id="editInheritFromInput"
+ text="{{_inheritFromFilter}}"
+ query="[[_query]]"
+ on-commit="_handleUpdateInheritFrom"
+ ></gr-autocomplete>
+ </h3>
+ <div class$="weblinks [[_computeWebLinkClass(_weblinks)]]">
+ History:
+ <template is="dom-repeat" items="[[_weblinks]]" as="link">
+ <a
+ href="[[link.url]]"
+ class="weblink"
+ rel="noopener"
+ target="[[link.target]]"
+ >
+ [[link.name]]
+ </a>
</template>
- <div class="referenceContainer">
- <gr-button id="addReferenceBtn" on-click="_handleCreateSection">Add Reference</gr-button>
- </div>
</div>
- </main>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-button id="editBtn" on-click="_handleEdit"
+ >[[_editOrCancel(_editing)]]</gr-button
+ >
+ <gr-button
+ id="saveBtn"
+ primary=""
+ class$="[[_computeSaveBtnClass(_ownerOf)]]"
+ on-click="_handleSave"
+ disabled="[[!_modified]]"
+ >Save</gr-button
+ >
+ <gr-button
+ id="saveReviewBtn"
+ primary=""
+ class$="[[_computeSaveReviewBtnClass(_canUpload)]]"
+ on-click="_handleSaveForReview"
+ disabled="[[!_modified]]"
+ >Save for review</gr-button
+ >
+ <template
+ is="dom-repeat"
+ items="{{_sections}}"
+ initial-count="5"
+ target-framerate="60"
+ as="section"
+ >
+ <gr-access-section
+ capabilities="[[_capabilities]]"
+ section="{{section}}"
+ labels="[[_labels]]"
+ can-upload="[[_canUpload]]"
+ editing="[[_editing]]"
+ owner-of="[[_ownerOf]]"
+ groups="[[_groups]]"
+ on-added-section-removed="_handleAddedSectionRemoved"
+ ></gr-access-section>
+ </template>
+ <div class="referenceContainer">
+ <gr-button id="addReferenceBtn" on-click="_handleCreateSection"
+ >Add Reference</gr-button
+ >
+ </div>
+ </div>
+ </main>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-command/gr-repo-command_html.js b/polygerrit-ui/app/elements/admin/gr-repo-command/gr-repo-command_html.js
index 10d22fc..cf934b0 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-command/gr-repo-command_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo-command/gr-repo-command_html.js
@@ -17,14 +17,18 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- margin-bottom: var(--spacing-xxl);
- }
- </style>
- <h3>[[title]]</h3>
- <gr-button title\$="[[tooltip]]" disabled\$="[[disabled]]" on-click="_onCommandTap">
- [[title]]
- </gr-button>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ margin-bottom: var(--spacing-xxl);
+ }
+ </style>
+ <h3>[[title]]</h3>
+ <gr-button
+ title$="[[tooltip]]"
+ disabled$="[[disabled]]"
+ on-click="_onCommandTap"
+ >
+ [[title]]
+ </gr-button>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands_html.js b/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands_html.js
index ce19555..b27c36b 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo-commands/gr-repo-commands_html.js
@@ -17,45 +17,69 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-subpage-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <main class="gr-form-styles read-only">
- <h1 id="Title">Repository Commands</h1>
- <div id="loading" class\$="[[_computeLoadingClass(_loading)]]">Loading...</div>
- <div id="loadedContent" class\$="[[_computeLoadingClass(_loading)]]">
- <h2 id="options">Command</h2>
- <div id="form">
- <gr-repo-command title="Create change" on-command-tap="_createNewChange">
- </gr-repo-command>
- <gr-repo-command id="editRepoConfig" title="Edit repo config" on-command-tap="_handleEditRepoConfig">
- </gr-repo-command>
- <gr-repo-command title="[[_repoConfig.actions.gc.label]]" tooltip="[[_repoConfig.actions.gc.title]]" hidden\$="[[!_repoConfig.actions.gc.enabled]]" on-command-tap="_handleRunningGC">
- </gr-repo-command>
- <gr-endpoint-decorator name="repo-command">
- <gr-endpoint-param name="config" value="[[_repoConfig]]">
- </gr-endpoint-param>
- <gr-endpoint-param name="repoName" value="[[repo]]">
- </gr-endpoint-param>
- </gr-endpoint-decorator>
- </div>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-subpage-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <main class="gr-form-styles read-only">
+ <h1 id="Title">Repository Commands</h1>
+ <div id="loading" class$="[[_computeLoadingClass(_loading)]]">
+ Loading...
+ </div>
+ <div id="loadedContent" class$="[[_computeLoadingClass(_loading)]]">
+ <h2 id="options">Command</h2>
+ <div id="form">
+ <gr-repo-command
+ title="Create change"
+ on-command-tap="_createNewChange"
+ >
+ </gr-repo-command>
+ <gr-repo-command
+ id="editRepoConfig"
+ title="Edit repo config"
+ on-command-tap="_handleEditRepoConfig"
+ >
+ </gr-repo-command>
+ <gr-repo-command
+ title="[[_repoConfig.actions.gc.label]]"
+ tooltip="[[_repoConfig.actions.gc.title]]"
+ hidden$="[[!_repoConfig.actions.gc.enabled]]"
+ on-command-tap="_handleRunningGC"
+ >
+ </gr-repo-command>
+ <gr-endpoint-decorator name="repo-command">
+ <gr-endpoint-param name="config" value="[[_repoConfig]]">
+ </gr-endpoint-param>
+ <gr-endpoint-param name="repoName" value="[[repo]]">
+ </gr-endpoint-param>
+ </gr-endpoint-decorator>
</div>
- </main>
- <gr-overlay id="createChangeOverlay" with-backdrop="">
- <gr-dialog id="createChangeDialog" confirm-label="Create" disabled="[[!_canCreate]]" on-confirm="_handleCreateChange" on-cancel="_handleCloseCreateChange">
- <div class="header" slot="header">
- Create Change
- </div>
- <div class="main" slot="main">
- <gr-create-change-dialog id="createNewChangeModal" can-create="{{_canCreate}}" repo-name="[[repo]]"></gr-create-change-dialog>
- </div>
- </gr-dialog>
- </gr-overlay>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </div>
+ </main>
+ <gr-overlay id="createChangeOverlay" with-backdrop="">
+ <gr-dialog
+ id="createChangeDialog"
+ confirm-label="Create"
+ disabled="[[!_canCreate]]"
+ on-confirm="_handleCreateChange"
+ on-cancel="_handleCloseCreateChange"
+ >
+ <div class="header" slot="header">
+ Create Change
+ </div>
+ <div class="main" slot="main">
+ <gr-create-change-dialog
+ id="createNewChangeModal"
+ can-create="{{_canCreate}}"
+ repo-name="[[repo]]"
+ ></gr-create-change-dialog>
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards_html.js b/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards_html.js
index 3bac16c..8ce69df 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo-dashboards/gr-repo-dashboards_html.js
@@ -17,24 +17,25 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- margin-bottom: var(--spacing-xxl);
- }
- .loading #dashboards,
- #loadingContainer {
- display: none;
- }
- .loading #loadingContainer {
- display: block;
- }
- </style>
- <style include="gr-table-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <table id="list" class\$="genericList [[_computeLoadingClass(_loading)]]">
- <tbody><tr class="headerRow">
+ <style include="shared-styles">
+ :host {
+ display: block;
+ margin-bottom: var(--spacing-xxl);
+ }
+ .loading #dashboards,
+ #loadingContainer {
+ display: none;
+ }
+ .loading #loadingContainer {
+ display: block;
+ }
+ </style>
+ <style include="gr-table-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <table id="list" class$="genericList [[_computeLoadingClass(_loading)]]">
+ <tbody>
+ <tr class="headerRow">
<th class="topHeader">Dashboard name</th>
<th class="topHeader">Dashboard title</th>
<th class="topHeader">Dashboard description</th>
@@ -44,22 +45,27 @@
<tr id="loadingContainer">
<td>Loading...</td>
</tr>
- </tbody><tbody id="dashboards">
- <template is="dom-repeat" items="[[_dashboards]]">
- <tr class="groupHeader">
- <td colspan="5">[[item.section]]</td>
+ </tbody>
+ <tbody id="dashboards">
+ <template is="dom-repeat" items="[[_dashboards]]">
+ <tr class="groupHeader">
+ <td colspan="5">[[item.section]]</td>
+ </tr>
+ <template is="dom-repeat" items="[[item.dashboards]]">
+ <tr class="table">
+ <td class="name">
+ <a href$="[[_getUrl(item.project, item.id)]]">[[item.path]]</a>
+ </td>
+ <td class="title">[[item.title]]</td>
+ <td class="desc">[[item.description]]</td>
+ <td class="inherited">
+ [[_computeInheritedFrom(item.project, item.defining_project)]]
+ </td>
+ <td class="default">[[_computeIsDefault(item.is_default)]]</td>
</tr>
- <template is="dom-repeat" items="[[item.dashboards]]">
- <tr class="table">
- <td class="name"><a href\$="[[_getUrl(item.project, item.id)]]">[[item.path]]</a></td>
- <td class="title">[[item.title]]</td>
- <td class="desc">[[item.description]]</td>
- <td class="inherited">[[_computeInheritedFrom(item.project, item.defining_project)]]</td>
- <td class="default">[[_computeIsDefault(item.is_default)]]</td>
- </tr>
- </template>
</template>
- </tbody>
- </table>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </template>
+ </tbody>
+ </table>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_html.js b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_html.js
index 0d232f2..21971e7 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo-detail-list/gr-repo-detail-list_html.js
@@ -17,141 +17,206 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-table-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="shared-styles">
- .tags td.name {
- min-width: 25em;
- }
- td.name,
- td.revision,
- td.message {
- word-break: break-word;
- }
- td.revision.tags {
- width: 27em;
- }
- td.message,
- td.tagger {
- max-width: 15em;
- }
- .editing .editItem {
- display: inherit;
- }
- .editItem,
- .editing .editBtn,
- .canEdit .revisionNoEditing,
- .editing .revisionWithEditing,
- .revisionEdit,
- .hideItem {
- display: none;
- }
- .revisionEdit gr-button {
- margin-left: var(--spacing-m);
- }
- .editBtn {
- margin-left: var(--spacing-l);
- }
- .canEdit .revisionEdit{
- align-items: center;
- display: flex;
- }
- .deleteButton:not(.show) {
- display: none;
- }
- .tagger.hide {
- display: none;
- }
- </style>
- <style include="gr-table-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <gr-list-view create-new="[[_loggedIn]]" filter="[[_filter]]" items-per-page="[[_itemsPerPage]]" items="[[_items]]" loading="[[_loading]]" offset="[[_offset]]" on-create-clicked="_handleCreateClicked" path="[[_getPath(_repo, detailType)]]">
- <table id="list" class="genericList gr-form-styles">
- <tbody><tr class="headerRow">
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-table-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="shared-styles">
+ .tags td.name {
+ min-width: 25em;
+ }
+ td.name,
+ td.revision,
+ td.message {
+ word-break: break-word;
+ }
+ td.revision.tags {
+ width: 27em;
+ }
+ td.message,
+ td.tagger {
+ max-width: 15em;
+ }
+ .editing .editItem {
+ display: inherit;
+ }
+ .editItem,
+ .editing .editBtn,
+ .canEdit .revisionNoEditing,
+ .editing .revisionWithEditing,
+ .revisionEdit,
+ .hideItem {
+ display: none;
+ }
+ .revisionEdit gr-button {
+ margin-left: var(--spacing-m);
+ }
+ .editBtn {
+ margin-left: var(--spacing-l);
+ }
+ .canEdit .revisionEdit {
+ align-items: center;
+ display: flex;
+ }
+ .deleteButton:not(.show) {
+ display: none;
+ }
+ .tagger.hide {
+ display: none;
+ }
+ </style>
+ <style include="gr-table-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <gr-list-view
+ create-new="[[_loggedIn]]"
+ filter="[[_filter]]"
+ items-per-page="[[_itemsPerPage]]"
+ items="[[_items]]"
+ loading="[[_loading]]"
+ offset="[[_offset]]"
+ on-create-clicked="_handleCreateClicked"
+ path="[[_getPath(_repo, detailType)]]"
+ >
+ <table id="list" class="genericList gr-form-styles">
+ <tbody>
+ <tr class="headerRow">
<th class="name topHeader">Name</th>
<th class="revision topHeader">Revision</th>
- <th class\$="message topHeader [[_hideIfBranch(detailType)]]">
- Message</th>
- <th class\$="tagger topHeader [[_hideIfBranch(detailType)]]">
- Tagger</th>
+ <th class$="message topHeader [[_hideIfBranch(detailType)]]">
+ Message
+ </th>
+ <th class$="tagger topHeader [[_hideIfBranch(detailType)]]">
+ Tagger
+ </th>
<th class="repositoryBrowser topHeader">
- Repository Browser</th>
+ Repository Browser
+ </th>
<th class="delete topHeader"></th>
</tr>
- <tr id="loading" class\$="loadingMsg [[computeLoadingClass(_loading)]]">
+ <tr id="loading" class$="loadingMsg [[computeLoadingClass(_loading)]]">
<td>Loading...</td>
</tr>
- </tbody><tbody class\$="[[computeLoadingClass(_loading)]]">
- <template is="dom-repeat" items="[[_shownItems]]">
- <tr class="table">
- <td class\$="[[detailType]] name">[[_stripRefs(item.ref, detailType)]]</td>
- <td class\$="[[detailType]] revision [[_computeCanEditClass(item.ref, detailType, _isOwner)]]">
- <span class="revisionNoEditing">
+ </tbody>
+ <tbody class$="[[computeLoadingClass(_loading)]]">
+ <template is="dom-repeat" items="[[_shownItems]]">
+ <tr class="table">
+ <td class$="[[detailType]] name">
+ [[_stripRefs(item.ref, detailType)]]
+ </td>
+ <td
+ class$="[[detailType]] revision [[_computeCanEditClass(item.ref, detailType, _isOwner)]]"
+ >
+ <span class="revisionNoEditing">
+ [[item.revision]]
+ </span>
+ <span class$="revisionEdit [[_computeEditingClass(_isEditing)]]">
+ <span class="revisionWithEditing">
[[item.revision]]
</span>
- <span class\$="revisionEdit [[_computeEditingClass(_isEditing)]]">
- <span class="revisionWithEditing">
- [[item.revision]]
- </span>
- <gr-button link="" on-click="_handleEditRevision" class="editBtn">
- edit
- </gr-button>
- <iron-input bind-value="{{_revisedRef}}" class="editItem">
- <input is="iron-input" bind-value="{{_revisedRef}}">
- </iron-input>
- <gr-button link="" on-click="_handleCancelRevision" class="cancelBtn editItem">
- Cancel
- </gr-button>
- <gr-button link="" on-click="_handleSaveRevision" class="saveBtn editItem" disabled="[[!_revisedRef]]">
- Save
- </gr-button>
- </span>
- </td>
- <td class\$="message [[_hideIfBranch(detailType)]]">
- [[_computeMessage(item.message)]]
- </td>
- <td class\$="tagger [[_hideIfBranch(detailType)]]">
- <div class\$="tagger [[_computeHideTagger(item.tagger)]]">
- <gr-account-link account="[[item.tagger]]">
- </gr-account-link>
- (<gr-date-formatter has-tooltip="" date-str="[[item.tagger.date]]">
- </gr-date-formatter>)
- </div>
- </td>
- <td class="repositoryBrowser">
- <template is="dom-repeat" items="[[_computeWeblink(item)]]" as="link">
- <a href\$="[[link.url]]" class="webLink" rel="noopener" target="_blank">
- ([[link.name]])
- </a>
- </template>
- </td>
- <td class="delete">
- <gr-button link="" class\$="deleteButton [[_computeHideDeleteClass(_isOwner, item.can_delete)]]" on-click="_handleDeleteItem">
- Delete
+ <gr-button
+ link=""
+ on-click="_handleEditRevision"
+ class="editBtn"
+ >
+ edit
</gr-button>
- </td>
- </tr>
- </template>
- </tbody>
- </table>
- <gr-overlay id="overlay" with-backdrop="">
- <gr-confirm-delete-item-dialog class="confirmDialog" on-confirm="_handleDeleteItemConfirm" on-cancel="_handleConfirmDialogCancel" item="[[_refName]]" item-type="[[detailType]]"></gr-confirm-delete-item-dialog>
- </gr-overlay>
- </gr-list-view>
- <gr-overlay id="createOverlay" with-backdrop="">
- <gr-dialog id="createDialog" disabled="[[!_hasNewItemName]]" confirm-label="Create" on-confirm="_handleCreateItem" on-cancel="_handleCloseCreate">
- <div class="header" slot="header">
- Create [[_computeItemName(detailType)]]
- </div>
- <div class="main" slot="main">
- <gr-create-pointer-dialog id="createNewModal" detail-type="[[_computeItemName(detailType)]]" has-new-item-name="{{_hasNewItemName}}" item-detail="[[detailType]]" repo-name="[[_repo]]"></gr-create-pointer-dialog>
- </div>
- </gr-dialog>
+ <iron-input bind-value="{{_revisedRef}}" class="editItem">
+ <input is="iron-input" bind-value="{{_revisedRef}}" />
+ </iron-input>
+ <gr-button
+ link=""
+ on-click="_handleCancelRevision"
+ class="cancelBtn editItem"
+ >
+ Cancel
+ </gr-button>
+ <gr-button
+ link=""
+ on-click="_handleSaveRevision"
+ class="saveBtn editItem"
+ disabled="[[!_revisedRef]]"
+ >
+ Save
+ </gr-button>
+ </span>
+ </td>
+ <td class$="message [[_hideIfBranch(detailType)]]">
+ [[_computeMessage(item.message)]]
+ </td>
+ <td class$="tagger [[_hideIfBranch(detailType)]]">
+ <div class$="tagger [[_computeHideTagger(item.tagger)]]">
+ <gr-account-link account="[[item.tagger]]"> </gr-account-link>
+ (<gr-date-formatter
+ has-tooltip=""
+ date-str="[[item.tagger.date]]"
+ >
+ </gr-date-formatter
+ >)
+ </div>
+ </td>
+ <td class="repositoryBrowser">
+ <template
+ is="dom-repeat"
+ items="[[_computeWeblink(item)]]"
+ as="link"
+ >
+ <a
+ href$="[[link.url]]"
+ class="webLink"
+ rel="noopener"
+ target="_blank"
+ >
+ ([[link.name]])
+ </a>
+ </template>
+ </td>
+ <td class="delete">
+ <gr-button
+ link=""
+ class$="deleteButton [[_computeHideDeleteClass(_isOwner, item.can_delete)]]"
+ on-click="_handleDeleteItem"
+ >
+ Delete
+ </gr-button>
+ </td>
+ </tr>
+ </template>
+ </tbody>
+ </table>
+ <gr-overlay id="overlay" with-backdrop="">
+ <gr-confirm-delete-item-dialog
+ class="confirmDialog"
+ on-confirm="_handleDeleteItemConfirm"
+ on-cancel="_handleConfirmDialogCancel"
+ item="[[_refName]]"
+ item-type="[[detailType]]"
+ ></gr-confirm-delete-item-dialog>
</gr-overlay>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </gr-list-view>
+ <gr-overlay id="createOverlay" with-backdrop="">
+ <gr-dialog
+ id="createDialog"
+ disabled="[[!_hasNewItemName]]"
+ confirm-label="Create"
+ on-confirm="_handleCreateItem"
+ on-cancel="_handleCloseCreate"
+ >
+ <div class="header" slot="header">
+ Create [[_computeItemName(detailType)]]
+ </div>
+ <div class="main" slot="main">
+ <gr-create-pointer-dialog
+ id="createNewModal"
+ detail-type="[[_computeItemName(detailType)]]"
+ has-new-item-name="{{_hasNewItemName}}"
+ item-detail="[[detailType]]"
+ repo-name="[[_repo]]"
+ ></gr-create-pointer-dialog>
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_html.js b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_html.js
index d498869..3681399 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo-list/gr-repo-list_html.js
@@ -17,68 +17,104 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-table-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style>
- .genericList tr td:last-of-type {
- text-align: left;
- }
- .genericList tr th:last-of-type {
- text-align: left;
- }
- .readOnly {
- text-align: center;
- }
- .changesLink, .name, .repositoryBrowser, .readOnly {
- white-space:nowrap;
- }
- </style>
- <gr-list-view create-new="[[_createNewCapability]]" filter="[[_filter]]" items-per-page="[[_reposPerPage]]" items="[[_repos]]" loading="[[_loading]]" offset="[[_offset]]" on-create-clicked="_handleCreateClicked" path="[[_path]]">
- <table id="list" class="genericList">
- <tbody><tr class="headerRow">
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-table-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style>
+ .genericList tr td:last-of-type {
+ text-align: left;
+ }
+ .genericList tr th:last-of-type {
+ text-align: left;
+ }
+ .readOnly {
+ text-align: center;
+ }
+ .changesLink,
+ .name,
+ .repositoryBrowser,
+ .readOnly {
+ white-space: nowrap;
+ }
+ </style>
+ <gr-list-view
+ create-new="[[_createNewCapability]]"
+ filter="[[_filter]]"
+ items-per-page="[[_reposPerPage]]"
+ items="[[_repos]]"
+ loading="[[_loading]]"
+ offset="[[_offset]]"
+ on-create-clicked="_handleCreateClicked"
+ path="[[_path]]"
+ >
+ <table id="list" class="genericList">
+ <tbody>
+ <tr class="headerRow">
<th class="name topHeader">Repository Name</th>
<th class="repositoryBrowser topHeader">Repository Browser</th>
<th class="changesLink topHeader">Changes</th>
<th class="topHeader readOnly">Read only</th>
<th class="description topHeader">Repository Description</th>
</tr>
- <tr id="loading" class\$="loadingMsg [[computeLoadingClass(_loading)]]">
+ <tr id="loading" class$="loadingMsg [[computeLoadingClass(_loading)]]">
<td>Loading...</td>
</tr>
- </tbody><tbody class\$="[[computeLoadingClass(_loading)]]">
- <template is="dom-repeat" items="[[_shownRepos]]">
- <tr class="table">
- <td class="name">
- <a href\$="[[_computeRepoUrl(item.name)]]">[[item.name]]</a>
- </td>
- <td class="repositoryBrowser">
- <template is="dom-repeat" items="[[_computeWeblink(item)]]" as="link">
- <a href\$="[[link.url]]" class="webLink" rel="noopener" target="_blank">
- [[link.name]]
- </a>
- </template>
- </td>
- <td class="changesLink"><a href\$="[[_computeChangesLink(item.name)]]">view all</a></td>
- <td class="readOnly">[[_readOnly(item)]]</td>
- <td class="description">[[item.description]]</td>
- </tr>
- </template>
- </tbody>
- </table>
- </gr-list-view>
- <gr-overlay id="createOverlay" with-backdrop="">
- <gr-dialog id="createDialog" class="confirmDialog" disabled="[[!_hasNewRepoName]]" confirm-label="Create" on-confirm="_handleCreateRepo" on-cancel="_handleCloseCreate">
- <div class="header" slot="header">
- Create Repository
- </div>
- <div class="main" slot="main">
- <gr-create-repo-dialog has-new-repo-name="{{_hasNewRepoName}}" params="[[params]]" id="createNewModal"></gr-create-repo-dialog>
- </div>
- </gr-dialog>
- </gr-overlay>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </tbody>
+ <tbody class$="[[computeLoadingClass(_loading)]]">
+ <template is="dom-repeat" items="[[_shownRepos]]">
+ <tr class="table">
+ <td class="name">
+ <a href$="[[_computeRepoUrl(item.name)]]">[[item.name]]</a>
+ </td>
+ <td class="repositoryBrowser">
+ <template
+ is="dom-repeat"
+ items="[[_computeWeblink(item)]]"
+ as="link"
+ >
+ <a
+ href$="[[link.url]]"
+ class="webLink"
+ rel="noopener"
+ target="_blank"
+ >
+ [[link.name]]
+ </a>
+ </template>
+ </td>
+ <td class="changesLink">
+ <a href$="[[_computeChangesLink(item.name)]]">view all</a>
+ </td>
+ <td class="readOnly">[[_readOnly(item)]]</td>
+ <td class="description">[[item.description]]</td>
+ </tr>
+ </template>
+ </tbody>
+ </table>
+ </gr-list-view>
+ <gr-overlay id="createOverlay" with-backdrop="">
+ <gr-dialog
+ id="createDialog"
+ class="confirmDialog"
+ disabled="[[!_hasNewRepoName]]"
+ confirm-label="Create"
+ on-confirm="_handleCreateRepo"
+ on-cancel="_handleCloseCreate"
+ >
+ <div class="header" slot="header">
+ Create Repository
+ </div>
+ <div class="main" slot="main">
+ <gr-create-repo-dialog
+ has-new-repo-name="{{_hasNewRepoName}}"
+ params="[[params]]"
+ id="createNewModal"
+ ></gr-create-repo-dialog>
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config_html.js b/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config_html.js
index fa4617d..80d77d6 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo-plugin-config/gr-repo-plugin-config_html.js
@@ -17,64 +17,97 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-subpage-styles">
- .inherited {
- color: var(--deemphasized-text-color);
- margin-left: var(--spacing-m);
- }
- section.section:not(.ARRAY) .title {
- align-items: center;
- display: flex;
- }
- section.section.ARRAY .title {
- padding-top: var(--spacing-m);
- }
- </style>
- <div class="gr-form-styles">
- <fieldset>
- <h4>[[pluginData.name]]</h4>
- <template is="dom-repeat" items="[[_pluginConfigOptions]]" as="option">
- <section class\$="section [[option.info.type]]">
- <span class="title">
- <gr-tooltip-content has-tooltip="[[option.info.description]]" show-icon="[[option.info.description]]" title="[[option.info.description]]">
- <span>[[option.info.display_name]]</span>
- </gr-tooltip-content>
- </span>
- <span class="value">
- <template is="dom-if" if="[[_isArray(option.info.type)]]">
- <gr-plugin-config-array-editor on-plugin-config-option-changed="_handleArrayChange" plugin-option="[[option]]"></gr-plugin-config-array-editor>
- </template>
- <template is="dom-if" if="[[_isBoolean(option.info.type)]]">
- <paper-toggle-button checked="[[_computeChecked(option.info.value)]]" on-change="_handleBooleanChange" data-option-key\$="[[option._key]]" disabled\$="[[_computeDisabled(option.info.editable)]]"></paper-toggle-button>
- </template>
- <template is="dom-if" if="[[_isList(option.info.type)]]">
- <gr-select bind-value\$="[[option.info.value]]" on-change="_handleListChange">
- <select data-option-key\$="[[option._key]]" disabled\$="[[_computeDisabled(option.info.editable)]]">
- <template is="dom-repeat" items="[[option.info.permitted_values]]" as="value">
- <option value\$="[[value]]">[[value]]</option>
- </template>
- </select>
- </gr-select>
- </template>
- <template is="dom-if" if="[[_isString(option.info.type)]]">
- <iron-input bind-value="[[option.info.value]]" on-input="_handleStringChange" data-option-key\$="[[option._key]]" disabled\$="[[_computeDisabled(option.info.editable)]]">
- <input is="iron-input" value="[[option.info.value]]" on-input="_handleStringChange" data-option-key\$="[[option._key]]" disabled\$="[[_computeDisabled(option.info.editable)]]">
- </iron-input>
- </template>
- <template is="dom-if" if="[[option.info.inherited_value]]">
- <span class="inherited">
- (Inherited: [[option.info.inherited_value]])
- </span>
- </template>
- </span>
- </section>
- </template>
- </fieldset>
- </div>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-subpage-styles">
+ .inherited {
+ color: var(--deemphasized-text-color);
+ margin-left: var(--spacing-m);
+ }
+ section.section:not(.ARRAY) .title {
+ align-items: center;
+ display: flex;
+ }
+ section.section.ARRAY .title {
+ padding-top: var(--spacing-m);
+ }
+ </style>
+ <div class="gr-form-styles">
+ <fieldset>
+ <h4>[[pluginData.name]]</h4>
+ <template is="dom-repeat" items="[[_pluginConfigOptions]]" as="option">
+ <section class$="section [[option.info.type]]">
+ <span class="title">
+ <gr-tooltip-content
+ has-tooltip="[[option.info.description]]"
+ show-icon="[[option.info.description]]"
+ title="[[option.info.description]]"
+ >
+ <span>[[option.info.display_name]]</span>
+ </gr-tooltip-content>
+ </span>
+ <span class="value">
+ <template is="dom-if" if="[[_isArray(option.info.type)]]">
+ <gr-plugin-config-array-editor
+ on-plugin-config-option-changed="_handleArrayChange"
+ plugin-option="[[option]]"
+ ></gr-plugin-config-array-editor>
+ </template>
+ <template is="dom-if" if="[[_isBoolean(option.info.type)]]">
+ <paper-toggle-button
+ checked="[[_computeChecked(option.info.value)]]"
+ on-change="_handleBooleanChange"
+ data-option-key$="[[option._key]]"
+ disabled$="[[_computeDisabled(option.info.editable)]]"
+ ></paper-toggle-button>
+ </template>
+ <template is="dom-if" if="[[_isList(option.info.type)]]">
+ <gr-select
+ bind-value$="[[option.info.value]]"
+ on-change="_handleListChange"
+ >
+ <select
+ data-option-key$="[[option._key]]"
+ disabled$="[[_computeDisabled(option.info.editable)]]"
+ >
+ <template
+ is="dom-repeat"
+ items="[[option.info.permitted_values]]"
+ as="value"
+ >
+ <option value$="[[value]]">[[value]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </template>
+ <template is="dom-if" if="[[_isString(option.info.type)]]">
+ <iron-input
+ bind-value="[[option.info.value]]"
+ on-input="_handleStringChange"
+ data-option-key$="[[option._key]]"
+ disabled$="[[_computeDisabled(option.info.editable)]]"
+ >
+ <input
+ is="iron-input"
+ value="[[option.info.value]]"
+ on-input="_handleStringChange"
+ data-option-key$="[[option._key]]"
+ disabled$="[[_computeDisabled(option.info.editable)]]"
+ />
+ </iron-input>
+ </template>
+ <template is="dom-if" if="[[option.info.inherited_value]]">
+ <span class="inherited">
+ (Inherited: [[option.info.inherited_value]])
+ </span>
+ </template>
+ </span>
+ </section>
+ </template>
+ </fieldset>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo_html.js b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo_html.js
index 2c7540f..de36e73 100644
--- a/polygerrit-ui/app/elements/admin/gr-repo/gr-repo_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-repo/gr-repo_html.js
@@ -17,280 +17,421 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-subpage-styles">
+ h2.edited:after {
+ color: var(--deemphasized-text-color);
+ content: ' *';
+ }
+ .loading,
+ .hide {
+ display: none;
+ }
+ #loading.loading {
+ display: block;
+ }
+ #loading:not(.loading) {
+ display: none;
+ }
+ #options .repositorySettings {
+ display: none;
+ }
+ #options .repositorySettings.showConfig {
+ display: block;
+ }
+ </style>
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <main class="gr-form-styles read-only">
<style include="shared-styles">
/* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
</style>
- <style include="gr-subpage-styles">
- h2.edited:after {
- color: var(--deemphasized-text-color);
- content: ' *';
- }
- .loading,
- .hide {
- display: none;
- }
- #loading.loading {
- display: block;
- }
- #loading:not(.loading) {
- display: none;
- }
- #options .repositorySettings {
- display: none;
- }
- #options .repositorySettings.showConfig {
- display: block;
- }
- </style>
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <main class="gr-form-styles read-only">
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <div class="info">
- <h1 id="Title" class\$="name">
- [[repo]]
- <hr>
- </h1>
- <div>
- <a href\$="[[_computeChangesUrl(repo)]]">(view changes)</a>
- </div>
+ <div class="info">
+ <h1 id="Title" class$="name">
+ [[repo]]
+ <hr />
+ </h1>
+ <div>
+ <a href$="[[_computeChangesUrl(repo)]]">(view changes)</a>
</div>
- <div id="loading" class\$="[[_computeLoadingClass(_loading)]]">Loading...</div>
- <div id="loadedContent" class\$="[[_computeLoadingClass(_loading)]]">
- <div id="downloadContent" class\$="[[_computeHideClass(_schemes)]]">
- <h2 id="download">Download</h2>
+ </div>
+ <div id="loading" class$="[[_computeLoadingClass(_loading)]]">
+ Loading...
+ </div>
+ <div id="loadedContent" class$="[[_computeLoadingClass(_loading)]]">
+ <div id="downloadContent" class$="[[_computeHideClass(_schemes)]]">
+ <h2 id="download">Download</h2>
+ <fieldset>
+ <gr-download-commands
+ id="downloadCommands"
+ commands="[[_computeCommands(repo, _schemesObj, _selectedScheme)]]"
+ schemes="[[_schemes]]"
+ selected-scheme="{{_selectedScheme}}"
+ ></gr-download-commands>
+ </fieldset>
+ </div>
+ <h2 id="configurations" class$="[[_computeHeaderClass(_configChanged)]]">
+ Configurations
+ </h2>
+ <div id="form">
+ <fieldset>
+ <h3 id="Description">Description</h3>
<fieldset>
- <gr-download-commands id="downloadCommands" commands="[[_computeCommands(repo, _schemesObj, _selectedScheme)]]" schemes="[[_schemes]]" selected-scheme="{{_selectedScheme}}"></gr-download-commands>
+ <iron-autogrow-textarea
+ id="descriptionInput"
+ class="description"
+ autocomplete="on"
+ placeholder="<Insert repo description here>"
+ bind-value="{{_repoConfig.description}}"
+ disabled$="[[_readOnly]]"
+ ></iron-autogrow-textarea>
</fieldset>
- </div>
- <h2 id="configurations" class\$="[[_computeHeaderClass(_configChanged)]]">Configurations</h2>
- <div id="form">
- <fieldset>
- <h3 id="Description">Description</h3>
- <fieldset>
- <iron-autogrow-textarea id="descriptionInput" class="description" autocomplete="on" placeholder="<Insert repo description here>" bind-value="{{_repoConfig.description}}" disabled\$="[[_readOnly]]"></iron-autogrow-textarea>
- </fieldset>
- <h3 id="Options">Repository Options</h3>
- <fieldset id="options">
- <section>
- <span class="title">State</span>
- <span class="value">
- <gr-select id="stateSelect" bind-value="{{_repoConfig.state}}">
- <select disabled\$="[[_readOnly]]">
- <template is="dom-repeat" items="[[_states]]">
- <option value="[[item.value]]">[[item.label]]</option>
- </template>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">Submit type</span>
- <span class="value">
- <gr-select id="submitTypeSelect" bind-value="{{_repoConfig.submit_type}}">
- <select disabled\$="[[_readOnly]]">
- <template is="dom-repeat" items="[[_formatSubmitTypeSelect(_repoConfig)]]">
- <option value="[[item.value]]">[[item.label]]</option>
- </template>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">Allow content merges</span>
- <span class="value">
- <gr-select id="contentMergeSelect" bind-value="{{_repoConfig.use_content_merge.configured_value}}">
- <select disabled\$="[[_readOnly]]">
- <template is="dom-repeat" items="[[_formatBooleanSelect(_repoConfig.use_content_merge)]]">
- <option value="[[item.value]]">[[item.label]]</option>
- </template>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">
- Create a new change for every commit not in the target branch
- </span>
- <span class="value">
- <gr-select id="newChangeSelect" bind-value="{{_repoConfig.create_new_change_for_all_not_in_target.configured_value}}">
- <select disabled\$="[[_readOnly]]">
- <template is="dom-repeat" items="[[_formatBooleanSelect(_repoConfig.create_new_change_for_all_not_in_target)]]">
- <option value="[[item.value]]">[[item.label]]</option>
- </template>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">Require Change-Id in commit message</span>
- <span class="value">
- <gr-select id="requireChangeIdSelect" bind-value="{{_repoConfig.require_change_id.configured_value}}">
- <select disabled\$="[[_readOnly]]">
- <template is="dom-repeat" items="[[_formatBooleanSelect(_repoConfig.require_change_id)]]">
- <option value="[[item.value]]">[[item.label]]</option>
- </template>
- </select>
- </gr-select>
- </span>
- </section>
- <section id="enableSignedPushSettings" class\$="repositorySettings [[_computeRepositoriesClass(_repoConfig.enable_signed_push)]]">
- <span class="title">Enable signed push</span>
- <span class="value">
- <gr-select id="enableSignedPush" bind-value="{{_repoConfig.enable_signed_push.configured_value}}">
- <select disabled\$="[[_readOnly]]">
- <template is="dom-repeat" items="[[_formatBooleanSelect(_repoConfig.enable_signed_push)]]">
- <option value="[[item.value]]">[[item.label]]</option>
- </template>
- </select>
- </gr-select>
- </span>
- </section>
- <section id="requireSignedPushSettings" class\$="repositorySettings [[_computeRepositoriesClass(_repoConfig.require_signed_push)]]">
- <span class="title">Require signed push</span>
- <span class="value">
- <gr-select id="requireSignedPush" bind-value="{{_repoConfig.require_signed_push.configured_value}}">
- <select disabled\$="[[_readOnly]]">
- <template is="dom-repeat" items="[[_formatBooleanSelect(_repoConfig.require_signed_push)]]">
- <option value="[[item.value]]">[[item.label]]</option>
- </template>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">
- Reject implicit merges when changes are pushed for review</span>
- <span class="value">
- <gr-select id="rejectImplicitMergesSelect" bind-value="{{_repoConfig.reject_implicit_merges.configured_value}}">
- <select disabled\$="[[_readOnly]]">
- <template is="dom-repeat" items="[[_formatBooleanSelect(_repoConfig.reject_implicit_merges)]]">
- <option value="[[item.value]]">[[item.label]]</option>
- </template>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">
- Enable adding unregistered users as reviewers and CCs on changes</span>
- <span class="value">
- <gr-select id="unRegisteredCcSelect" bind-value="{{_repoConfig.enable_reviewer_by_email.configured_value}}">
- <select disabled\$="[[_readOnly]]">
- <template is="dom-repeat" items="[[_formatBooleanSelect(_repoConfig.enable_reviewer_by_email)]]">
- <option value="[[item.value]]">[[item.label]]</option>
- </template>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">
- Set all new changes private by default</span>
- <span class="value">
- <gr-select id="setAllnewChangesPrivateByDefaultSelect" bind-value="{{_repoConfig.private_by_default.configured_value}}">
- <select disabled\$="[[_readOnly]]">
- <template is="dom-repeat" items="[[_formatBooleanSelect(_repoConfig.private_by_default)]]">
- <option value="[[item.value]]">[[item.label]]</option>
- </template>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">
- Set new changes to "work in progress" by default</span>
- <span class="value">
- <gr-select id="setAllNewChangesWorkInProgressByDefaultSelect" bind-value="{{_repoConfig.work_in_progress_by_default.configured_value}}">
- <select disabled\$="[[_readOnly]]">
- <template is="dom-repeat" items="[[_formatBooleanSelect(_repoConfig.work_in_progress_by_default)]]">
- <option value="[[item.value]]">[[item.label]]</option>
- </template>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">Maximum Git object size limit</span>
- <span class="value">
- <iron-input id="maxGitObjSizeIronInput" bind-value="{{_repoConfig.max_object_size_limit.configured_value}}" type="text" disabled\$="[[_readOnly]]">
- <input id="maxGitObjSizeInput" bind-value="{{_repoConfig.max_object_size_limit.configured_value}}" is="iron-input" type="text" disabled\$="[[_readOnly]]">
- </iron-input>
- <template is="dom-if" if="[[_repoConfig.max_object_size_limit.value]]">
- effective: [[_repoConfig.max_object_size_limit.value]] bytes
- </template>
- </span>
- </section>
- <section>
- <span class="title">Match authored date with committer date upon submit</span>
- <span class="value">
- <gr-select id="matchAuthoredDateWithCommitterDateSelect" bind-value="{{_repoConfig.match_author_to_committer_date.configured_value}}">
- <select disabled\$="[[_readOnly]]">
- <template is="dom-repeat" items="[[_formatBooleanSelect(_repoConfig.match_author_to_committer_date)]]">
- <option value="[[item.value]]">[[item.label]]</option>
- </template>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">Reject empty commit upon submit</span>
- <span class="value">
- <gr-select id="rejectEmptyCommitSelect" bind-value="{{_repoConfig.reject_empty_commit.configured_value}}">
- <select disabled\$="[[_readOnly]]">
- <template is="dom-repeat" items="[[_formatBooleanSelect(_repoConfig.reject_empty_commit)]]">
- <option value="[[item.value]]">[[item.label]]</option>
- </template>
- </select>
- </gr-select>
- </span>
- </section>
- </fieldset>
- <h3 id="Options">Contributor Agreements</h3>
- <fieldset id="agreements">
- <section>
- <span class="title">
- Require a valid contributor agreement to upload</span>
- <span class="value">
- <gr-select id="contributorAgreementSelect" bind-value="{{_repoConfig.use_contributor_agreements.configured_value}}">
- <select disabled\$="[[_readOnly]]">
- <template is="dom-repeat" items="[[_formatBooleanSelect(_repoConfig.use_contributor_agreements)]]">
+ <h3 id="Options">Repository Options</h3>
+ <fieldset id="options">
+ <section>
+ <span class="title">State</span>
+ <span class="value">
+ <gr-select id="stateSelect" bind-value="{{_repoConfig.state}}">
+ <select disabled$="[[_readOnly]]">
+ <template is="dom-repeat" items="[[_states]]">
<option value="[[item.value]]">[[item.label]]</option>
</template>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">Require Signed-off-by in commit message</span>
- <span class="value">
- <gr-select id="useSignedOffBySelect" bind-value="{{_repoConfig.use_signed_off_by.configured_value}}">
- <select disabled\$="[[_readOnly]]">
- <template is="dom-repeat" items="[[_formatBooleanSelect(_repoConfig.use_signed_off_by)]]">
- <option value="[[item.value]]">[[item.label]]</option>
- </template>
- </select>
- </gr-select>
- </span>
- </section>
- </fieldset>
- <div class\$="pluginConfig [[_computeHideClass(_pluginData)]]" on-plugin-config-changed="_handlePluginConfigChanged">
- <h3>Plugins</h3>
- <template is="dom-repeat" items="[[_pluginData]]" as="data">
- <gr-repo-plugin-config plugin-data="[[data]]"></gr-repo-plugin-config>
- </template>
- </div>
- <gr-button on-click="_handleSaveRepoConfig" disabled\$="[[_computeButtonDisabled(_readOnly, _configChanged)]]">Save changes</gr-button>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">Submit type</span>
+ <span class="value">
+ <gr-select
+ id="submitTypeSelect"
+ bind-value="{{_repoConfig.submit_type}}"
+ >
+ <select disabled$="[[_readOnly]]">
+ <template
+ is="dom-repeat"
+ items="[[_formatSubmitTypeSelect(_repoConfig)]]"
+ >
+ <option value="[[item.value]]">[[item.label]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">Allow content merges</span>
+ <span class="value">
+ <gr-select
+ id="contentMergeSelect"
+ bind-value="{{_repoConfig.use_content_merge.configured_value}}"
+ >
+ <select disabled$="[[_readOnly]]">
+ <template
+ is="dom-repeat"
+ items="[[_formatBooleanSelect(_repoConfig.use_content_merge)]]"
+ >
+ <option value="[[item.value]]">[[item.label]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">
+ Create a new change for every commit not in the target branch
+ </span>
+ <span class="value">
+ <gr-select
+ id="newChangeSelect"
+ bind-value="{{_repoConfig.create_new_change_for_all_not_in_target.configured_value}}"
+ >
+ <select disabled$="[[_readOnly]]">
+ <template
+ is="dom-repeat"
+ items="[[_formatBooleanSelect(_repoConfig.create_new_change_for_all_not_in_target)]]"
+ >
+ <option value="[[item.value]]">[[item.label]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">Require Change-Id in commit message</span>
+ <span class="value">
+ <gr-select
+ id="requireChangeIdSelect"
+ bind-value="{{_repoConfig.require_change_id.configured_value}}"
+ >
+ <select disabled$="[[_readOnly]]">
+ <template
+ is="dom-repeat"
+ items="[[_formatBooleanSelect(_repoConfig.require_change_id)]]"
+ >
+ <option value="[[item.value]]">[[item.label]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section
+ id="enableSignedPushSettings"
+ class$="repositorySettings [[_computeRepositoriesClass(_repoConfig.enable_signed_push)]]"
+ >
+ <span class="title">Enable signed push</span>
+ <span class="value">
+ <gr-select
+ id="enableSignedPush"
+ bind-value="{{_repoConfig.enable_signed_push.configured_value}}"
+ >
+ <select disabled$="[[_readOnly]]">
+ <template
+ is="dom-repeat"
+ items="[[_formatBooleanSelect(_repoConfig.enable_signed_push)]]"
+ >
+ <option value="[[item.value]]">[[item.label]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section
+ id="requireSignedPushSettings"
+ class$="repositorySettings [[_computeRepositoriesClass(_repoConfig.require_signed_push)]]"
+ >
+ <span class="title">Require signed push</span>
+ <span class="value">
+ <gr-select
+ id="requireSignedPush"
+ bind-value="{{_repoConfig.require_signed_push.configured_value}}"
+ >
+ <select disabled$="[[_readOnly]]">
+ <template
+ is="dom-repeat"
+ items="[[_formatBooleanSelect(_repoConfig.require_signed_push)]]"
+ >
+ <option value="[[item.value]]">[[item.label]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">
+ Reject implicit merges when changes are pushed for review</span
+ >
+ <span class="value">
+ <gr-select
+ id="rejectImplicitMergesSelect"
+ bind-value="{{_repoConfig.reject_implicit_merges.configured_value}}"
+ >
+ <select disabled$="[[_readOnly]]">
+ <template
+ is="dom-repeat"
+ items="[[_formatBooleanSelect(_repoConfig.reject_implicit_merges)]]"
+ >
+ <option value="[[item.value]]">[[item.label]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">
+ Enable adding unregistered users as reviewers and CCs on
+ changes</span
+ >
+ <span class="value">
+ <gr-select
+ id="unRegisteredCcSelect"
+ bind-value="{{_repoConfig.enable_reviewer_by_email.configured_value}}"
+ >
+ <select disabled$="[[_readOnly]]">
+ <template
+ is="dom-repeat"
+ items="[[_formatBooleanSelect(_repoConfig.enable_reviewer_by_email)]]"
+ >
+ <option value="[[item.value]]">[[item.label]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title"> Set all new changes private by default</span>
+ <span class="value">
+ <gr-select
+ id="setAllnewChangesPrivateByDefaultSelect"
+ bind-value="{{_repoConfig.private_by_default.configured_value}}"
+ >
+ <select disabled$="[[_readOnly]]">
+ <template
+ is="dom-repeat"
+ items="[[_formatBooleanSelect(_repoConfig.private_by_default)]]"
+ >
+ <option value="[[item.value]]">[[item.label]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">
+ Set new changes to "work in progress" by default</span
+ >
+ <span class="value">
+ <gr-select
+ id="setAllNewChangesWorkInProgressByDefaultSelect"
+ bind-value="{{_repoConfig.work_in_progress_by_default.configured_value}}"
+ >
+ <select disabled$="[[_readOnly]]">
+ <template
+ is="dom-repeat"
+ items="[[_formatBooleanSelect(_repoConfig.work_in_progress_by_default)]]"
+ >
+ <option value="[[item.value]]">[[item.label]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">Maximum Git object size limit</span>
+ <span class="value">
+ <iron-input
+ id="maxGitObjSizeIronInput"
+ bind-value="{{_repoConfig.max_object_size_limit.configured_value}}"
+ type="text"
+ disabled$="[[_readOnly]]"
+ >
+ <input
+ id="maxGitObjSizeInput"
+ bind-value="{{_repoConfig.max_object_size_limit.configured_value}}"
+ is="iron-input"
+ type="text"
+ disabled$="[[_readOnly]]"
+ />
+ </iron-input>
+ <template
+ is="dom-if"
+ if="[[_repoConfig.max_object_size_limit.value]]"
+ >
+ effective: [[_repoConfig.max_object_size_limit.value]] bytes
+ </template>
+ </span>
+ </section>
+ <section>
+ <span class="title"
+ >Match authored date with committer date upon submit</span
+ >
+ <span class="value">
+ <gr-select
+ id="matchAuthoredDateWithCommitterDateSelect"
+ bind-value="{{_repoConfig.match_author_to_committer_date.configured_value}}"
+ >
+ <select disabled$="[[_readOnly]]">
+ <template
+ is="dom-repeat"
+ items="[[_formatBooleanSelect(_repoConfig.match_author_to_committer_date)]]"
+ >
+ <option value="[[item.value]]">[[item.label]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">Reject empty commit upon submit</span>
+ <span class="value">
+ <gr-select
+ id="rejectEmptyCommitSelect"
+ bind-value="{{_repoConfig.reject_empty_commit.configured_value}}"
+ >
+ <select disabled$="[[_readOnly]]">
+ <template
+ is="dom-repeat"
+ items="[[_formatBooleanSelect(_repoConfig.reject_empty_commit)]]"
+ >
+ <option value="[[item.value]]">[[item.label]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </span>
+ </section>
</fieldset>
- <gr-endpoint-decorator name="repo-config">
- <gr-endpoint-param name="repoName" value="[[repo]]"></gr-endpoint-param>
- <gr-endpoint-param name="readOnly" value="[[_readOnly]]"></gr-endpoint-param>
- </gr-endpoint-decorator>
- </div>
+ <h3 id="Options">Contributor Agreements</h3>
+ <fieldset id="agreements">
+ <section>
+ <span class="title">
+ Require a valid contributor agreement to upload</span
+ >
+ <span class="value">
+ <gr-select
+ id="contributorAgreementSelect"
+ bind-value="{{_repoConfig.use_contributor_agreements.configured_value}}"
+ >
+ <select disabled$="[[_readOnly]]">
+ <template
+ is="dom-repeat"
+ items="[[_formatBooleanSelect(_repoConfig.use_contributor_agreements)]]"
+ >
+ <option value="[[item.value]]">[[item.label]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">Require Signed-off-by in commit message</span>
+ <span class="value">
+ <gr-select
+ id="useSignedOffBySelect"
+ bind-value="{{_repoConfig.use_signed_off_by.configured_value}}"
+ >
+ <select disabled$="[[_readOnly]]">
+ <template
+ is="dom-repeat"
+ items="[[_formatBooleanSelect(_repoConfig.use_signed_off_by)]]"
+ >
+ <option value="[[item.value]]">[[item.label]]</option>
+ </template>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ </fieldset>
+ <div
+ class$="pluginConfig [[_computeHideClass(_pluginData)]]"
+ on-plugin-config-changed="_handlePluginConfigChanged"
+ >
+ <h3>Plugins</h3>
+ <template is="dom-repeat" items="[[_pluginData]]" as="data">
+ <gr-repo-plugin-config
+ plugin-data="[[data]]"
+ ></gr-repo-plugin-config>
+ </template>
+ </div>
+ <gr-button
+ on-click="_handleSaveRepoConfig"
+ disabled$="[[_computeButtonDisabled(_readOnly, _configChanged)]]"
+ >Save changes</gr-button
+ >
+ </fieldset>
+ <gr-endpoint-decorator name="repo-config">
+ <gr-endpoint-param
+ name="repoName"
+ value="[[repo]]"
+ ></gr-endpoint-param>
+ <gr-endpoint-param
+ name="readOnly"
+ value="[[_readOnly]]"
+ ></gr-endpoint-param>
+ </gr-endpoint-decorator>
</div>
- </main>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </div>
+ </main>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor_html.js b/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor_html.js
index 4ea13b1..3e4f9d4 100644
--- a/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor_html.js
+++ b/polygerrit-ui/app/elements/admin/gr-rule-editor/gr-rule-editor_html.js
@@ -17,100 +17,144 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- border-bottom: 1px solid var(--border-color);
- padding: var(--spacing-m);
- display: block;
- }
- #removeBtn {
- display: none;
- }
- .editing #removeBtn {
- display: flex;
- }
- #options {
- align-items: baseline;
- display: flex;
- }
- #options > * {
- margin-right: var(--spacing-m);
- }
- #mainContainer {
- align-items: baseline;
- display: flex;
- flex-wrap: nowrap;
- justify-content: space-between;
- }
- #deletedContainer.deleted {
- align-items: baseline;
- display: flex;
- justify-content: space-between;
- }
- #undoBtn,
- #force,
- #deletedContainer,
- #mainContainer.deleted {
- display: none;
- }
- #undoBtn.modified,
- #force.force {
- display: block;
- }
- .groupPath {
- color: var(--deemphasized-text-color);
- }
- </style>
- <style include="gr-form-styles">
- iron-autogrow-textarea {
- width: 14em;
- }
- </style>
- <div id="mainContainer" class\$="gr-form-styles [[_computeSectionClass(editing, _deleted)]]">
- <div id="options">
- <gr-select id="action" bind-value="{{rule.value.action}}" on-change="_handleValueChange">
- <select disabled\$="[[!editing]]">
- <template is="dom-repeat" items="[[_computeOptions(permission)]]">
- <option value="[[item]]">[[item]]</option>
+ <style include="shared-styles">
+ :host {
+ border-bottom: 1px solid var(--border-color);
+ padding: var(--spacing-m);
+ display: block;
+ }
+ #removeBtn {
+ display: none;
+ }
+ .editing #removeBtn {
+ display: flex;
+ }
+ #options {
+ align-items: baseline;
+ display: flex;
+ }
+ #options > * {
+ margin-right: var(--spacing-m);
+ }
+ #mainContainer {
+ align-items: baseline;
+ display: flex;
+ flex-wrap: nowrap;
+ justify-content: space-between;
+ }
+ #deletedContainer.deleted {
+ align-items: baseline;
+ display: flex;
+ justify-content: space-between;
+ }
+ #undoBtn,
+ #force,
+ #deletedContainer,
+ #mainContainer.deleted {
+ display: none;
+ }
+ #undoBtn.modified,
+ #force.force {
+ display: block;
+ }
+ .groupPath {
+ color: var(--deemphasized-text-color);
+ }
+ </style>
+ <style include="gr-form-styles">
+ iron-autogrow-textarea {
+ width: 14em;
+ }
+ </style>
+ <div
+ id="mainContainer"
+ class$="gr-form-styles [[_computeSectionClass(editing, _deleted)]]"
+ >
+ <div id="options">
+ <gr-select
+ id="action"
+ bind-value="{{rule.value.action}}"
+ on-change="_handleValueChange"
+ >
+ <select disabled$="[[!editing]]">
+ <template is="dom-repeat" items="[[_computeOptions(permission)]]">
+ <option value="[[item]]">[[item]]</option>
+ </template>
+ </select>
+ </gr-select>
+ <template is="dom-if" if="[[label]]">
+ <gr-select
+ id="labelMin"
+ bind-value="{{rule.value.min}}"
+ on-change="_handleValueChange"
+ >
+ <select disabled$="[[!editing]]">
+ <template is="dom-repeat" items="[[label.values]]">
+ <option value="[[item.value]]">[[item.value]]</option>
</template>
</select>
</gr-select>
- <template is="dom-if" if="[[label]]">
- <gr-select id="labelMin" bind-value="{{rule.value.min}}" on-change="_handleValueChange">
- <select disabled\$="[[!editing]]">
- <template is="dom-repeat" items="[[label.values]]">
- <option value="[[item.value]]">[[item.value]]</option>
- </template>
- </select>
- </gr-select>
- <gr-select id="labelMax" bind-value="{{rule.value.max}}" on-change="_handleValueChange">
- <select disabled\$="[[!editing]]">
- <template is="dom-repeat" items="[[label.values]]">
- <option value="[[item.value]]">[[item.value]]</option>
- </template>
- </select>
- </gr-select>
- </template>
- <template is="dom-if" if="[[hasRange]]">
- <iron-autogrow-textarea id="minInput" class="min" autocomplete="on" placeholder="Min value" bind-value="{{rule.value.min}}" disabled\$="[[!editing]]"></iron-autogrow-textarea>
- <iron-autogrow-textarea id="maxInput" class="max" autocomplete="on" placeholder="Max value" bind-value="{{rule.value.max}}" disabled\$="[[!editing]]"></iron-autogrow-textarea>
- </template>
- <a class="groupPath" href\$="[[_computeGroupPath(groupId)]]">
- [[groupName]]
- </a>
- <gr-select id="force" class\$="[[_computeForceClass(permission, rule.value.action)]]" bind-value="{{rule.value.force}}" on-change="_handleValueChange">
- <select disabled\$="[[!editing]]">
- <template is="dom-repeat" items="[[_computeForceOptions(permission, rule.value.action)]]">
- <option value="[[item.value]]">[[item.name]]</option>
+ <gr-select
+ id="labelMax"
+ bind-value="{{rule.value.max}}"
+ on-change="_handleValueChange"
+ >
+ <select disabled$="[[!editing]]">
+ <template is="dom-repeat" items="[[label.values]]">
+ <option value="[[item.value]]">[[item.value]]</option>
</template>
</select>
</gr-select>
- </div>
- <gr-button link="" id="removeBtn" on-click="_handleRemoveRule">Remove</gr-button>
+ </template>
+ <template is="dom-if" if="[[hasRange]]">
+ <iron-autogrow-textarea
+ id="minInput"
+ class="min"
+ autocomplete="on"
+ placeholder="Min value"
+ bind-value="{{rule.value.min}}"
+ disabled$="[[!editing]]"
+ ></iron-autogrow-textarea>
+ <iron-autogrow-textarea
+ id="maxInput"
+ class="max"
+ autocomplete="on"
+ placeholder="Max value"
+ bind-value="{{rule.value.max}}"
+ disabled$="[[!editing]]"
+ ></iron-autogrow-textarea>
+ </template>
+ <a class="groupPath" href$="[[_computeGroupPath(groupId)]]">
+ [[groupName]]
+ </a>
+ <gr-select
+ id="force"
+ class$="[[_computeForceClass(permission, rule.value.action)]]"
+ bind-value="{{rule.value.force}}"
+ on-change="_handleValueChange"
+ >
+ <select disabled$="[[!editing]]">
+ <template
+ is="dom-repeat"
+ items="[[_computeForceOptions(permission, rule.value.action)]]"
+ >
+ <option value="[[item.value]]">[[item.name]]</option>
+ </template>
+ </select>
+ </gr-select>
</div>
- <div id="deletedContainer" class\$="gr-form-styles [[_computeSectionClass(editing, _deleted)]]">
- [[groupName]] was deleted
- <gr-button link="" id="undoRemoveBtn" on-click="_handleUndoRemove">Undo</gr-button>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-button link="" id="removeBtn" on-click="_handleRemoveRule"
+ >Remove</gr-button
+ >
+ </div>
+ <div
+ id="deletedContainer"
+ class$="gr-form-styles [[_computeSectionClass(editing, _deleted)]]"
+ >
+ [[groupName]] was deleted
+ <gr-button link="" id="undoRemoveBtn" on-click="_handleUndoRemove"
+ >Undo</gr-button
+ >
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_html.js b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_html.js
index aed0077..13b3c24 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_html.js
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-item/gr-change-list-item_html.js
@@ -17,201 +17,262 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
+ <style include="shared-styles">
+ :host {
+ display: table-row;
+ color: var(--primary-text-color);
+ }
+ :host(:focus) {
+ outline: none;
+ }
+ :host(:hover) {
+ background-color: var(--hover-background-color);
+ }
+ :host([needs-review]) {
+ font-weight: var(--font-weight-bold);
+ color: var(--primary-text-color);
+ }
+ :host([highlight]) {
+ background-color: var(--assignee-highlight-color);
+ }
+ .container {
+ position: relative;
+ }
+ .content {
+ overflow: hidden;
+ position: absolute;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ width: 100%;
+ }
+ .content a {
+ display: block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ width: 100%;
+ }
+ .comments,
+ .reviewers {
+ white-space: nowrap;
+ }
+ .spacer {
+ height: 0;
+ overflow: hidden;
+ }
+ .status {
+ align-items: center;
+ display: inline-flex;
+ }
+ .status .comma {
+ padding-right: var(--spacing-xs);
+ }
+ /* Used to hide the leading separator comma for statuses. */
+ .status .comma:first-of-type {
+ display: none;
+ }
+ .size gr-tooltip-content {
+ margin: -0.4rem -0.6rem;
+ max-width: 2.5rem;
+ padding: var(--spacing-m) var(--spacing-l);
+ }
+ a {
+ color: inherit;
+ cursor: pointer;
+ text-decoration: none;
+ }
+ a:hover {
+ text-decoration: underline;
+ }
+ .u-monospace {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-mono);
+ line-height: var(--line-height-mono);
+ }
+ .u-green {
+ color: var(--vote-text-color-recommended);
+ }
+ .u-red {
+ color: var(--vote-text-color-disliked);
+ }
+ .u-gray-background {
+ background-color: var(--table-header-background-color);
+ }
+ .comma,
+ .placeholder {
+ color: var(--deemphasized-text-color);
+ }
+ .cell.label {
+ font-weight: var(--font-weight-normal);
+ }
+ .lastChildHidden:last-of-type {
+ display: none;
+ }
+ @media only screen and (max-width: 50em) {
:host {
- display: table-row;
- color: var(--primary-text-color);
+ display: flex;
}
- :host(:focus) {
- outline: none;
- }
- :host(:hover) {
- background-color: var(--hover-background-color);
- }
- :host([needs-review]) {
- font-weight: var(--font-weight-bold);
- color: var(--primary-text-color);
- }
- :host([highlight]) {
- background-color: var(--assignee-highlight-color);
- }
- .container {
- position: relative;
- }
- .content {
- overflow: hidden;
- position: absolute;
- text-overflow: ellipsis;
- white-space: nowrap;
- width: 100%;
- }
- .content a {
- display: block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- width: 100%;
- }
- .comments,
- .reviewers {
- white-space: nowrap;
- }
- .spacer {
- height: 0;
- overflow: hidden;
- }
- .status {
- align-items: center;
- display: inline-flex;
- }
- .status .comma {
- padding-right: var(--spacing-xs);
- }
- /* Used to hide the leading separator comma for statuses. */
- .status .comma:first-of-type {
- display: none;
- }
- .size gr-tooltip-content {
- margin: -.4rem -.6rem;
- max-width: 2.5rem;
- padding: var(--spacing-m) var(--spacing-l);
- }
- a {
- color: inherit;
- cursor: pointer;
- text-decoration: none;
- }
- a:hover {
- text-decoration: underline;
- }
- .u-monospace {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-mono);
- line-height: var(--line-height-mono);
- }
- .u-green {
- color: var(--vote-text-color-recommended);
- }
- .u-red {
- color: var(--vote-text-color-disliked);
- }
- .u-gray-background {
- background-color: var(--table-header-background-color);
- }
- .comma,
- .placeholder {
- color: var(--deemphasized-text-color);
- }
- .cell.label {
- font-weight: var(--font-weight-normal);
- }
- .lastChildHidden:last-of-type {
- display: none;
- }
- @media only screen and (max-width: 50em) {
- :host {
- display: flex;
- }
- }
- </style>
- <style include="gr-change-list-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <td class="cell leftPadding"></td>
- <td class="cell star" hidden\$="[[!showStar]]" hidden="">
- <gr-change-star change="{{change}}"></gr-change-star>
- </td>
- <td class="cell number" hidden\$="[[!showNumber]]" hidden="">
- <a href\$="[[changeURL]]">[[change._number]]</a>
- </td>
- <td class="cell subject" hidden\$="[[isColumnHidden('Subject', visibleChangeTableColumns)]]">
- <div class="container">
- <div class="content">
- <a title\$="[[change.subject]]" href\$="[[changeURL]]">
- [[change.subject]]
- </a>
- </div>
- <div class="spacer">
- [[change.subject]]
- </div>
- <span> </span>
+ }
+ </style>
+ <style include="gr-change-list-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <td class="cell leftPadding"></td>
+ <td class="cell star" hidden$="[[!showStar]]" hidden="">
+ <gr-change-star change="{{change}}"></gr-change-star>
+ </td>
+ <td class="cell number" hidden$="[[!showNumber]]" hidden="">
+ <a href$="[[changeURL]]">[[change._number]]</a>
+ </td>
+ <td
+ class="cell subject"
+ hidden$="[[isColumnHidden('Subject', visibleChangeTableColumns)]]"
+ >
+ <div class="container">
+ <div class="content">
+ <a title$="[[change.subject]]" href$="[[changeURL]]">
+ [[change.subject]]
+ </a>
</div>
- </td>
- <td class="cell status" hidden\$="[[isColumnHidden('Status', visibleChangeTableColumns)]]">
- <template is="dom-repeat" items="[[statuses]]" as="status">
- <div class="comma">,</div>
- <gr-change-status flat="" status="[[status]]"></gr-change-status>
- </template>
- <template is="dom-if" if="[[!statuses.length]]">
- <span class="placeholder">--</span>
- </template>
- </td>
- <td class="cell owner" hidden\$="[[isColumnHidden('Owner', visibleChangeTableColumns)]]">
- <gr-account-link account="[[change.owner]]"></gr-account-link>
- </td>
- <td class="cell assignee" hidden\$="[[isColumnHidden('Assignee', visibleChangeTableColumns)]]">
- <template is="dom-if" if="[[change.assignee]]">
- <gr-account-link id="assigneeAccountLink" account="[[change.assignee]]"></gr-account-link>
- </template>
- <template is="dom-if" if="[[!change.assignee]]">
- <span class="placeholder">--</span>
- </template>
- </td>
- <td class="cell reviewers" hidden\$="[[isColumnHidden('Reviewers', visibleChangeTableColumns)]]">
- <div>
- <template is="dom-repeat" items="[[change.reviewers.REVIEWER]]" as="reviewer">
- <gr-account-link hide-avatar="" hide-status="" account="[[reviewer]]"></gr-account-link><!--
+ <div class="spacer">
+ [[change.subject]]
+ </div>
+ <span> </span>
+ </div>
+ </td>
+ <td
+ class="cell status"
+ hidden$="[[isColumnHidden('Status', visibleChangeTableColumns)]]"
+ >
+ <template is="dom-repeat" items="[[statuses]]" as="status">
+ <div class="comma">,</div>
+ <gr-change-status flat="" status="[[status]]"></gr-change-status>
+ </template>
+ <template is="dom-if" if="[[!statuses.length]]">
+ <span class="placeholder">--</span>
+ </template>
+ </td>
+ <td
+ class="cell owner"
+ hidden$="[[isColumnHidden('Owner', visibleChangeTableColumns)]]"
+ >
+ <gr-account-link account="[[change.owner]]"></gr-account-link>
+ </td>
+ <td
+ class="cell assignee"
+ hidden$="[[isColumnHidden('Assignee', visibleChangeTableColumns)]]"
+ >
+ <template is="dom-if" if="[[change.assignee]]">
+ <gr-account-link
+ id="assigneeAccountLink"
+ account="[[change.assignee]]"
+ ></gr-account-link>
+ </template>
+ <template is="dom-if" if="[[!change.assignee]]">
+ <span class="placeholder">--</span>
+ </template>
+ </td>
+ <td
+ class="cell reviewers"
+ hidden$="[[isColumnHidden('Reviewers', visibleChangeTableColumns)]]"
+ >
+ <div>
+ <template
+ is="dom-repeat"
+ items="[[change.reviewers.REVIEWER]]"
+ as="reviewer"
+ >
+ <gr-account-link
+ hide-avatar=""
+ hide-status=""
+ account="[[reviewer]]"
+ ></gr-account-link
+ ><!--
--><span class="lastChildHidden">, </span>
- </template>
- </div>
- </td>
- <td class="cell comments" hidden\$="[[isColumnHidden('Comments', visibleChangeTableColumns)]]">
- <iron-icon hidden\$="[[!change.unresolved_comment_count]]" icon="gr-icons:comment"></iron-icon>
- <span>[[_computeComments(change.unresolved_comment_count)]]</span>
- </td>
- <td class="cell repo" hidden\$="[[isColumnHidden('Repo', visibleChangeTableColumns)]]">
- <a class="fullRepo" href\$="[[_computeRepoUrl(change)]]">
- [[_computeRepoDisplay(change)]]
- </a>
- <a class="truncatedRepo" href\$="[[_computeRepoUrl(change)]]" title\$="[[_computeRepoDisplay(change)]]">
- [[_computeRepoDisplay(change, 'true')]]
- </a>
- </td>
- <td class="cell branch" hidden\$="[[isColumnHidden('Branch', visibleChangeTableColumns)]]">
- <a href\$="[[_computeRepoBranchURL(change)]]">
- [[change.branch]]
- </a>
- <template is="dom-if" if="[[change.topic]]">
- (<a href\$="[[_computeTopicURL(change)]]"><!--
- --><gr-limited-text limit="50" text="[[change.topic]]">
- </gr-limited-text><!--
- --></a>)
</template>
- </td>
- <td class="cell updated" hidden\$="[[isColumnHidden('Updated', visibleChangeTableColumns)]]">
- <gr-date-formatter has-tooltip="" date-str="[[change.updated]]"></gr-date-formatter>
- </td>
- <td class="cell size" hidden\$="[[isColumnHidden('Size', visibleChangeTableColumns)]]">
- <gr-tooltip-content has-tooltip="" title="[[_computeSizeTooltip(change)]]">
- <template is="dom-if" if="[[_changeSize]]">
- <span>[[_changeSize]]</span>
- </template>
- <template is="dom-if" if="[[!_changeSize]]">
- <span class="placeholder">--</span>
- </template>
- </gr-tooltip-content>
- </td>
- <template is="dom-repeat" items="[[labelNames]]" as="labelName">
- <td title\$="[[_computeLabelTitle(change, labelName)]]" class\$="[[_computeLabelClass(change, labelName)]]">
- [[_computeLabelValue(change, labelName)]]
- </td>
+ </div>
+ </td>
+ <td
+ class="cell comments"
+ hidden$="[[isColumnHidden('Comments', visibleChangeTableColumns)]]"
+ >
+ <iron-icon
+ hidden$="[[!change.unresolved_comment_count]]"
+ icon="gr-icons:comment"
+ ></iron-icon>
+ <span>[[_computeComments(change.unresolved_comment_count)]]</span>
+ </td>
+ <td
+ class="cell repo"
+ hidden$="[[isColumnHidden('Repo', visibleChangeTableColumns)]]"
+ >
+ <a class="fullRepo" href$="[[_computeRepoUrl(change)]]">
+ [[_computeRepoDisplay(change)]]
+ </a>
+ <a
+ class="truncatedRepo"
+ href$="[[_computeRepoUrl(change)]]"
+ title$="[[_computeRepoDisplay(change)]]"
+ >
+ [[_computeRepoDisplay(change, 'true')]]
+ </a>
+ </td>
+ <td
+ class="cell branch"
+ hidden$="[[isColumnHidden('Branch', visibleChangeTableColumns)]]"
+ >
+ <a href$="[[_computeRepoBranchURL(change)]]">
+ [[change.branch]]
+ </a>
+ <template is="dom-if" if="[[change.topic]]">
+ (<a href$="[[_computeTopicURL(change)]]"
+ ><!--
+ --><gr-limited-text limit="50" text="[[change.topic]]"> </gr-limited-text
+ ><!--
+ --></a
+ >)
</template>
- <template is="dom-repeat" items="[[_dynamicCellEndpoints]]" as="pluginEndpointName">
- <td class="cell endpoint">
- <gr-endpoint-decorator name\$="[[pluginEndpointName]]">
- <gr-endpoint-param name="change" value="[[change]]">
- </gr-endpoint-param>
- </gr-endpoint-decorator>
- </td>
- </template>
+ </td>
+ <td
+ class="cell updated"
+ hidden$="[[isColumnHidden('Updated', visibleChangeTableColumns)]]"
+ >
+ <gr-date-formatter
+ has-tooltip=""
+ date-str="[[change.updated]]"
+ ></gr-date-formatter>
+ </td>
+ <td
+ class="cell size"
+ hidden$="[[isColumnHidden('Size', visibleChangeTableColumns)]]"
+ >
+ <gr-tooltip-content has-tooltip="" title="[[_computeSizeTooltip(change)]]">
+ <template is="dom-if" if="[[_changeSize]]">
+ <span>[[_changeSize]]</span>
+ </template>
+ <template is="dom-if" if="[[!_changeSize]]">
+ <span class="placeholder">--</span>
+ </template>
+ </gr-tooltip-content>
+ </td>
+ <template is="dom-repeat" items="[[labelNames]]" as="labelName">
+ <td
+ title$="[[_computeLabelTitle(change, labelName)]]"
+ class$="[[_computeLabelClass(change, labelName)]]"
+ >
+ [[_computeLabelValue(change, labelName)]]
+ </td>
+ </template>
+ <template
+ is="dom-repeat"
+ items="[[_dynamicCellEndpoints]]"
+ as="pluginEndpointName"
+ >
+ <td class="cell endpoint">
+ <gr-endpoint-decorator name$="[[pluginEndpointName]]">
+ <gr-endpoint-param name="change" value="[[change]]">
+ </gr-endpoint-param>
+ </gr-endpoint-decorator>
+ </td>
+ </template>
`;
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view_html.js b/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view_html.js
index bed3985..4add1da 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view_html.js
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list-view/gr-change-list-view_html.js
@@ -17,61 +17,85 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ .loading {
+ color: var(--deemphasized-text-color);
+ padding: var(--spacing-l);
+ }
+ gr-change-list {
+ width: 100%;
+ }
+ gr-user-header,
+ gr-repo-header {
+ border-bottom: 1px solid var(--border-color);
+ }
+ nav {
+ align-items: center;
+ display: flex;
+ height: 3rem;
+ justify-content: flex-end;
+ margin-right: 20px;
+ }
+ nav,
+ iron-icon {
+ color: var(--deemphasized-text-color);
+ }
+ iron-icon {
+ height: 1.85rem;
+ margin-left: 16px;
+ width: 1.85rem;
+ }
+ .hide {
+ display: none;
+ }
+ @media only screen and (max-width: 50em) {
+ .loading,
+ .error {
+ padding: 0 var(--spacing-l);
}
- .loading {
- color: var(--deemphasized-text-color);
- padding: var(--spacing-l);
- }
- gr-change-list {
- width: 100%;
- }
- gr-user-header,
- gr-repo-header {
- border-bottom: 1px solid var(--border-color);
- }
- nav {
- align-items: center;
- display: flex;
- height: 3rem;
- justify-content: flex-end;
- margin-right: 20px;
- }
- nav,
- iron-icon {
- color: var(--deemphasized-text-color);
- }
- iron-icon {
- height: 1.85rem;
- margin-left: 16px;
- width: 1.85rem;
- }
- .hide {
- display: none;
- }
- @media only screen and (max-width: 50em) {
- .loading,
- .error {
- padding: 0 var(--spacing-l);
- }
- }
- </style>
- <div class="loading" hidden\$="[[!_loading]]" hidden="">Loading...</div>
- <div hidden\$="[[_loading]]" hidden="">
- <gr-repo-header repo="[[_repo]]" class\$="[[_computeHeaderClass(_repo)]]"></gr-repo-header>
- <gr-user-header user-id="[[_userId]]" show-dashboard-link="" logged-in="[[_loggedIn]]" class\$="[[_computeHeaderClass(_userId)]]"></gr-user-header>
- <gr-change-list account="[[account]]" changes="{{_changes}}" preferences="[[preferences]]" selected-index="{{viewState.selectedChangeIndex}}" show-star="[[_loggedIn]]" on-toggle-star="_handleToggleStar" on-toggle-reviewed="_handleToggleReviewed"></gr-change-list>
- <nav class\$="[[_computeNavClass(_loading)]]">
- Page [[_computePage(_offset, _changesPerPage)]]
- <a id="prevArrow" href\$="[[_computeNavLink(_query, _offset, -1, _changesPerPage)]]" class\$="[[_computePrevArrowClass(_offset)]]">
- <iron-icon icon="gr-icons:chevron-left"></iron-icon>
- </a>
- <a id="nextArrow" href\$="[[_computeNavLink(_query, _offset, 1, _changesPerPage)]]" class\$="[[_computeNextArrowClass(_changes)]]">
- <iron-icon icon="gr-icons:chevron-right"></iron-icon>
- </a>
- </nav>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ }
+ </style>
+ <div class="loading" hidden$="[[!_loading]]" hidden="">Loading...</div>
+ <div hidden$="[[_loading]]" hidden="">
+ <gr-repo-header
+ repo="[[_repo]]"
+ class$="[[_computeHeaderClass(_repo)]]"
+ ></gr-repo-header>
+ <gr-user-header
+ user-id="[[_userId]]"
+ show-dashboard-link=""
+ logged-in="[[_loggedIn]]"
+ class$="[[_computeHeaderClass(_userId)]]"
+ ></gr-user-header>
+ <gr-change-list
+ account="[[account]]"
+ changes="{{_changes}}"
+ preferences="[[preferences]]"
+ selected-index="{{viewState.selectedChangeIndex}}"
+ show-star="[[_loggedIn]]"
+ on-toggle-star="_handleToggleStar"
+ on-toggle-reviewed="_handleToggleReviewed"
+ ></gr-change-list>
+ <nav class$="[[_computeNavClass(_loading)]]">
+ Page [[_computePage(_offset, _changesPerPage)]]
+ <a
+ id="prevArrow"
+ href$="[[_computeNavLink(_query, _offset, -1, _changesPerPage)]]"
+ class$="[[_computePrevArrowClass(_offset)]]"
+ >
+ <iron-icon icon="gr-icons:chevron-left"></iron-icon>
+ </a>
+ <a
+ id="nextArrow"
+ href$="[[_computeNavLink(_query, _offset, 1, _changesPerPage)]]"
+ class$="[[_computeNextArrowClass(_changes)]]"
+ >
+ <iron-icon icon="gr-icons:chevron-right"></iron-icon>
+ </a>
+ </nav>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_html.js b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_html.js
index 3309fb2..17150df 100644
--- a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_html.js
+++ b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list_html.js
@@ -17,91 +17,129 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-change-list-styles">
- #changeList {
- border-collapse: collapse;
- width: 100%;
- }
- .section-count-label {
- color: var(--deemphasized-text-color);
- font-family: var(--font-family);
- font-size: var(--font-size-small);
- font-weight: var(--font-weight-normal);
- line-height: var(--line-height-small);
- }
- a.section-title:hover {
- text-decoration: none;
- }
- a.section-title:hover .section-count-label {
- text-decoration: none;
- }
- a.section-title:hover .section-name {
- text-decoration: underline;
- }
- </style>
- <table id="changeList">
- <template is="dom-repeat" items="[[sections]]" as="changeSection" index-as="sectionIndex">
- <template is="dom-if" if="[[changeSection.name]]">
- <tbody>
- <tr class="groupHeader">
- <td class="leftPadding"></td>
- <td class="star" hidden\$="[[!showStar]]" hidden=""></td>
- <td class="cell" colspan\$="[[_computeColspan(changeTableColumns, labelNames)]]">
- <a href\$="[[_sectionHref(changeSection.query)]]" class="section-title">
- <span class="section-name">[[changeSection.name]]</span>
- <span class="section-count-label">[[changeSection.countLabel]]</span>
- </a>
- </td>
- </tr>
- </tbody>
- </template>
- <tbody class="groupContent">
- <template is="dom-if" if="[[_isEmpty(changeSection)]]">
- <tr class="noChanges">
- <td class="leftPadding"></td>
- <td class="star" hidden\$="[[!showStar]]" hidden=""></td>
- <td class="cell" colspan\$="[[_computeColspan(changeTableColumns, labelNames)]]">
- <template is="dom-if" if="[[_isOutgoing(changeSection)]]">
- <slot name="empty-outgoing"></slot>
- </template>
- <template is="dom-if" if="[[!_isOutgoing(changeSection)]]">
- No changes
- </template>
- </td>
- </tr>
- </template>
- <template is="dom-if" if="[[!_isEmpty(changeSection)]]">
- <tr class="groupTitle">
- <td class="leftPadding"></td>
- <td class="star" hidden\$="[[!showStar]]" hidden=""></td>
- <td class="number" hidden\$="[[!showNumber]]" hidden="">#</td>
- <template is="dom-repeat" items="[[changeTableColumns]]" as="item">
- <td class\$="[[_lowerCase(item)]]" hidden\$="[[isColumnHidden(item, visibleChangeTableColumns)]]">
- [[item]]
- </td>
- </template>
- <template is="dom-repeat" items="[[labelNames]]" as="labelName">
- <td class="label" title\$="[[labelName]]">
- [[_computeLabelShortcut(labelName)]]
- </td>
- </template>
- <template is="dom-repeat" items="[[_dynamicHeaderEndpoints]]" as="pluginHeader">
- <td class="endpoint">
- <gr-endpoint-decorator name\$="[[pluginHeader]]">
- </gr-endpoint-decorator>
- </td>
- </template>
- </tr>
- </template>
- <template is="dom-repeat" items="[[changeSection.results]]" as="change">
- <gr-change-list-item selected\$="[[_computeItemSelected(sectionIndex, index, selectedIndex)]]" highlight\$="[[_computeItemHighlight(account, change)]]" needs-review\$="[[_computeItemNeedsReview(account, change, showReviewedState)]]" change="[[change]]" visible-change-table-columns="[[visibleChangeTableColumns]]" show-number="[[showNumber]]" show-star="[[showStar]]" tabindex="0" label-names="[[labelNames]]"></gr-change-list-item>
- </template>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-change-list-styles">
+ #changeList {
+ border-collapse: collapse;
+ width: 100%;
+ }
+ .section-count-label {
+ color: var(--deemphasized-text-color);
+ font-family: var(--font-family);
+ font-size: var(--font-size-small);
+ font-weight: var(--font-weight-normal);
+ line-height: var(--line-height-small);
+ }
+ a.section-title:hover {
+ text-decoration: none;
+ }
+ a.section-title:hover .section-count-label {
+ text-decoration: none;
+ }
+ a.section-title:hover .section-name {
+ text-decoration: underline;
+ }
+ </style>
+ <table id="changeList">
+ <template
+ is="dom-repeat"
+ items="[[sections]]"
+ as="changeSection"
+ index-as="sectionIndex"
+ >
+ <template is="dom-if" if="[[changeSection.name]]">
+ <tbody>
+ <tr class="groupHeader">
+ <td class="leftPadding"></td>
+ <td class="star" hidden$="[[!showStar]]" hidden=""></td>
+ <td
+ class="cell"
+ colspan$="[[_computeColspan(changeTableColumns, labelNames)]]"
+ >
+ <a
+ href$="[[_sectionHref(changeSection.query)]]"
+ class="section-title"
+ >
+ <span class="section-name">[[changeSection.name]]</span>
+ <span class="section-count-label"
+ >[[changeSection.countLabel]]</span
+ >
+ </a>
+ </td>
+ </tr>
</tbody>
</template>
- </table>
- <gr-cursor-manager id="cursor" index="{{selectedIndex}}" scroll-behavior="keep-visible" focus-on-move=""></gr-cursor-manager>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <tbody class="groupContent">
+ <template is="dom-if" if="[[_isEmpty(changeSection)]]">
+ <tr class="noChanges">
+ <td class="leftPadding"></td>
+ <td class="star" hidden$="[[!showStar]]" hidden=""></td>
+ <td
+ class="cell"
+ colspan$="[[_computeColspan(changeTableColumns, labelNames)]]"
+ >
+ <template is="dom-if" if="[[_isOutgoing(changeSection)]]">
+ <slot name="empty-outgoing"></slot>
+ </template>
+ <template is="dom-if" if="[[!_isOutgoing(changeSection)]]">
+ No changes
+ </template>
+ </td>
+ </tr>
+ </template>
+ <template is="dom-if" if="[[!_isEmpty(changeSection)]]">
+ <tr class="groupTitle">
+ <td class="leftPadding"></td>
+ <td class="star" hidden$="[[!showStar]]" hidden=""></td>
+ <td class="number" hidden$="[[!showNumber]]" hidden="">#</td>
+ <template is="dom-repeat" items="[[changeTableColumns]]" as="item">
+ <td
+ class$="[[_lowerCase(item)]]"
+ hidden$="[[isColumnHidden(item, visibleChangeTableColumns)]]"
+ >
+ [[item]]
+ </td>
+ </template>
+ <template is="dom-repeat" items="[[labelNames]]" as="labelName">
+ <td class="label" title$="[[labelName]]">
+ [[_computeLabelShortcut(labelName)]]
+ </td>
+ </template>
+ <template
+ is="dom-repeat"
+ items="[[_dynamicHeaderEndpoints]]"
+ as="pluginHeader"
+ >
+ <td class="endpoint">
+ <gr-endpoint-decorator name$="[[pluginHeader]]">
+ </gr-endpoint-decorator>
+ </td>
+ </template>
+ </tr>
+ </template>
+ <template is="dom-repeat" items="[[changeSection.results]]" as="change">
+ <gr-change-list-item
+ selected$="[[_computeItemSelected(sectionIndex, index, selectedIndex)]]"
+ highlight$="[[_computeItemHighlight(account, change)]]"
+ needs-review$="[[_computeItemNeedsReview(account, change, showReviewedState)]]"
+ change="[[change]]"
+ visible-change-table-columns="[[visibleChangeTableColumns]]"
+ show-number="[[showNumber]]"
+ show-star="[[showStar]]"
+ tabindex="0"
+ label-names="[[labelNames]]"
+ ></gr-change-list-item>
+ </template>
+ </tbody>
+ </template>
+ </table>
+ <gr-cursor-manager
+ id="cursor"
+ index="{{selectedIndex}}"
+ scroll-behavior="keep-visible"
+ focus-on-move=""
+ ></gr-cursor-manager>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change-list/gr-create-change-help/gr-create-change-help_html.js b/polygerrit-ui/app/elements/change-list/gr-create-change-help/gr-create-change-help_html.js
index f40bda7..4a357af 100644
--- a/polygerrit-ui/app/elements/change-list/gr-create-change-help/gr-create-change-help_html.js
+++ b/polygerrit-ui/app/elements/change-list/gr-create-change-help/gr-create-change-help_html.js
@@ -17,68 +17,68 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ #graphic,
+ #help {
+ display: inline-block;
+ margin: var(--spacing-m);
+ }
+ #graphic #circle {
+ align-items: center;
+ background-color: var(--chip-background-color);
+ border-radius: 50%;
+ display: flex;
+ height: 10em;
+ justify-content: center;
+ width: 10em;
+ }
+ #graphic iron-icon {
+ color: #9e9e9e;
+ height: 5em;
+ width: 5em;
+ }
+ #graphic p {
+ color: var(--deemphasized-text-color);
+ text-align: center;
+ }
+ #help {
+ padding-top: var(--spacing-xl);
+ vertical-align: top;
+ }
+ #help h1 {
+ font-family: var(--header-font-family);
+ font-size: var(--font-size-h3);
+ font-weight: var(--font-weight-h3);
+ line-height: var(--line-height-h3);
+ }
+ #help p {
+ margin-bottom: var(--spacing-m);
+ max-width: 35em;
+ }
+ @media only screen and (max-width: 50em) {
+ #graphic {
+ display: none;
}
- #graphic,
- #help {
- display: inline-block;
- margin: var(--spacing-m);
- }
- #graphic #circle {
- align-items: center;
- background-color: var(--chip-background-color);
- border-radius: 50%;
- display: flex;
- height: 10em;
- justify-content: center;
- width: 10em;
- }
- #graphic iron-icon {
- color: #9e9e9e;
- height: 5em;
- width: 5em;
- }
- #graphic p {
- color: var(--deemphasized-text-color);
- text-align: center;
- }
- #help {
- padding-top: var(--spacing-xl);
- vertical-align: top;
- }
- #help h1 {
- font-family: var(--header-font-family);
- font-size: var(--font-size-h3);
- font-weight: var(--font-weight-h3);
- line-height: var(--line-height-h3);
- }
- #help p {
- margin-bottom: var(--spacing-m);
- max-width: 35em;
- }
- @media only screen and (max-width: 50em) {
- #graphic {
- display: none;
- }
- }
- </style>
- <div id="graphic">
- <div id="circle">
- <iron-icon id="icon" icon="gr-icons:zeroState"></iron-icon>
- </div>
- <p>
- No outgoing changes yet
- </p>
+ }
+ </style>
+ <div id="graphic">
+ <div id="circle">
+ <iron-icon id="icon" icon="gr-icons:zeroState"></iron-icon>
</div>
- <div id="help">
- <h1>Push your first change for code review</h1>
- <p>
- Pushing a change for review is easy, but a little different from
- other git code review tools. Click on the \`Create Change' button
- and follow the step by step instructions.
- </p>
- <gr-button on-click="_handleCreateTap">Create Change</gr-button>
- </div>
+ <p>
+ No outgoing changes yet
+ </p>
+ </div>
+ <div id="help">
+ <h1>Push your first change for code review</h1>
+ <p>
+ Pushing a change for review is easy, but a little different from other git
+ code review tools. Click on the \`Create Change' button and follow the
+ step by step instructions.
+ </p>
+ <gr-button on-click="_handleCreateTap">Create Change</gr-button>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/change-list/gr-create-commands-dialog/gr-create-commands-dialog_html.js b/polygerrit-ui/app/elements/change-list/gr-create-commands-dialog/gr-create-commands-dialog_html.js
index aa13dca..d2a1af9 100644
--- a/polygerrit-ui/app/elements/change-list/gr-create-commands-dialog/gr-create-commands-dialog_html.js
+++ b/polygerrit-ui/app/elements/change-list/gr-create-commands-dialog/gr-create-commands-dialog_html.js
@@ -17,59 +17,69 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- ol {
- list-style: decimal;
- margin-left: var(--spacing-l);
- }
- p {
- margin-bottom: var(--spacing-m);
- }
- #commandsDialog {
- max-width: 40em;
- }
- </style>
- <gr-overlay id="commandsOverlay" with-backdrop="">
- <gr-dialog id="commandsDialog" confirm-label="Done" cancel-label="" confirm-on-enter="" on-confirm="_handleClose">
- <div class="header" slot="header">
- Create change commands
- </div>
- <div class="main" slot="main">
- <ol>
- <li>
- <p>
- Make the changes to the files on your machine
- </p>
- </li>
- <li>
- <p>
- If you are making a new commit use
- </p>
- <gr-shell-command command="[[_createNewCommitCommand]]"></gr-shell-command>
- <p>
- Or to amend an existing commit use
- </p>
- <gr-shell-command command="[[_amendExistingCommitCommand]]"></gr-shell-command>
- <p>
- Please make sure you add a commit message as it becomes the
- description for your change.
- </p>
- </li>
- <li>
- <p>
- Push the change for code review
- </p>
- <gr-shell-command command="[[_pushCommand]]"></gr-shell-command>
- </li>
- <li>
- <p>
- Close this dialog and you should be able to see your recently
- created change in the 'Outgoing changes' section on the
- 'Your changes' page.
- </p>
- </li>
- </ol>
- </div>
- </gr-dialog>
- </gr-overlay>
+ <style include="shared-styles">
+ ol {
+ list-style: decimal;
+ margin-left: var(--spacing-l);
+ }
+ p {
+ margin-bottom: var(--spacing-m);
+ }
+ #commandsDialog {
+ max-width: 40em;
+ }
+ </style>
+ <gr-overlay id="commandsOverlay" with-backdrop="">
+ <gr-dialog
+ id="commandsDialog"
+ confirm-label="Done"
+ cancel-label=""
+ confirm-on-enter=""
+ on-confirm="_handleClose"
+ >
+ <div class="header" slot="header">
+ Create change commands
+ </div>
+ <div class="main" slot="main">
+ <ol>
+ <li>
+ <p>
+ Make the changes to the files on your machine
+ </p>
+ </li>
+ <li>
+ <p>
+ If you are making a new commit use
+ </p>
+ <gr-shell-command
+ command="[[_createNewCommitCommand]]"
+ ></gr-shell-command>
+ <p>
+ Or to amend an existing commit use
+ </p>
+ <gr-shell-command
+ command="[[_amendExistingCommitCommand]]"
+ ></gr-shell-command>
+ <p>
+ Please make sure you add a commit message as it becomes the
+ description for your change.
+ </p>
+ </li>
+ <li>
+ <p>
+ Push the change for code review
+ </p>
+ <gr-shell-command command="[[_pushCommand]]"></gr-shell-command>
+ </li>
+ <li>
+ <p>
+ Close this dialog and you should be able to see your recently
+ created change in the 'Outgoing changes' section on the 'Your
+ changes' page.
+ </p>
+ </li>
+ </ol>
+ </div>
+ </gr-dialog>
+ </gr-overlay>
`;
diff --git a/polygerrit-ui/app/elements/change-list/gr-create-destination-dialog/gr-create-destination-dialog_html.js b/polygerrit-ui/app/elements/change-list/gr-create-destination-dialog/gr-create-destination-dialog_html.js
index 73f6ec0..c7cd647 100644
--- a/polygerrit-ui/app/elements/change-list/gr-create-destination-dialog/gr-create-destination-dialog_html.js
+++ b/polygerrit-ui/app/elements/change-list/gr-create-destination-dialog/gr-create-destination-dialog_html.js
@@ -17,19 +17,26 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- </style>
- <gr-overlay id="createOverlay" with-backdrop="">
- <gr-dialog confirm-label="View commands" on-confirm="_pickerConfirm" on-cancel="_handleClose" disabled="[[!_repoAndBranchSelected]]">
- <div class="header" slot="header">
- Create change
- </div>
- <div class="main" slot="main">
- <gr-repo-branch-picker repo="{{_repo}}" branch="{{_branch}}"></gr-repo-branch-picker>
- <p>
- If you haven't done so, you will need to clone the repository.
- </p>
- </div>
- </gr-dialog>
- </gr-overlay>
+ <style include="shared-styles"></style>
+ <gr-overlay id="createOverlay" with-backdrop="">
+ <gr-dialog
+ confirm-label="View commands"
+ on-confirm="_pickerConfirm"
+ on-cancel="_handleClose"
+ disabled="[[!_repoAndBranchSelected]]"
+ >
+ <div class="header" slot="header">
+ Create change
+ </div>
+ <div class="main" slot="main">
+ <gr-repo-branch-picker
+ repo="{{_repo}}"
+ branch="{{_branch}}"
+ ></gr-repo-branch-picker>
+ <p>
+ If you haven't done so, you will need to clone the repository.
+ </p>
+ </div>
+ </gr-dialog>
+ </gr-overlay>
`;
diff --git a/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view_html.js b/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view_html.js
index 07d638c..3389bd0 100644
--- a/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view_html.js
+++ b/polygerrit-ui/app/elements/change-list/gr-dashboard-view/gr-dashboard-view_html.js
@@ -17,81 +17,107 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ .loading {
+ color: var(--deemphasized-text-color);
+ padding: var(--spacing-l);
+ }
+ gr-change-list {
+ width: 100%;
+ }
+ gr-user-header {
+ border-bottom: 1px solid var(--border-color);
+ }
+ .banner {
+ align-items: center;
+ background-color: var(--comment-background-color);
+ border-bottom: 1px solid var(--border-color);
+ display: flex;
+ justify-content: space-between;
+ padding: var(--spacing-xs) var(--spacing-l);
+ }
+ .banner gr-button {
+ --gr-button: {
+ color: var(--primary-text-color);
}
+ }
+ .hide {
+ display: none;
+ }
+ #emptyOutgoing {
+ display: block;
+ }
+ @media only screen and (max-width: 50em) {
.loading {
- color: var(--deemphasized-text-color);
- padding: var(--spacing-l);
+ padding: 0 var(--spacing-l);
}
- gr-change-list {
- width: 100%;
- }
- gr-user-header {
- border-bottom: 1px solid var(--border-color);
- }
- .banner {
- align-items: center;
- background-color: var(--comment-background-color);
- border-bottom: 1px solid var(--border-color);
- display: flex;
- justify-content: space-between;
- padding: var(--spacing-xs) var(--spacing-l);
- }
- .banner gr-button {
- --gr-button: {
- color: var(--primary-text-color);
- }
- }
- .hide {
- display: none;
- }
- #emptyOutgoing {
- display: block;
- }
- @media only screen and (max-width: 50em) {
- .loading {
- padding: 0 var(--spacing-l);
- }
- }
- </style>
- <div class\$="banner [[_computeBannerClass(_showDraftsBanner)]]">
- <div>
- You have draft comments on closed changes.
- <a href\$="[[_computeDraftsLink(_showDraftsBanner)]]" target="_blank">(view all)</a>
- </div>
- <div>
- <gr-button class="delete" link="" on-click="_handleOpenDeleteDialog">Delete All</gr-button>
- </div>
+ }
+ </style>
+ <div class$="banner [[_computeBannerClass(_showDraftsBanner)]]">
+ <div>
+ You have draft comments on closed changes.
+ <a href$="[[_computeDraftsLink(_showDraftsBanner)]]" target="_blank"
+ >(view all)</a
+ >
</div>
- <div class="loading" hidden\$="[[!_loading]]">Loading...</div>
- <div hidden\$="[[_loading]]" hidden="">
- <gr-user-header user-id="[[params.user]]" class\$="[[_computeUserHeaderClass(params)]]"></gr-user-header>
- <gr-change-list show-star="" show-reviewed-state="" account="[[account]]" preferences="[[preferences]]" selected-index="{{viewState.selectedChangeIndex}}" sections="[[_results]]" on-toggle-star="_handleToggleStar" on-toggle-reviewed="_handleToggleReviewed">
- <div id="emptyOutgoing" slot="empty-outgoing">
- <template is="dom-if" if="[[_showNewUserHelp]]">
- <gr-create-change-help on-create-tap="createChangeTap"></gr-create-change-help>
- </template>
- <template is="dom-if" if="[[!_showNewUserHelp]]">
- No changes
- </template>
- </div>
- </gr-change-list>
+ <div>
+ <gr-button class="delete" link="" on-click="_handleOpenDeleteDialog"
+ >Delete All</gr-button
+ >
</div>
- <gr-overlay id="confirmDeleteOverlay" with-backdrop="">
- <gr-dialog id="confirmDeleteDialog" confirm-label="Delete" on-confirm="_handleConfirmDelete" on-cancel="_closeConfirmDeleteOverlay">
- <div class="header" slot="header">
- Delete comments
- </div>
- <div class="main" slot="main">
- Are you sure you want to delete all your draft comments in closed changes? This action
- cannot be undone.
- </div>
- </gr-dialog>
- </gr-overlay>
- <gr-create-destination-dialog id="destinationDialog" on-confirm="_handleDestinationConfirm"></gr-create-destination-dialog>
- <gr-create-commands-dialog id="commandsDialog"></gr-create-commands-dialog>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
- <gr-reporting id="reporting"></gr-reporting>
+ </div>
+ <div class="loading" hidden$="[[!_loading]]">Loading...</div>
+ <div hidden$="[[_loading]]" hidden="">
+ <gr-user-header
+ user-id="[[params.user]]"
+ class$="[[_computeUserHeaderClass(params)]]"
+ ></gr-user-header>
+ <gr-change-list
+ show-star=""
+ show-reviewed-state=""
+ account="[[account]]"
+ preferences="[[preferences]]"
+ selected-index="{{viewState.selectedChangeIndex}}"
+ sections="[[_results]]"
+ on-toggle-star="_handleToggleStar"
+ on-toggle-reviewed="_handleToggleReviewed"
+ >
+ <div id="emptyOutgoing" slot="empty-outgoing">
+ <template is="dom-if" if="[[_showNewUserHelp]]">
+ <gr-create-change-help
+ on-create-tap="createChangeTap"
+ ></gr-create-change-help>
+ </template>
+ <template is="dom-if" if="[[!_showNewUserHelp]]">
+ No changes
+ </template>
+ </div>
+ </gr-change-list>
+ </div>
+ <gr-overlay id="confirmDeleteOverlay" with-backdrop="">
+ <gr-dialog
+ id="confirmDeleteDialog"
+ confirm-label="Delete"
+ on-confirm="_handleConfirmDelete"
+ on-cancel="_closeConfirmDeleteOverlay"
+ >
+ <div class="header" slot="header">
+ Delete comments
+ </div>
+ <div class="main" slot="main">
+ Are you sure you want to delete all your draft comments in closed
+ changes? This action cannot be undone.
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ <gr-create-destination-dialog
+ id="destinationDialog"
+ on-confirm="_handleDestinationConfirm"
+ ></gr-create-destination-dialog>
+ <gr-create-commands-dialog id="commandsDialog"></gr-create-commands-dialog>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-reporting id="reporting"></gr-reporting>
`;
diff --git a/polygerrit-ui/app/elements/change-list/gr-embed-dashboard/gr-embed-dashboard_html.js b/polygerrit-ui/app/elements/change-list/gr-embed-dashboard/gr-embed-dashboard_html.js
index 2c122f3..802e365 100644
--- a/polygerrit-ui/app/elements/change-list/gr-embed-dashboard/gr-embed-dashboard_html.js
+++ b/polygerrit-ui/app/elements/change-list/gr-embed-dashboard/gr-embed-dashboard_html.js
@@ -17,14 +17,19 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <gr-change-list show-star="" account="[[account]]" preferences="[[preferences]]" sections="[[sections]]">
- <div id="emptyOutgoing" slot="empty-outgoing">
- <template is="dom-if" if="[[showNewUserHelp]]">
- <gr-create-change-help></gr-create-change-help>
- </template>
- <template is="dom-if" if="[[!showNewUserHelp]]">
- No changes
- </template>
- </div>
- </gr-change-list>
+ <gr-change-list
+ show-star=""
+ account="[[account]]"
+ preferences="[[preferences]]"
+ sections="[[sections]]"
+ >
+ <div id="emptyOutgoing" slot="empty-outgoing">
+ <template is="dom-if" if="[[showNewUserHelp]]">
+ <gr-create-change-help></gr-create-change-help>
+ </template>
+ <template is="dom-if" if="[[!showNewUserHelp]]">
+ No changes
+ </template>
+ </div>
+ </gr-change-list>
`;
diff --git a/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header_html.js b/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header_html.js
index d1274ee..f6fb1d0 100644
--- a/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header_html.js
+++ b/polygerrit-ui/app/elements/change-list/gr-repo-header/gr-repo-header_html.js
@@ -17,20 +17,18 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="dashboard-header-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <div class="info">
- <h1 class\$="name">
- [[repo]]
- <hr>
- </h1>
- <div>
- <span>Detail:</span> <a href\$="[[_repoUrl]]">Repo settings</a>
- </div>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="dashboard-header-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <div class="info">
+ <h1 class$="name">
+ [[repo]]
+ <hr />
+ </h1>
+ <div><span>Detail:</span> <a href$="[[_repoUrl]]">Repo settings</a></div>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header_html.js b/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header_html.js
index 3de4277..5a5d590 100644
--- a/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header_html.js
+++ b/polygerrit-ui/app/elements/change-list/gr-user-header/gr-user-header_html.js
@@ -17,52 +17,60 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="dashboard-header-styles">
- .name {
- display: inline-block;
- }
- .name hr {
- width: 100%;
- }
- .status.hide,
- .name.hide,
- .dashboardLink.hide {
- display: none;
- }
- </style>
- <gr-avatar account="[[_accountDetails]]" image-size="100" aria-label="Account avatar"></gr-avatar>
- <div class="info">
- <h1 class="name">
- [[_computeDetail(_accountDetails, 'name')]]
- </h1>
- <hr>
- <div class\$="status [[_computeStatusClass(_accountDetails)]]">
- <span>Status:</span> [[_status]]
- </div>
- <div>
- <span>Email:</span>
- <a href="mailto:[[_computeDetail(_accountDetails, 'email')]]"><!--
- -->[[_computeDetail(_accountDetails, 'email')]]</a>
- </div>
- <div>
- <span>Joined:</span>
- <gr-date-formatter date-str="[[_computeDetail(_accountDetails, 'registered_on')]]">
- </gr-date-formatter>
- </div>
- <gr-endpoint-decorator name="user-header">
- <gr-endpoint-param name="accountDetails" value="[[_accountDetails]]">
- </gr-endpoint-param>
- <gr-endpoint-param name="loggedIn" value="[[loggedIn]]">
- </gr-endpoint-param>
- </gr-endpoint-decorator>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="dashboard-header-styles">
+ .name {
+ display: inline-block;
+ }
+ .name hr {
+ width: 100%;
+ }
+ .status.hide,
+ .name.hide,
+ .dashboardLink.hide {
+ display: none;
+ }
+ </style>
+ <gr-avatar
+ account="[[_accountDetails]]"
+ image-size="100"
+ aria-label="Account avatar"
+ ></gr-avatar>
+ <div class="info">
+ <h1 class="name">
+ [[_computeDetail(_accountDetails, 'name')]]
+ </h1>
+ <hr />
+ <div class$="status [[_computeStatusClass(_accountDetails)]]">
+ <span>Status:</span> [[_status]]
</div>
- <div class="info">
- <div class\$="[[_computeDashboardLinkClass(showDashboardLink, loggedIn)]]">
- <a href\$="[[_computeDashboardUrl(_accountDetails)]]">View dashboard</a>
- </div>
+ <div>
+ <span>Email:</span>
+ <a href="mailto:[[_computeDetail(_accountDetails, 'email')]]"
+ ><!--
+ -->[[_computeDetail(_accountDetails, 'email')]]</a
+ >
</div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <div>
+ <span>Joined:</span>
+ <gr-date-formatter
+ date-str="[[_computeDetail(_accountDetails, 'registered_on')]]"
+ >
+ </gr-date-formatter>
+ </div>
+ <gr-endpoint-decorator name="user-header">
+ <gr-endpoint-param name="accountDetails" value="[[_accountDetails]]">
+ </gr-endpoint-param>
+ <gr-endpoint-param name="loggedIn" value="[[loggedIn]]">
+ </gr-endpoint-param>
+ </gr-endpoint-decorator>
+ </div>
+ <div class="info">
+ <div class$="[[_computeDashboardLinkClass(showDashboardLink, loggedIn)]]">
+ <a href$="[[_computeDashboardUrl(_accountDetails)]]">View dashboard</a>
+ </div>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_html.js b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_html.js
index b66beed..f12e600 100644
--- a/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_html.js
+++ b/polygerrit-ui/app/elements/change/gr-change-actions/gr-change-actions_html.js
@@ -17,124 +17,259 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: flex;
- font-family: var(--font-family);
+ <style include="shared-styles">
+ :host {
+ display: flex;
+ font-family: var(--font-family);
+ }
+ #actionLoadingMessage,
+ #mainContent,
+ section {
+ display: flex;
+ }
+ #actionLoadingMessage,
+ gr-button,
+ gr-dropdown {
+ /* px because don't have the same font size */
+ margin-left: 8px;
+ }
+ #actionLoadingMessage {
+ align-items: center;
+ color: var(--deemphasized-text-color);
+ }
+ #confirmSubmitDialog .changeSubject {
+ margin: var(--spacing-l);
+ text-align: center;
+ }
+ iron-icon {
+ color: inherit;
+ margin-right: var(--spacing-xs);
+ }
+ #moreActions iron-icon {
+ margin: 0;
+ }
+ #moreMessage,
+ .hidden {
+ display: none;
+ }
+ @media screen and (max-width: 50em) {
+ #mainContent {
+ flex-wrap: wrap;
}
- #actionLoadingMessage,
- #mainContent,
- section {
- display: flex;
+ gr-button {
+ --gr-button: {
+ padding: var(--spacing-m);
+ white-space: nowrap;
+ }
}
- #actionLoadingMessage,
gr-button,
gr-dropdown {
- /* px because don't have the same font size */
- margin-left: 8px;
- }
- #actionLoadingMessage {
- align-items: center;
- color: var(--deemphasized-text-color);
- }
- #confirmSubmitDialog .changeSubject {
- margin: var(--spacing-l);
- text-align: center;
- }
- iron-icon {
- color: inherit;
- margin-right: var(--spacing-xs);
- }
- #moreActions iron-icon {
margin: 0;
}
- #moreMessage,
- .hidden {
- display: none;
+ #actionLoadingMessage {
+ margin: var(--spacing-m);
+ text-align: center;
}
- @media screen and (max-width: 50em) {
- #mainContent {
- flex-wrap: wrap;
- }
- gr-button {
- --gr-button: {
- padding: var(--spacing-m);
- white-space: nowrap;
- }
- }
- gr-button,
- gr-dropdown {
- margin: 0;
- }
- #actionLoadingMessage {
- margin: var(--spacing-m);
- text-align: center;
- }
- #moreMessage {
- display: inline;
- }
+ #moreMessage {
+ display: inline;
}
- </style>
- <div id="mainContent">
- <span id="actionLoadingMessage" hidden\$="[[!_actionLoadingMessage]]">
- [[_actionLoadingMessage]]</span>
- <section id="primaryActions" hidden\$="[[_shouldHideActions(_topLevelActions.*, _loading)]]">
- <template is="dom-repeat" items="[[_topLevelPrimaryActions]]" as="action">
- <gr-button link="" title\$="[[action.title]]" has-tooltip="[[_computeHasTooltip(action.title)]]" position-below="true" data-action-key\$="[[action.__key]]" data-action-type\$="[[action.__type]]" data-label\$="[[action.label]]" disabled\$="[[_calculateDisabled(action, _hasKnownChainState)]]" on-click="_handleActionTap">
- <iron-icon class\$="[[_computeHasIcon(action)]]" icon\$="gr-icons:[[action.icon]]"></iron-icon>
- [[action.label]]
- </gr-button>
- </template>
- </section>
- <section id="secondaryActions" hidden\$="[[_shouldHideActions(_topLevelActions.*, _loading)]]">
- <template is="dom-repeat" items="[[_topLevelSecondaryActions]]" as="action">
- <gr-button link="" title\$="[[action.title]]" has-tooltip="[[_computeHasTooltip(action.title)]]" position-below="true" data-action-key\$="[[action.__key]]" data-action-type\$="[[action.__type]]" data-label\$="[[action.label]]" disabled\$="[[_calculateDisabled(action, _hasKnownChainState)]]" on-click="_handleActionTap">
- <iron-icon class\$="[[_computeHasIcon(action)]]" icon\$="gr-icons:[[action.icon]]"></iron-icon>
- [[action.label]]
- </gr-button>
- </template>
- </section>
- <gr-button hidden\$="[[!_loading]]" disabled="">Loading actions...</gr-button>
- <gr-dropdown id="moreActions" link="" tabindex="0" vertical-offset="32" horizontal-align="right" on-tap-item="_handleOveflowItemTap" hidden\$="[[_shouldHideActions(_menuActions.*, _loading)]]" disabled-ids="[[_disabledMenuActions]]" items="[[_menuActions]]">
- <iron-icon icon="gr-icons:more-vert"></iron-icon>
- <span id="moreMessage">More</span>
- </gr-dropdown>
- </div>
- <gr-overlay id="overlay" with-backdrop="">
- <gr-confirm-rebase-dialog id="confirmRebase" class="confirmDialog" change-number="[[change._number]]" on-confirm="_handleRebaseConfirm" on-cancel="_handleConfirmDialogCancel" branch="[[change.branch]]" has-parent="[[hasParent]]" rebase-on-current="[[_computeRebaseOnCurrent(_revisionRebaseAction)]]" hidden=""></gr-confirm-rebase-dialog>
- <gr-confirm-cherrypick-dialog id="confirmCherrypick" class="confirmDialog" change-status="[[changeStatus]]" commit-message="[[commitMessage]]" commit-num="[[commitNum]]" on-confirm="_handleCherrypickConfirm" on-cancel="_handleConfirmDialogCancel" project="[[change.project]]" hidden=""></gr-confirm-cherrypick-dialog>
- <gr-confirm-cherrypick-conflict-dialog id="confirmCherrypickConflict" class="confirmDialog" on-confirm="_handleCherrypickConflictConfirm" on-cancel="_handleConfirmDialogCancel" hidden=""></gr-confirm-cherrypick-conflict-dialog>
- <gr-confirm-move-dialog id="confirmMove" class="confirmDialog" on-confirm="_handleMoveConfirm" on-cancel="_handleConfirmDialogCancel" project="[[change.project]]" hidden=""></gr-confirm-move-dialog>
- <gr-confirm-revert-dialog id="confirmRevertDialog" class="confirmDialog" on-confirm="_handleRevertDialogConfirm" on-cancel="_handleConfirmDialogCancel" hidden=""></gr-confirm-revert-dialog>
- <gr-confirm-revert-submission-dialog id="confirmRevertSubmissionDialog" class="confirmDialog" commit-message="[[commitMessage]]" on-confirm="_handleRevertSubmissionDialogConfirm" on-cancel="_handleConfirmDialogCancel" hidden=""></gr-confirm-revert-submission-dialog>
- <gr-confirm-abandon-dialog id="confirmAbandonDialog" class="confirmDialog" on-confirm="_handleAbandonDialogConfirm" on-cancel="_handleConfirmDialogCancel" hidden=""></gr-confirm-abandon-dialog>
- <gr-confirm-submit-dialog id="confirmSubmitDialog" class="confirmDialog" change="[[change]]" action="[[_revisionSubmitAction]]" on-cancel="_handleConfirmDialogCancel" on-confirm="_handleSubmitConfirm" hidden=""></gr-confirm-submit-dialog>
- <gr-dialog id="createFollowUpDialog" class="confirmDialog" confirm-label="Create" on-confirm="_handleCreateFollowUpChange" on-cancel="_handleCloseCreateFollowUpChange">
- <div class="header" slot="header">
- Create Follow-Up Change
- </div>
- <div class="main" slot="main">
- <gr-create-change-dialog id="createFollowUpChange" branch="[[change.branch]]" base-change="[[change.id]]" repo-name="[[change.project]]" private-by-default="[[privateByDefault]]"></gr-create-change-dialog>
- </div>
- </gr-dialog>
- <gr-dialog id="confirmDeleteDialog" class="confirmDialog" confirm-label="Delete" confirm-on-enter="" on-cancel="_handleConfirmDialogCancel" on-confirm="_handleDeleteConfirm">
- <div class="header" slot="header">
- Delete Change
- </div>
- <div class="main" slot="main">
- Do you really want to delete the change?
- </div>
- </gr-dialog>
- <gr-dialog id="confirmDeleteEditDialog" class="confirmDialog" confirm-label="Delete" confirm-on-enter="" on-cancel="_handleConfirmDialogCancel" on-confirm="_handleDeleteEditConfirm">
- <div class="header" slot="header">
- Delete Change Edit
- </div>
- <div class="main" slot="main">
- Do you really want to delete the edit?
- </div>
- </gr-dialog>
- </gr-overlay>
- <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
- <gr-reporting id="reporting" category="change-actions"></gr-reporting>
+ }
+ </style>
+ <div id="mainContent">
+ <span id="actionLoadingMessage" hidden$="[[!_actionLoadingMessage]]">
+ [[_actionLoadingMessage]]</span
+ >
+ <section
+ id="primaryActions"
+ hidden$="[[_shouldHideActions(_topLevelActions.*, _loading)]]"
+ >
+ <template is="dom-repeat" items="[[_topLevelPrimaryActions]]" as="action">
+ <gr-button
+ link=""
+ title$="[[action.title]]"
+ has-tooltip="[[_computeHasTooltip(action.title)]]"
+ position-below="true"
+ data-action-key$="[[action.__key]]"
+ data-action-type$="[[action.__type]]"
+ data-label$="[[action.label]]"
+ disabled$="[[_calculateDisabled(action, _hasKnownChainState)]]"
+ on-click="_handleActionTap"
+ >
+ <iron-icon
+ class$="[[_computeHasIcon(action)]]"
+ icon$="gr-icons:[[action.icon]]"
+ ></iron-icon>
+ [[action.label]]
+ </gr-button>
+ </template>
+ </section>
+ <section
+ id="secondaryActions"
+ hidden$="[[_shouldHideActions(_topLevelActions.*, _loading)]]"
+ >
+ <template
+ is="dom-repeat"
+ items="[[_topLevelSecondaryActions]]"
+ as="action"
+ >
+ <gr-button
+ link=""
+ title$="[[action.title]]"
+ has-tooltip="[[_computeHasTooltip(action.title)]]"
+ position-below="true"
+ data-action-key$="[[action.__key]]"
+ data-action-type$="[[action.__type]]"
+ data-label$="[[action.label]]"
+ disabled$="[[_calculateDisabled(action, _hasKnownChainState)]]"
+ on-click="_handleActionTap"
+ >
+ <iron-icon
+ class$="[[_computeHasIcon(action)]]"
+ icon$="gr-icons:[[action.icon]]"
+ ></iron-icon>
+ [[action.label]]
+ </gr-button>
+ </template>
+ </section>
+ <gr-button hidden$="[[!_loading]]" disabled=""
+ >Loading actions...</gr-button
+ >
+ <gr-dropdown
+ id="moreActions"
+ link=""
+ tabindex="0"
+ vertical-offset="32"
+ horizontal-align="right"
+ on-tap-item="_handleOveflowItemTap"
+ hidden$="[[_shouldHideActions(_menuActions.*, _loading)]]"
+ disabled-ids="[[_disabledMenuActions]]"
+ items="[[_menuActions]]"
+ >
+ <iron-icon icon="gr-icons:more-vert"></iron-icon>
+ <span id="moreMessage">More</span>
+ </gr-dropdown>
+ </div>
+ <gr-overlay id="overlay" with-backdrop="">
+ <gr-confirm-rebase-dialog
+ id="confirmRebase"
+ class="confirmDialog"
+ change-number="[[change._number]]"
+ on-confirm="_handleRebaseConfirm"
+ on-cancel="_handleConfirmDialogCancel"
+ branch="[[change.branch]]"
+ has-parent="[[hasParent]]"
+ rebase-on-current="[[_computeRebaseOnCurrent(_revisionRebaseAction)]]"
+ hidden=""
+ ></gr-confirm-rebase-dialog>
+ <gr-confirm-cherrypick-dialog
+ id="confirmCherrypick"
+ class="confirmDialog"
+ change-status="[[changeStatus]]"
+ commit-message="[[commitMessage]]"
+ commit-num="[[commitNum]]"
+ on-confirm="_handleCherrypickConfirm"
+ on-cancel="_handleConfirmDialogCancel"
+ project="[[change.project]]"
+ hidden=""
+ ></gr-confirm-cherrypick-dialog>
+ <gr-confirm-cherrypick-conflict-dialog
+ id="confirmCherrypickConflict"
+ class="confirmDialog"
+ on-confirm="_handleCherrypickConflictConfirm"
+ on-cancel="_handleConfirmDialogCancel"
+ hidden=""
+ ></gr-confirm-cherrypick-conflict-dialog>
+ <gr-confirm-move-dialog
+ id="confirmMove"
+ class="confirmDialog"
+ on-confirm="_handleMoveConfirm"
+ on-cancel="_handleConfirmDialogCancel"
+ project="[[change.project]]"
+ hidden=""
+ ></gr-confirm-move-dialog>
+ <gr-confirm-revert-dialog
+ id="confirmRevertDialog"
+ class="confirmDialog"
+ on-confirm="_handleRevertDialogConfirm"
+ on-cancel="_handleConfirmDialogCancel"
+ hidden=""
+ ></gr-confirm-revert-dialog>
+ <gr-confirm-revert-submission-dialog
+ id="confirmRevertSubmissionDialog"
+ class="confirmDialog"
+ commit-message="[[commitMessage]]"
+ on-confirm="_handleRevertSubmissionDialogConfirm"
+ on-cancel="_handleConfirmDialogCancel"
+ hidden=""
+ ></gr-confirm-revert-submission-dialog>
+ <gr-confirm-abandon-dialog
+ id="confirmAbandonDialog"
+ class="confirmDialog"
+ on-confirm="_handleAbandonDialogConfirm"
+ on-cancel="_handleConfirmDialogCancel"
+ hidden=""
+ ></gr-confirm-abandon-dialog>
+ <gr-confirm-submit-dialog
+ id="confirmSubmitDialog"
+ class="confirmDialog"
+ change="[[change]]"
+ action="[[_revisionSubmitAction]]"
+ on-cancel="_handleConfirmDialogCancel"
+ on-confirm="_handleSubmitConfirm"
+ hidden=""
+ ></gr-confirm-submit-dialog>
+ <gr-dialog
+ id="createFollowUpDialog"
+ class="confirmDialog"
+ confirm-label="Create"
+ on-confirm="_handleCreateFollowUpChange"
+ on-cancel="_handleCloseCreateFollowUpChange"
+ >
+ <div class="header" slot="header">
+ Create Follow-Up Change
+ </div>
+ <div class="main" slot="main">
+ <gr-create-change-dialog
+ id="createFollowUpChange"
+ branch="[[change.branch]]"
+ base-change="[[change.id]]"
+ repo-name="[[change.project]]"
+ private-by-default="[[privateByDefault]]"
+ ></gr-create-change-dialog>
+ </div>
+ </gr-dialog>
+ <gr-dialog
+ id="confirmDeleteDialog"
+ class="confirmDialog"
+ confirm-label="Delete"
+ confirm-on-enter=""
+ on-cancel="_handleConfirmDialogCancel"
+ on-confirm="_handleDeleteConfirm"
+ >
+ <div class="header" slot="header">
+ Delete Change
+ </div>
+ <div class="main" slot="main">
+ Do you really want to delete the change?
+ </div>
+ </gr-dialog>
+ <gr-dialog
+ id="confirmDeleteEditDialog"
+ class="confirmDialog"
+ confirm-label="Delete"
+ confirm-on-enter=""
+ on-cancel="_handleConfirmDialogCancel"
+ on-confirm="_handleDeleteEditConfirm"
+ >
+ <div class="header" slot="header">
+ Delete Change Edit
+ </div>
+ <div class="main" slot="main">
+ Do you really want to delete the edit?
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-reporting id="reporting" category="change-actions"></gr-reporting>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_html.js b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_html.js
index 4de3128..8f6c02b 100644
--- a/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_html.js
+++ b/polygerrit-ui/app/elements/change/gr-change-metadata/gr-change-metadata_html.js
@@ -17,239 +17,349 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="gr-change-metadata-shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="shared-styles">
- :host {
- display: table;
- --account-max-length: 20ch;
- }
- gr-change-requirements {
- --requirements-horizontal-padding: var(--metadata-horizontal-padding);
- }
- gr-editable-label {
- max-width: 9em;
- }
- .webLink {
- display: block;
- }
- /* CSS Mixins should be applied last. */
- section.assignee {
- @apply --change-metadata-assignee;
- }
- section.strategy {
- @apply --change-metadata-strategy;
- }
- section.topic {
- @apply --change-metadata-topic;
- }
- gr-account-chip[disabled],
- gr-linked-chip[disabled] {
- opacity: 0;
- pointer-events: none;
- }
- .hashtagChip {
- margin-bottom: var(--spacing-m);
- }
- #externalStyle {
- display: block;
- }
- .parentList.merge {
- list-style-type: decimal;
- padding-left: var(--spacing-l);
- }
- .parentList gr-commit-info {
- display: inline-block;
- }
- .hideDisplay,
- #parentNotCurrentMessage {
- display: none;
- }
- .icon {
- margin: -3px 0;
- }
- .icon.help,
- .icon.notTrusted {
- color: #FFA62F;
- }
- .icon.invalid {
- color: var(--vote-text-color-disliked);
- }
- .icon.trusted {
- color: var(--vote-text-color-recommended);
- }
- .parentList.notCurrent.nonMerge #parentNotCurrentMessage {
- --arrow-color: #ffa62f;
- display: inline-block;
- }
- .separatedSection {
- margin-top: var(--spacing-l);
- padding: var(--spacing-m) 0;
- }
- .hashtag gr-linked-chip,
- .topic gr-linked-chip {
- --linked-chip-text-color: var(--link-color);
- }
- gr-reviewer-list {
- max-width: 200px;
- }
- </style>
- <gr-external-style id="externalStyle" name="change-metadata">
- <section>
- <span class="title">Updated</span>
+ <style include="gr-change-metadata-shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="shared-styles">
+ :host {
+ display: table;
+ --account-max-length: 20ch;
+ }
+ gr-change-requirements {
+ --requirements-horizontal-padding: var(--metadata-horizontal-padding);
+ }
+ gr-editable-label {
+ max-width: 9em;
+ }
+ .webLink {
+ display: block;
+ }
+ /* CSS Mixins should be applied last. */
+ section.assignee {
+ @apply --change-metadata-assignee;
+ }
+ section.strategy {
+ @apply --change-metadata-strategy;
+ }
+ section.topic {
+ @apply --change-metadata-topic;
+ }
+ gr-account-chip[disabled],
+ gr-linked-chip[disabled] {
+ opacity: 0;
+ pointer-events: none;
+ }
+ .hashtagChip {
+ margin-bottom: var(--spacing-m);
+ }
+ #externalStyle {
+ display: block;
+ }
+ .parentList.merge {
+ list-style-type: decimal;
+ padding-left: var(--spacing-l);
+ }
+ .parentList gr-commit-info {
+ display: inline-block;
+ }
+ .hideDisplay,
+ #parentNotCurrentMessage {
+ display: none;
+ }
+ .icon {
+ margin: -3px 0;
+ }
+ .icon.help,
+ .icon.notTrusted {
+ color: #ffa62f;
+ }
+ .icon.invalid {
+ color: var(--vote-text-color-disliked);
+ }
+ .icon.trusted {
+ color: var(--vote-text-color-recommended);
+ }
+ .parentList.notCurrent.nonMerge #parentNotCurrentMessage {
+ --arrow-color: #ffa62f;
+ display: inline-block;
+ }
+ .separatedSection {
+ margin-top: var(--spacing-l);
+ padding: var(--spacing-m) 0;
+ }
+ .hashtag gr-linked-chip,
+ .topic gr-linked-chip {
+ --linked-chip-text-color: var(--link-color);
+ }
+ gr-reviewer-list {
+ max-width: 200px;
+ }
+ </style>
+ <gr-external-style id="externalStyle" name="change-metadata">
+ <section>
+ <span class="title">Updated</span>
+ <span class="value">
+ <gr-date-formatter
+ has-tooltip=""
+ date-str="[[change.updated]]"
+ ></gr-date-formatter>
+ </span>
+ </section>
+ <section>
+ <span class="title">Owner</span>
+ <span class="value">
+ <gr-account-link account="[[change.owner]]"></gr-account-link>
+ <template is="dom-if" if="[[_pushCertificateValidation]]">
+ <gr-tooltip-content
+ has-tooltip=""
+ title$="[[_pushCertificateValidation.message]]"
+ >
+ <iron-icon
+ class$="icon [[_pushCertificateValidation.class]]"
+ icon="[[_pushCertificateValidation.icon]]"
+ >
+ </iron-icon>
+ </gr-tooltip-content>
+ </template>
+ </span>
+ </section>
+ <section class$="[[_computeShowRoleClass(change, _CHANGE_ROLE.UPLOADER)]]">
+ <span class="title">Uploader</span>
+ <span class="value">
+ <gr-account-link
+ account="[[_getNonOwnerRole(change, _CHANGE_ROLE.UPLOADER)]]"
+ ></gr-account-link>
+ </span>
+ </section>
+ <section class$="[[_computeShowRoleClass(change, _CHANGE_ROLE.AUTHOR)]]">
+ <span class="title">Author</span>
+ <span class="value">
+ <gr-account-link
+ account="[[_getNonOwnerRole(change, _CHANGE_ROLE.AUTHOR)]]"
+ ></gr-account-link>
+ </span>
+ </section>
+ <section class$="[[_computeShowRoleClass(change, _CHANGE_ROLE.COMMITTER)]]">
+ <span class="title">Committer</span>
+ <span class="value">
+ <gr-account-link
+ account="[[_getNonOwnerRole(change, _CHANGE_ROLE.COMMITTER)]]"
+ ></gr-account-link>
+ </span>
+ </section>
+ <template is="dom-if" if="[[_isAssigneeEnabled(serverConfig)]]">
+ <section class="assignee">
+ <span class="title">Assignee</span>
<span class="value">
- <gr-date-formatter has-tooltip="" date-str="[[change.updated]]"></gr-date-formatter>
+ <gr-account-list
+ id="assigneeValue"
+ placeholder="Set assignee..."
+ max-count="1"
+ skip-suggest-on-empty=""
+ accounts="{{_assignee}}"
+ readonly="[[_computeAssigneeReadOnly(_mutable, change)]]"
+ suggestions-provider="[[_getReviewerSuggestionsProvider(change)]]"
+ >
+ </gr-account-list>
+ </span>
+ </section>
+ </template>
+ <section>
+ <span class="title">Reviewers</span>
+ <span class="value">
+ <gr-reviewer-list
+ change="{{change}}"
+ mutable="[[_mutable]]"
+ reviewers-only=""
+ server-config="[[serverConfig]]"
+ ></gr-reviewer-list>
+ </span>
+ </section>
+ <section>
+ <span class="title">CC</span>
+ <span class="value">
+ <gr-reviewer-list
+ change="{{change}}"
+ mutable="[[_mutable]]"
+ ccs-only=""
+ server-config="[[serverConfig]]"
+ ></gr-reviewer-list>
+ </span>
+ </section>
+ <template
+ is="dom-if"
+ if="[[_computeShowRepoBranchTogether(change.project, change.branch)]]"
+ >
+ <section>
+ <span class="title">Repo / Branch</span>
+ <span class="value">
+ <a href$="[[_computeProjectUrl(change.project)]]"
+ >[[change.project]]</a
+ >
+ /
+ <a href$="[[_computeBranchUrl(change.project, change.branch)]]"
+ >[[change.branch]]</a
+ >
+ </span>
+ </section>
+ </template>
+ <template
+ is="dom-if"
+ if="[[!_computeShowRepoBranchTogether(change.project, change.branch)]]"
+ >
+ <section>
+ <span class="title">Repo</span>
+ <span class="value">
+ <a href$="[[_computeProjectUrl(change.project)]]">
+ <gr-limited-text
+ limit="40"
+ text="[[change.project]]"
+ ></gr-limited-text>
+ </a>
</span>
</section>
<section>
- <span class="title">Owner</span>
+ <span class="title">Branch</span>
<span class="value">
- <gr-account-link account="[[change.owner]]"></gr-account-link>
- <template is="dom-if" if="[[_pushCertificateValidation]]">
- <gr-tooltip-content has-tooltip="" title\$="[[_pushCertificateValidation.message]]">
- <iron-icon class\$="icon [[_pushCertificateValidation.class]]" icon="[[_pushCertificateValidation.icon]]">
- </iron-icon>
- </gr-tooltip-content>
+ <a href$="[[_computeBranchUrl(change.project, change.branch)]]">
+ <gr-limited-text
+ limit="40"
+ text="[[change.branch]]"
+ ></gr-limited-text>
+ </a>
+ </span>
+ </section>
+ </template>
+ <section>
+ <span class="title">[[_computeParentsLabel(_currentParents)]]</span>
+ <span class="value">
+ <ol
+ class$="[[_computeParentListClass(_currentParents, parentIsCurrent)]]"
+ >
+ <template is="dom-repeat" items="[[_currentParents]]" as="parent">
+ <li>
+ <gr-commit-info
+ change="[[change]]"
+ commit-info="[[parent]]"
+ server-config="[[serverConfig]]"
+ ></gr-commit-info>
+ <gr-tooltip-content
+ id="parentNotCurrentMessage"
+ has-tooltip=""
+ show-icon=""
+ title$="[[_notCurrentMessage]]"
+ ></gr-tooltip-content>
+ </li>
</template>
- </span>
- </section>
- <section class\$="[[_computeShowRoleClass(change, _CHANGE_ROLE.UPLOADER)]]">
- <span class="title">Uploader</span>
- <span class="value">
- <gr-account-link account="[[_getNonOwnerRole(change, _CHANGE_ROLE.UPLOADER)]]"></gr-account-link>
- </span>
- </section>
- <section class\$="[[_computeShowRoleClass(change, _CHANGE_ROLE.AUTHOR)]]">
- <span class="title">Author</span>
- <span class="value">
- <gr-account-link account="[[_getNonOwnerRole(change, _CHANGE_ROLE.AUTHOR)]]"></gr-account-link>
- </span>
- </section>
- <section class\$="[[_computeShowRoleClass(change, _CHANGE_ROLE.COMMITTER)]]">
- <span class="title">Committer</span>
- <span class="value">
- <gr-account-link account="[[_getNonOwnerRole(change, _CHANGE_ROLE.COMMITTER)]]"></gr-account-link>
- </span>
- </section>
- <template is="dom-if" if="[[_isAssigneeEnabled(serverConfig)]]">
- <section class="assignee">
- <span class="title">Assignee</span>
- <span class="value">
- <gr-account-list id="assigneeValue" placeholder="Set assignee..." max-count="1" skip-suggest-on-empty="" accounts="{{_assignee}}" readonly="[[_computeAssigneeReadOnly(_mutable, change)]]" suggestions-provider="[[_getReviewerSuggestionsProvider(change)]]">
- </gr-account-list>
- </span>
- </section>
- </template>
+ </ol>
+ </span>
+ </section>
+ <section class="topic">
+ <span class="title">Topic</span>
+ <span class="value">
+ <template is="dom-if" if="[[_showTopicChip(change.*, _settingTopic)]]">
+ <gr-linked-chip
+ text="[[change.topic]]"
+ limit="40"
+ href="[[_computeTopicUrl(change.topic)]]"
+ removable="[[!_topicReadOnly]]"
+ on-remove="_handleTopicRemoved"
+ ></gr-linked-chip>
+ </template>
+ <template is="dom-if" if="[[_showAddTopic(change.*, _settingTopic)]]">
+ <gr-editable-label
+ class="topicEditableLabel"
+ label-text="Add a topic"
+ value="[[change.topic]]"
+ max-length="1024"
+ placeholder="[[_computeTopicPlaceholder(_topicReadOnly)]]"
+ read-only="[[_topicReadOnly]]"
+ on-changed="_handleTopicChanged"
+ ></gr-editable-label>
+ </template>
+ </span>
+ </section>
+ <template is="dom-if" if="[[_showCherryPickOf(change.*)]]">
<section>
- <span class="title">Reviewers</span>
+ <span class="title">Cherry pick of</span>
<span class="value">
- <gr-reviewer-list change="{{change}}" mutable="[[_mutable]]" reviewers-only="" server-config="[[serverConfig]]"></gr-reviewer-list>
+ <a
+ href$="[[_computeCherryPickOfUrl(change.cherry_pick_of_change, change.cherry_pick_of_patch_set, change.project)]]"
+ >
+ <gr-limited-text
+ text="[[change.cherry_pick_of_change]],[[change.cherry_pick_of_patch_set]]"
+ limit="40"
+ >
+ </gr-limited-text>
+ </a>
</span>
</section>
- <section>
- <span class="title">CC</span>
- <span class="value">
- <gr-reviewer-list change="{{change}}" mutable="[[_mutable]]" ccs-only="" server-config="[[serverConfig]]"></gr-reviewer-list>
- </span>
- </section>
- <template is="dom-if" if="[[_computeShowRepoBranchTogether(change.project, change.branch)]]">
- <section>
- <span class="title">Repo / Branch</span>
- <span class="value">
- <a href\$="[[_computeProjectUrl(change.project)]]">[[change.project]]</a>
- /
- <a href\$="[[_computeBranchUrl(change.project, change.branch)]]">[[change.branch]]</a>
- </span>
- </section>
- </template>
- <template is="dom-if" if="[[!_computeShowRepoBranchTogether(change.project, change.branch)]]">
- <section>
- <span class="title">Repo</span>
- <span class="value">
- <a href\$="[[_computeProjectUrl(change.project)]]">
- <gr-limited-text limit="40" text="[[change.project]]"></gr-limited-text>
- </a>
- </span>
- </section>
- <section>
- <span class="title">Branch</span>
- <span class="value">
- <a href\$="[[_computeBranchUrl(change.project, change.branch)]]">
- <gr-limited-text limit="40" text="[[change.branch]]"></gr-limited-text>
- </a>
- </span>
- </section>
- </template>
- <section>
- <span class="title">[[_computeParentsLabel(_currentParents)]]</span>
- <span class="value">
- <ol class\$="[[_computeParentListClass(_currentParents, parentIsCurrent)]]">
- <template is="dom-repeat" items="[[_currentParents]]" as="parent">
- <li>
- <gr-commit-info change="[[change]]" commit-info="[[parent]]" server-config="[[serverConfig]]"></gr-commit-info>
- <gr-tooltip-content id="parentNotCurrentMessage" has-tooltip="" show-icon="" title\$="[[_notCurrentMessage]]"></gr-tooltip-content>
- </li>
- </template>
- </ol>
- </span>
- </section>
- <section class="topic">
- <span class="title">Topic</span>
- <span class="value">
- <template is="dom-if" if="[[_showTopicChip(change.*, _settingTopic)]]">
- <gr-linked-chip text="[[change.topic]]" limit="40" href="[[_computeTopicUrl(change.topic)]]" removable="[[!_topicReadOnly]]" on-remove="_handleTopicRemoved"></gr-linked-chip>
- </template>
- <template is="dom-if" if="[[_showAddTopic(change.*, _settingTopic)]]">
- <gr-editable-label class="topicEditableLabel" label-text="Add a topic" value="[[change.topic]]" max-length="1024" placeholder="[[_computeTopicPlaceholder(_topicReadOnly)]]" read-only="[[_topicReadOnly]]" on-changed="_handleTopicChanged"></gr-editable-label>
- </template>
- </span>
- </section>
- <template is="dom-if" if="[[_showCherryPickOf(change.*)]]">
- <section>
- <span class="title">Cherry pick of</span>
- <span class="value">
- <a href\$="[[_computeCherryPickOfUrl(change.cherry_pick_of_change, change.cherry_pick_of_patch_set, change.project)]]">
- <gr-limited-text text="[[change.cherry_pick_of_change]],[[change.cherry_pick_of_patch_set]]" limit="40">
- </gr-limited-text>
- </a>
- </span>
- </section>
- </template>
- <section class="strategy" hidden\$="[[_computeHideStrategy(change)]]" hidden="">
- <span class="title">Strategy</span>
- <span class="value">[[_computeStrategy(change)]]</span>
- </section>
- <section class="hashtag">
- <span class="title">Hashtags</span>
- <span class="value">
- <template is="dom-repeat" items="[[change.hashtags]]">
- <gr-linked-chip class="hashtagChip" text="[[item]]" href="[[_computeHashtagUrl(item)]]" removable="[[!_hashtagReadOnly]]" on-remove="_handleHashtagRemoved">
- </gr-linked-chip>
- </template>
- <template is="dom-if" if="[[!_hashtagReadOnly]]">
- <gr-editable-label uppercase="" label-text="Add a hashtag" value="{{_newHashtag}}" placeholder="[[_computeHashtagPlaceholder(_hashtagReadOnly)]]" read-only="[[_hashtagReadOnly]]" on-changed="_handleHashtagChanged"></gr-editable-label>
- </template>
- </span>
- </section>
- <div class="separatedSection">
- <gr-change-requirements change="{{change}}" account="[[account]]" mutable="[[_mutable]]"></gr-change-requirements>
- </div>
- <section id="webLinks" hidden\$="[[!_computeWebLinks(commitInfo, serverConfig)]]">
- <span class="title">Links</span>
- <span class="value">
- <template is="dom-repeat" items="[[_computeWebLinks(commitInfo, serverConfig)]]" as="link">
- <a href="[[link.url]]" class="webLink" rel="noopener" target="_blank">
- [[link.name]]
- </a>
- </template>
- </span>
- </section>
- <gr-endpoint-decorator name="change-metadata-item">
- <gr-endpoint-param name="labels" value="[[labels]]"></gr-endpoint-param>
- <gr-endpoint-param name="change" value="[[change]]"></gr-endpoint-param>
- <gr-endpoint-param name="revision" value="[[revision]]"></gr-endpoint-param>
- </gr-endpoint-decorator>
- </gr-external-style>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </template>
+ <section
+ class="strategy"
+ hidden$="[[_computeHideStrategy(change)]]"
+ hidden=""
+ >
+ <span class="title">Strategy</span>
+ <span class="value">[[_computeStrategy(change)]]</span>
+ </section>
+ <section class="hashtag">
+ <span class="title">Hashtags</span>
+ <span class="value">
+ <template is="dom-repeat" items="[[change.hashtags]]">
+ <gr-linked-chip
+ class="hashtagChip"
+ text="[[item]]"
+ href="[[_computeHashtagUrl(item)]]"
+ removable="[[!_hashtagReadOnly]]"
+ on-remove="_handleHashtagRemoved"
+ >
+ </gr-linked-chip>
+ </template>
+ <template is="dom-if" if="[[!_hashtagReadOnly]]">
+ <gr-editable-label
+ uppercase=""
+ label-text="Add a hashtag"
+ value="{{_newHashtag}}"
+ placeholder="[[_computeHashtagPlaceholder(_hashtagReadOnly)]]"
+ read-only="[[_hashtagReadOnly]]"
+ on-changed="_handleHashtagChanged"
+ ></gr-editable-label>
+ </template>
+ </span>
+ </section>
+ <div class="separatedSection">
+ <gr-change-requirements
+ change="{{change}}"
+ account="[[account]]"
+ mutable="[[_mutable]]"
+ ></gr-change-requirements>
+ </div>
+ <section
+ id="webLinks"
+ hidden$="[[!_computeWebLinks(commitInfo, serverConfig)]]"
+ >
+ <span class="title">Links</span>
+ <span class="value">
+ <template
+ is="dom-repeat"
+ items="[[_computeWebLinks(commitInfo, serverConfig)]]"
+ as="link"
+ >
+ <a href="[[link.url]]" class="webLink" rel="noopener" target="_blank">
+ [[link.name]]
+ </a>
+ </template>
+ </span>
+ </section>
+ <gr-endpoint-decorator name="change-metadata-item">
+ <gr-endpoint-param name="labels" value="[[labels]]"></gr-endpoint-param>
+ <gr-endpoint-param name="change" value="[[change]]"></gr-endpoint-param>
+ <gr-endpoint-param
+ name="revision"
+ value="[[revision]]"
+ ></gr-endpoint-param>
+ </gr-endpoint-decorator>
+ </gr-external-style>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements_html.js b/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements_html.js
index 311cfe4..0da31de 100644
--- a/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements_html.js
+++ b/polygerrit-ui/app/elements/change/gr-change-requirements/gr-change-requirements_html.js
@@ -17,121 +17,159 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: table;
- width: 100%;
- }
- .status {
- color: #FFA62F;
- display: inline-block;
- text-align: center;
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-mono);
- line-height: var(--line-height-mono);
- }
- .approved.status {
- color: var(--vote-text-color-recommended);
- }
- .rejected.status {
- color: var(--vote-text-color-disliked);
- }
- iron-icon {
- color: inherit;
- }
- .status iron-icon {
- vertical-align: top;
- }
- section {
- display: table-row;
- }
- .show-hide {
- float: right;
- }
- .title {
- min-width: 10em;
- padding: var(--spacing-s) var(--spacing-m) 0 var(--requirements-horizontal-padding);
- }
- .value {
- padding: var(--spacing-s) 0 0 0;
- }
- .title,
- .value {
- display: table-cell;
- vertical-align: top;
- }
- .hidden {
- display: none;
- }
- .showHide {
- cursor: pointer;
- }
- .showHide .title {
- padding-bottom: var(--spacing-m);
- padding-top: var(--spacing-l);
- }
- .showHide .value {
- padding-top: 0;
- vertical-align: middle;
- }
- .showHide iron-icon {
- color: var(--deemphasized-text-color);
- float: right;
- }
- .spacer {
- height: var(--spacing-m);
- }
- </style>
- <template is="dom-repeat" items="[[_requirements]]">
- <section>
- <div class="title requirement">
- <span class\$="status [[item.style]]">
- <iron-icon class="icon" icon="[[_computeRequirementIcon(item.satisfied)]]"></iron-icon>
- </span>
- <gr-limited-text class="name" limit="40" text="[[item.fallback_text]]"></gr-limited-text>
- </div>
- </section>
- </template>
- <template is="dom-repeat" items="[[_requiredLabels]]">
- <section>
- <div class="title">
- <span class\$="status [[item.style]]">
- <iron-icon class="icon" icon="[[item.icon]]"></iron-icon>
- </span>
- <gr-limited-text class="name" limit="40" text="[[item.label]]"></gr-limited-text>
- </div>
- <div class="value">
- <gr-label-info change="{{change}}" account="[[account]]" mutable="[[mutable]]" label="[[item.label]]" label-info="[[item.labelInfo]]"></gr-label-info>
- </div>
- </section>
- </template>
- <section class="spacer"></section>
- <section class\$="spacer [[_computeShowOptional(_optionalLabels.*)]]"></section>
- <section show-bottom-border\$="[[_showOptionalLabels]]" on-click="_handleShowHide" class\$="showHide [[_computeShowOptional(_optionalLabels.*)]]">
- <div class="title">Other labels</div>
- <div class="value">
- <iron-icon id="showHide" icon="[[_computeShowHideIcon(_showOptionalLabels)]]">
- </iron-icon>
-
+ <style include="shared-styles">
+ :host {
+ display: table;
+ width: 100%;
+ }
+ .status {
+ color: #ffa62f;
+ display: inline-block;
+ text-align: center;
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-mono);
+ line-height: var(--line-height-mono);
+ }
+ .approved.status {
+ color: var(--vote-text-color-recommended);
+ }
+ .rejected.status {
+ color: var(--vote-text-color-disliked);
+ }
+ iron-icon {
+ color: inherit;
+ }
+ .status iron-icon {
+ vertical-align: top;
+ }
+ section {
+ display: table-row;
+ }
+ .show-hide {
+ float: right;
+ }
+ .title {
+ min-width: 10em;
+ padding: var(--spacing-s) var(--spacing-m) 0
+ var(--requirements-horizontal-padding);
+ }
+ .value {
+ padding: var(--spacing-s) 0 0 0;
+ }
+ .title,
+ .value {
+ display: table-cell;
+ vertical-align: top;
+ }
+ .hidden {
+ display: none;
+ }
+ .showHide {
+ cursor: pointer;
+ }
+ .showHide .title {
+ padding-bottom: var(--spacing-m);
+ padding-top: var(--spacing-l);
+ }
+ .showHide .value {
+ padding-top: 0;
+ vertical-align: middle;
+ }
+ .showHide iron-icon {
+ color: var(--deemphasized-text-color);
+ float: right;
+ }
+ .spacer {
+ height: var(--spacing-m);
+ }
+ </style>
+ <template is="dom-repeat" items="[[_requirements]]">
+ <section>
+ <div class="title requirement">
+ <span class$="status [[item.style]]">
+ <iron-icon
+ class="icon"
+ icon="[[_computeRequirementIcon(item.satisfied)]]"
+ ></iron-icon>
+ </span>
+ <gr-limited-text
+ class="name"
+ limit="40"
+ text="[[item.fallback_text]]"
+ ></gr-limited-text>
</div>
</section>
- <template is="dom-repeat" items="[[_optionalLabels]]">
- <section class\$="optional [[_computeSectionClass(_showOptionalLabels)]]">
- <div class="title">
- <span class\$="status [[item.style]]">
- <template is="dom-if" if="[[item.icon]]">
- <iron-icon class="icon" icon="[[item.icon]]"></iron-icon>
- </template>
- <template is="dom-if" if="[[!item.icon]]">
- <span>[[_computeLabelValue(item.labelInfo.value)]]</span>
- </template>
- </span>
- <gr-limited-text class="name" limit="40" text="[[item.label]]"></gr-limited-text>
- </div>
- <div class="value">
- <gr-label-info change="{{change}}" account="[[account]]" mutable="[[mutable]]" label="[[item.label]]" label-info="[[item.labelInfo]]"></gr-label-info>
- </div>
- </section>
- </template>
- <section class\$="spacer [[_computeShowOptional(_optionalLabels.*)]] [[_computeSectionClass(_showOptionalLabels)]]"></section>
+ </template>
+ <template is="dom-repeat" items="[[_requiredLabels]]">
+ <section>
+ <div class="title">
+ <span class$="status [[item.style]]">
+ <iron-icon class="icon" icon="[[item.icon]]"></iron-icon>
+ </span>
+ <gr-limited-text
+ class="name"
+ limit="40"
+ text="[[item.label]]"
+ ></gr-limited-text>
+ </div>
+ <div class="value">
+ <gr-label-info
+ change="{{change}}"
+ account="[[account]]"
+ mutable="[[mutable]]"
+ label="[[item.label]]"
+ label-info="[[item.labelInfo]]"
+ ></gr-label-info>
+ </div>
+ </section>
+ </template>
+ <section class="spacer"></section>
+ <section
+ class$="spacer [[_computeShowOptional(_optionalLabels.*)]]"
+ ></section>
+ <section
+ show-bottom-border$="[[_showOptionalLabels]]"
+ on-click="_handleShowHide"
+ class$="showHide [[_computeShowOptional(_optionalLabels.*)]]"
+ >
+ <div class="title">Other labels</div>
+ <div class="value">
+ <iron-icon
+ id="showHide"
+ icon="[[_computeShowHideIcon(_showOptionalLabels)]]"
+ >
+ </iron-icon>
+ </div>
+ </section>
+ <template is="dom-repeat" items="[[_optionalLabels]]">
+ <section class$="optional [[_computeSectionClass(_showOptionalLabels)]]">
+ <div class="title">
+ <span class$="status [[item.style]]">
+ <template is="dom-if" if="[[item.icon]]">
+ <iron-icon class="icon" icon="[[item.icon]]"></iron-icon>
+ </template>
+ <template is="dom-if" if="[[!item.icon]]">
+ <span>[[_computeLabelValue(item.labelInfo.value)]]</span>
+ </template>
+ </span>
+ <gr-limited-text
+ class="name"
+ limit="40"
+ text="[[item.label]]"
+ ></gr-limited-text>
+ </div>
+ <div class="value">
+ <gr-label-info
+ change="{{change}}"
+ account="[[account]]"
+ mutable="[[mutable]]"
+ label="[[item.label]]"
+ label-info="[[item.labelInfo]]"
+ ></gr-label-info>
+ </div>
+ </section>
+ </template>
+ <section
+ class$="spacer [[_computeShowOptional(_optionalLabels.*)]] [[_computeSectionClass(_showOptionalLabels)]]"
+ ></section>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_html.js b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_html.js
index 13ffc02..5521eb4 100644
--- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_html.js
+++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view_html.js
@@ -17,519 +17,780 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- .container:not(.loading) {
- background-color: var(--background-color-tertiary);
+ <style include="shared-styles">
+ .container:not(.loading) {
+ background-color: var(--background-color-tertiary);
+ }
+ .container.loading {
+ color: var(--deemphasized-text-color);
+ padding: var(--spacing-l);
+ }
+ .header {
+ align-items: center;
+ background-color: var(--background-color-primary);
+ border-bottom: 1px solid var(--border-color);
+ display: flex;
+ padding: var(--spacing-s) var(--spacing-l);
+ z-index: 99; /* Less than gr-overlay's backdrop */
+ }
+ .header.editMode {
+ background-color: var(--edit-mode-background-color);
+ }
+ .header .download {
+ margin-right: var(--spacing-l);
+ }
+ gr-change-status {
+ display: initial;
+ margin-left: var(--spacing-s);
+ }
+ gr-change-status:first-child {
+ margin-left: 0;
+ }
+ .headerTitle {
+ align-items: center;
+ display: flex;
+ flex: 1;
+ }
+ .headerSubject {
+ font-family: var(--header-font-family);
+ font-size: var(--font-size-h3);
+ font-weight: var(--font-weight-h3);
+ line-height: var(--line-height-h3);
+ margin-left: var(--spacing-l);
+ }
+ .changeNumberColon {
+ color: transparent;
+ }
+ .changeCopyClipboard {
+ margin-left: var(--spacing-s);
+ }
+ #replyBtn {
+ margin-bottom: var(--spacing-l);
+ }
+ gr-change-star {
+ margin-left: var(--spacing-s);
+ --gr-change-star-size: var(--line-height-normal);
+ }
+ a.changeNumber {
+ margin-left: var(--spacing-xs);
+ }
+ gr-reply-dialog {
+ width: 60em;
+ }
+ .changeStatus {
+ text-transform: capitalize;
+ }
+ /* Strong specificity here is needed due to
+ https://github.com/Polymer/polymer/issues/2531 */
+ .container .changeInfo {
+ display: flex;
+ background-color: var(--background-color-secondary);
+ }
+ section {
+ background-color: var(--view-background-color);
+ box-shadow: var(--elevation-level-1);
+ }
+ .changeId {
+ color: var(--deemphasized-text-color);
+ font-family: var(--font-family);
+ margin-top: var(--spacing-l);
+ }
+ .changeMetadata {
+ /* Limit meta section to half of the screen at max */
+ max-width: 50%;
+ }
+ .commitMessage {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-mono);
+ line-height: var(--line-height-mono);
+ margin-right: var(--spacing-l);
+ margin-bottom: var(--spacing-l);
+ /* Account for border and padding and rounding errors. */
+ max-width: calc(72ch + 2px + 2 * var(--spacing-m) + 0.4px);
+ }
+ .commitMessage gr-linked-text {
+ word-break: break-word;
+ }
+ #commitMessageEditor {
+ /* Account for border and padding and rounding errors. */
+ min-width: calc(72ch + 2px + 2 * var(--spacing-m) + 0.4px);
+ }
+ .editCommitMessage {
+ margin-top: var(--spacing-l);
+
+ --gr-button: {
+ padding: 5px 0px;
}
- .container.loading {
- color: var(--deemphasized-text-color);
- padding: var(--spacing-l);
+ }
+ .changeStatuses,
+ .commitActions,
+ .statusText {
+ align-items: center;
+ display: flex;
+ }
+ .changeStatuses {
+ flex-wrap: wrap;
+ }
+ .mainChangeInfo {
+ display: flex;
+ flex: 1;
+ flex-direction: column;
+ min-width: 0;
+ }
+ #commitAndRelated {
+ align-content: flex-start;
+ display: flex;
+ flex: 1;
+ overflow-x: hidden;
+ }
+ .relatedChanges {
+ flex: 1 1 auto;
+ overflow: hidden;
+ padding: var(--spacing-l) 0;
+ }
+ .mobile {
+ display: none;
+ }
+ .warning {
+ color: var(--error-text-color);
+ }
+ hr {
+ border: 0;
+ border-top: 1px solid var(--border-color);
+ height: 0;
+ margin-bottom: var(--spacing-l);
+ }
+ #relatedChanges.collapsed {
+ margin-bottom: var(--spacing-l);
+ max-height: var(--relation-chain-max-height, 2em);
+ overflow: hidden;
+ }
+ .commitContainer {
+ display: flex;
+ flex-direction: column;
+ flex-shrink: 0;
+ margin: var(--spacing-l) 0;
+ padding: 0 var(--spacing-l);
+ }
+ #startReviewBtn {
+ margin-left: var(--spacing-s);
+ }
+ .collapseToggleContainer {
+ display: flex;
+ margin-bottom: 8px;
+ }
+ #relatedChangesToggle {
+ display: none;
+ }
+ #relatedChangesToggle.showToggle {
+ display: flex;
+ }
+ .collapseToggleContainer gr-button {
+ display: block;
+ }
+ #relatedChangesToggle {
+ margin-left: var(--spacing-l);
+ padding-top: var(--related-change-btn-top-padding, 0);
+ }
+ .showOnEdit {
+ display: none;
+ }
+ .scrollable {
+ overflow: auto;
+ }
+ .text {
+ white-space: pre;
+ }
+ gr-commit-info {
+ display: inline-block;
+ }
+ paper-tabs {
+ background-color: var(--background-color-tertiary);
+ margin-top: var(--spacing-m);
+ height: calc(var(--line-height-h3) + var(--spacing-m));
+ --paper-tabs-selection-bar-color: var(--link-color);
+ }
+ paper-tab {
+ box-sizing: border-box;
+ max-width: 12em;
+ --paper-tab-ink: var(--link-color);
+ }
+ gr-thread-list,
+ gr-messages-list,
+ gr-messages-list-experimental {
+ display: block;
+ }
+ gr-thread-list {
+ min-height: 250px;
+ }
+ #includedInOverlay {
+ width: 65em;
+ }
+ #uploadHelpOverlay {
+ width: 50em;
+ }
+ #metadata {
+ --metadata-horizontal-padding: var(--spacing-l);
+ padding-top: var(--spacing-l);
+ width: 100%;
+ }
+ /* NOTE: If you update this breakpoint, also update the
+ BREAKPOINT_RELATED_MED in the JS */
+ @media screen and (max-width: 75em) {
+ .relatedChanges {
+ padding: 0;
+ }
+ #relatedChanges {
+ padding-top: var(--spacing-l);
+ }
+ #commitAndRelated {
+ flex-direction: column;
+ flex-wrap: nowrap;
+ }
+ #commitMessageEditor {
+ min-width: 0;
+ }
+ .commitMessage {
+ margin-right: 0;
+ }
+ .mainChangeInfo {
+ padding-right: 0;
+ }
+ }
+ /* NOTE: If you update this breakpoint, also update the
+ BREAKPOINT_RELATED_SMALL in the JS */
+ @media screen and (max-width: 50em) {
+ .mobile {
+ display: block;
}
.header {
- align-items: center;
- background-color: var(--background-color-primary);
- border-bottom: 1px solid var(--border-color);
- display: flex;
+ align-items: flex-start;
+ flex-direction: column;
+ flex: 1;
padding: var(--spacing-s) var(--spacing-l);
- z-index: 99; /* Less than gr-overlay's backdrop */
}
- .header.editMode {
- background-color: var(--edit-mode-background-color);
- }
- .header .download {
- margin-right: var(--spacing-l);
- }
- gr-change-status {
- display: initial;
- margin-left: var(--spacing-s);
- }
- gr-change-status:first-child {
- margin-left: 0;
+ gr-change-star {
+ vertical-align: middle;
}
.headerTitle {
- align-items: center;
- display: flex;
- flex: 1;
- }
- .headerSubject {
+ flex-wrap: wrap;
font-family: var(--header-font-family);
font-size: var(--font-size-h3);
font-weight: var(--font-weight-h3);
line-height: var(--line-height-h3);
- margin-left: var(--spacing-l);
}
- .changeNumberColon {
- color: transparent;
- }
- .changeCopyClipboard {
- margin-left: var(--spacing-s);
- }
- #replyBtn {
- margin-bottom: var(--spacing-l);
- }
- gr-change-star {
- margin-left: var(--spacing-s);
- --gr-change-star-size: var(--line-height-normal);
- }
- a.changeNumber {
- margin-left: var(--spacing-xs);
- }
- gr-reply-dialog {
- width: 60em;
- }
- .changeStatus {
- text-transform: capitalize;
- }
- /* Strong specificity here is needed due to
- https://github.com/Polymer/polymer/issues/2531 */
- .container .changeInfo {
- display: flex;
- background-color: var(--background-color-secondary);
- }
- section {
- background-color: var(--view-background-color);
- box-shadow: var(--elevation-level-1);
- }
- .changeId {
- color: var(--deemphasized-text-color);
- font-family: var(--font-family);
- margin-top: var(--spacing-l);
- }
- .changeMetadata {
- /* Limit meta section to half of the screen at max */
- max-width: 50%;
- }
- .commitMessage {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-mono);
- line-height: var(--line-height-mono);
- margin-right: var(--spacing-l);
- margin-bottom: var(--spacing-l);
- /* Account for border and padding and rounding errors. */
- max-width: calc(72ch + 2px + 2*var(--spacing-m) + 0.4px);
- }
- .commitMessage gr-linked-text {
- word-break: break-word;
- }
- #commitMessageEditor {
- /* Account for border and padding and rounding errors. */
- min-width: calc(72ch + 2px + 2*var(--spacing-m) + 0.4px);
- }
- .editCommitMessage {
- margin-top: var(--spacing-l);
-
- --gr-button: {
- padding: 5px 0px;
- }
- }
- .changeStatuses,
- .commitActions,
- .statusText {
- align-items: center;
- display: flex;
- }
- .changeStatuses {
- flex-wrap: wrap;
- }
- .mainChangeInfo {
- display: flex;
- flex: 1;
- flex-direction: column;
- min-width: 0;
- }
- #commitAndRelated {
- align-content: flex-start;
- display: flex;
- flex: 1;
- overflow-x: hidden;
- }
- .relatedChanges {
- flex: 1 1 auto;
- overflow: hidden;
- padding: var(--spacing-l) 0;
- }
- .mobile {
+ .desktop {
display: none;
}
- .warning {
- color: var(--error-text-color);
+ .reply {
+ display: block;
+ margin-right: 0;
+ /* px because don't have the same font size */
+ margin-bottom: 6px;
}
- hr {
- border: 0;
- border-top: 1px solid var(--border-color);
- height: 0;
- margin-bottom: var(--spacing-l);
+ .changeInfo-column:not(:last-of-type) {
+ margin-right: 0;
+ padding-right: 0;
}
- #relatedChanges.collapsed {
- margin-bottom: var(--spacing-l);
- max-height: var(--relation-chain-max-height, 2em);
- overflow: hidden;
+ .changeInfo,
+ #commitAndRelated {
+ flex-direction: column;
+ flex-wrap: nowrap;
}
.commitContainer {
- display: flex;
- flex-direction: column;
- flex-shrink: 0;
- margin: var(--spacing-l) 0;
- padding: 0 var(--spacing-l);
+ margin: 0;
+ padding: var(--spacing-l);
}
- #startReviewBtn {
- margin-left: var(--spacing-s);
+ .changeMetadata {
+ margin-top: var(--spacing-xs);
+ max-width: none;
}
- .collapseToggleContainer {
- display: flex;
- margin-bottom: 8px;
+ #metadata,
+ .mainChangeInfo {
+ padding: 0;
}
- #relatedChangesToggle {
- display: none;
- }
- #relatedChangesToggle.showToggle {
- display: flex;
- }
- .collapseToggleContainer gr-button {
+ .commitActions {
display: block;
- }
- #relatedChangesToggle {
- margin-left: var(--spacing-l);
- padding-top: var(--related-change-btn-top-padding, 0);
- }
- .showOnEdit {
- display: none;
- }
- .scrollable {
- overflow: auto;
- }
- .text {
- white-space: pre;
- }
- gr-commit-info {
- display: inline-block;
- }
- paper-tabs {
- background-color: var(--background-color-tertiary);
- margin-top: var(--spacing-m);
- height: calc(var(--line-height-h3) + var(--spacing-m));
- --paper-tabs-selection-bar-color: var(--link-color);
- }
- paper-tab {
- box-sizing: border-box;
- max-width: 12em;
- --paper-tab-ink: var(--link-color);
- }
- gr-thread-list,
- gr-messages-list,
- gr-messages-list-experimental {
- display: block;
- }
- gr-thread-list {
- min-height: 250px;
- }
- #includedInOverlay {
- width: 65em;
- }
- #uploadHelpOverlay {
- width: 50em;
- }
- #metadata {
- --metadata-horizontal-padding: var(--spacing-l);
- padding-top: var(--spacing-l);
+ margin-top: var(--spacing-l);
width: 100%;
}
- /* NOTE: If you update this breakpoint, also update the
- BREAKPOINT_RELATED_MED in the JS */
- @media screen and (max-width: 75em) {
- .relatedChanges {
- padding: 0;
- }
- #relatedChanges {
- padding-top: var(--spacing-l);
- }
- #commitAndRelated {
- flex-direction: column;
- flex-wrap: nowrap;
- }
- #commitMessageEditor {
- min-width: 0;
- }
- .commitMessage {
- margin-right: 0;
- }
- .mainChangeInfo {
- padding-right: 0;
- }
+ .commitMessage {
+ flex: initial;
+ margin: 0;
}
- /* NOTE: If you update this breakpoint, also update the
- BREAKPOINT_RELATED_SMALL in the JS */
- @media screen and (max-width: 50em) {
- .mobile {
- display: block;
- }
- .header {
- align-items: flex-start;
- flex-direction: column;
- flex: 1;
- padding: var(--spacing-s) var(--spacing-l);
- }
- gr-change-star {
- vertical-align: middle;
- }
- .headerTitle {
- flex-wrap: wrap;
- font-family: var(--header-font-family);
- font-size: var(--font-size-h3);
- font-weight: var(--font-weight-h3);
- line-height: var(--line-height-h3);
- }
- .desktop {
- display: none;
- }
- .reply {
- display: block;
- margin-right: 0;
- /* px because don't have the same font size */
- margin-bottom: 6px;
- }
- .changeInfo-column:not(:last-of-type) {
- margin-right: 0;
- padding-right: 0;
- }
- .changeInfo,
- #commitAndRelated {
- flex-direction: column;
- flex-wrap: nowrap;
- }
- .commitContainer {
- margin: 0;
- padding: var(--spacing-l);
- }
- .changeMetadata {
- margin-top: var(--spacing-xs);
- max-width: none;
- }
- #metadata,
- .mainChangeInfo {
- padding: 0;
- }
- .commitActions {
- display: block;
- margin-top: var(--spacing-l);
- width: 100%;
- }
- .commitMessage {
- flex: initial;
- margin: 0;
- }
- /* Change actions are the only thing thant need to remain visible due
+ /* Change actions are the only thing thant need to remain visible due
to the fact that they may have the currently visible overlay open. */
- #mainContent.overlayOpen .hideOnMobileOverlay {
- display: none;
- }
- gr-reply-dialog {
- height: 100vh;
- min-width: initial;
- width: 100vw;
- }
- #replyOverlay {
- z-index: var(--reply-overlay-z-index);
- }
+ #mainContent.overlayOpen .hideOnMobileOverlay {
+ display: none;
}
- .patch-set-dropdown {
- margin: var(--spacing-m) 0 0 var(--spacing-m);
+ gr-reply-dialog {
+ height: 100vh;
+ min-width: initial;
+ width: 100vw;
}
- .show-robot-comments {
- margin: var(--spacing-m);
+ #replyOverlay {
+ z-index: var(--reply-overlay-z-index);
}
- </style>
- <div class="container loading" hidden\$="[[!_loading]]">Loading...</div>
- <!-- TODO(taoalpha): remove on-show-checks-table,
+ }
+ .patch-set-dropdown {
+ margin: var(--spacing-m) 0 0 var(--spacing-m);
+ }
+ .show-robot-comments {
+ margin: var(--spacing-m);
+ }
+ </style>
+ <div class="container loading" hidden$="[[!_loading]]">Loading...</div>
+ <!-- TODO(taoalpha): remove on-show-checks-table,
Gerrit should not have any thing too special for a plugin,
replace with a generic event: show-primary-tab. -->
- <div
- id="mainContent"
- class="container"
- on-show-checks-table="_setActivePrimaryTab"
- hidden\$="{{_loading}}">
- <section class="changeInfoSection">
- <div class\$="[[_computeHeaderClass(_editMode)]]">
- <div class="headerTitle">
- <div class="changeStatuses">
- <template is="dom-repeat" items="[[_changeStatuses]]" as="status">
- <gr-change-status max-width="100" status="[[status]]"></gr-change-status>
- </template>
- </div>
- <div class="statusText">
- <template is="dom-if" if="[[_computeShowCommitInfo(_changeStatus, _change.current_revision)]]">
- <span class="text"> as </span>
- <gr-commit-info change="[[_change]]" commit-info="[[_computeMergedCommitInfo(_change.current_revision, _change.revisions)]]" server-config="[[_serverConfig]]"></gr-commit-info>
- </template>
- </div>
- <gr-change-star id="changeStar" change="{{_change}}" on-toggle-star="_handleToggleStar" hidden\$="[[!_loggedIn]]"></gr-change-star>
-
- <a class="changeNumber" aria-label\$="[[_computeChangePermalinkAriaLabel(_change._number)]]" href\$="[[_computeChangeUrl(_change)]]">[[_change._number]]</a>
- <span class="changeNumberColon">: </span>
- <span class="headerSubject">[[_change.subject]]</span>
- <gr-copy-clipboard class="changeCopyClipboard" hide-input="" text="[[_computeCopyTextForTitle(_change)]]">
- </gr-copy-clipboard>
- </div><!-- end headerTitle -->
- <div class="commitActions" hidden\$="[[!_loggedIn]]">
- <gr-change-actions id="actions" change="[[_change]]" disable-edit="[[disableEdit]]" has-parent="[[hasParent]]" actions="[[_change.actions]]" revision-actions="{{_currentRevisionActions}}" change-num="[[_changeNum]]" change-status="[[_change.status]]" commit-num="[[_commitInfo.commit]]" latest-patch-num="[[computeLatestPatchNum(_allPatchSets)]]" commit-message="[[_latestCommitMessage]]" edit-patchset-loaded="[[hasEditPatchsetLoaded(_patchRange.*)]]" edit-mode="[[_editMode]]" edit-based-on-current-patch-set="[[hasEditBasedOnCurrentPatchSet(_allPatchSets)]]" private-by-default="[[_projectConfig.private_by_default]]" on-reload-change="_handleReloadChange" on-edit-tap="_handleEditTap" on-stop-edit-tap="_handleStopEditTap" on-download-tap="_handleOpenDownloadDialog"></gr-change-actions>
- </div><!-- end commit actions -->
- </div><!-- end header -->
- <div class="changeInfo">
- <div class="changeInfo-column changeMetadata hideOnMobileOverlay">
- <gr-change-metadata id="metadata" change="{{_change}}" account="[[_account]]" revision="[[_selectedRevision]]" commit-info="[[_commitInfo]]" server-config="[[_serverConfig]]" parent-is-current="[[_parentIsCurrent]]" on-show-reply-dialog="_handleShowReplyDialog">
- </gr-change-metadata>
+ <div
+ id="mainContent"
+ class="container"
+ on-show-checks-table="_setActivePrimaryTab"
+ hidden$="{{_loading}}"
+ >
+ <section class="changeInfoSection">
+ <div class$="[[_computeHeaderClass(_editMode)]]">
+ <div class="headerTitle">
+ <div class="changeStatuses">
+ <template is="dom-repeat" items="[[_changeStatuses]]" as="status">
+ <gr-change-status
+ max-width="100"
+ status="[[status]]"
+ ></gr-change-status>
+ </template>
</div>
- <div id="mainChangeInfo" class="changeInfo-column mainChangeInfo">
- <div id="commitAndRelated" class="hideOnMobileOverlay">
- <div class="commitContainer">
- <div>
- <gr-button id="replyBtn" class="reply" title="[[createTitle(Shortcut.OPEN_REPLY_DIALOG,
- ShortcutSection.ACTIONS)]]" hidden\$="[[!_loggedIn]]" primary="" disabled="[[_replyDisabled]]" on-click="_handleReplyTap">[[_replyButtonLabel]]</gr-button>
- </div>
- <div id="commitMessage" class="commitMessage">
- <gr-editable-content id="commitMessageEditor" editing="[[_editingCommitMessage]]" content="{{_latestCommitMessage}}" storage-key="[[_computeCommitMessageKey(_change._number, _change.current_revision)]]" remove-zero-width-space="" collapsed\$="[[_computeCommitMessageCollapsed(_commitCollapsed, _commitCollapsible)]]">
- <gr-linked-text pre="" content="[[_latestCommitMessage]]" config="[[_projectConfig.commentlinks]]" remove-zero-width-space=""></gr-linked-text>
- </gr-editable-content>
- <gr-button link="" class="editCommitMessage" on-click="_handleEditCommitMessage" hidden\$="[[_hideEditCommitMessage]]">Edit</gr-button>
- <div class="changeId" hidden\$="[[!_changeIdCommitMessageError]]">
- <hr>
- Change-Id:
- <span class\$="[[_computeChangeIdClass(_changeIdCommitMessageError)]]" title\$="[[_computeTitleAttributeWarning(_changeIdCommitMessageError)]]">
- [[_change.change_id]]
- </span>
- </div>
- </div>
- <div id="commitCollapseToggle" class="collapseToggleContainer" hidden\$="[[!_commitCollapsible]]">
- <gr-button link="" id="commitCollapseToggleButton" class="collapseToggleButton" on-click="_toggleCommitCollapsed">
- [[_computeCollapseText(_commitCollapsed)]]
- </gr-button>
- </div>
- <gr-endpoint-decorator name="commit-container">
- <gr-endpoint-param name="change" value="[[_change]]">
- </gr-endpoint-param>
- <gr-endpoint-param name="revision" value="[[_selectedRevision]]">
- </gr-endpoint-param>
- </gr-endpoint-decorator>
- </div>
- <div class="relatedChanges">
- <gr-related-changes-list id="relatedChanges" class\$="[[_computeRelatedChangesClass(_relatedChangesCollapsed)]]" change="[[_change]]" mergeable="[[_mergeable]]" has-parent="{{hasParent}}" on-update="_updateRelatedChangeMaxHeight" patch-num="[[computeLatestPatchNum(_allPatchSets)]]" on-new-section-loaded="_computeShowRelatedToggle">
- </gr-related-changes-list>
- <div id="relatedChangesToggle" class="collapseToggleContainer">
- <gr-button link="" id="relatedChangesToggleButton" class="collapseToggleButton" on-click="_toggleRelatedChangesCollapsed">
- [[_computeCollapseText(_relatedChangesCollapsed)]]
- </gr-button>
- </div>
- </div>
- </div>
+ <div class="statusText">
+ <template
+ is="dom-if"
+ if="[[_computeShowCommitInfo(_changeStatus, _change.current_revision)]]"
+ >
+ <span class="text"> as </span>
+ <gr-commit-info
+ change="[[_change]]"
+ commit-info="[[_computeMergedCommitInfo(_change.current_revision, _change.revisions)]]"
+ server-config="[[_serverConfig]]"
+ ></gr-commit-info>
+ </template>
</div>
+ <gr-change-star
+ id="changeStar"
+ change="{{_change}}"
+ on-toggle-star="_handleToggleStar"
+ hidden$="[[!_loggedIn]]"
+ ></gr-change-star>
+
+ <a
+ class="changeNumber"
+ aria-label$="[[_computeChangePermalinkAriaLabel(_change._number)]]"
+ href$="[[_computeChangeUrl(_change)]]"
+ >[[_change._number]]</a
+ >
+ <span class="changeNumberColon">: </span>
+ <span class="headerSubject">[[_change.subject]]</span>
+ <gr-copy-clipboard
+ class="changeCopyClipboard"
+ hide-input=""
+ text="[[_computeCopyTextForTitle(_change)]]"
+ >
+ </gr-copy-clipboard>
</div>
- </section>
-
- <paper-tabs id="primaryTabs" on-selected-changed="_setActivePrimaryTab">
- <paper-tab data-name\$="[[_constants.PrimaryTabs.FILES]]">Files</paper-tab>
- <template is="dom-repeat" items="[[_dynamicTabHeaderEndpoints]]" as="tabHeader">
- <paper-tab data-name\$="[[tabHeader]]">
- <gr-endpoint-decorator name\$="[[tabHeader]]">
- <gr-endpoint-param name="change" value="[[_change]]">
- </gr-endpoint-param>
- <gr-endpoint-param name="revision" value="[[_selectedRevision]]">
- </gr-endpoint-param>
- </gr-endpoint-decorator>
- </paper-tab>
- </template>
- <paper-tab data-name\$="[[_constants.PrimaryTabs.FINDINGS]]">
- Findings
- </paper-tab>
- </paper-tabs>
-
- <section class="patchInfo">
- <div hidden\$="[[!_isTabActive(_constants.PrimaryTabs.FILES, _activeTabs)]]">
- <gr-file-list-header id="fileListHeader" account="[[_account]]" all-patch-sets="[[_allPatchSets]]" change="[[_change]]" change-num="[[_changeNum]]" revision-info="[[_revisionInfo]]" change-comments="[[_changeComments]]" commit-info="[[_commitInfo]]" change-url="[[_computeChangeUrl(_change)]]" edit-mode="[[_editMode]]" logged-in="[[_loggedIn]]" server-config="[[_serverConfig]]" shown-file-count="[[_shownFileCount]]" diff-prefs="[[_diffPrefs]]" diff-view-mode="{{viewState.diffMode}}" patch-num="{{_patchRange.patchNum}}" base-patch-num="{{_patchRange.basePatchNum}}" files-expanded="[[_filesExpanded]]" diff-prefs-disabled="[[_diffPrefsDisabled]]" on-open-diff-prefs="_handleOpenDiffPrefs" on-open-download-dialog="_handleOpenDownloadDialog" on-open-upload-help-dialog="_handleOpenUploadHelpDialog" on-open-included-in-dialog="_handleOpenIncludedInDialog" on-expand-diffs="_expandAllDiffs" on-collapse-diffs="_collapseAllDiffs">
- </gr-file-list-header>
- <gr-file-list id="fileList" class="hideOnMobileOverlay" diff-prefs="{{_diffPrefs}}" change="[[_change]]" change-num="[[_changeNum]]" patch-range="{{_patchRange}}" change-comments="[[_changeComments]]" drafts="[[_diffDrafts]]" revisions="[[_change.revisions]]" project-config="[[_projectConfig]]" selected-index="{{viewState.selectedFileIndex}}" diff-view-mode="[[viewState.diffMode]]" edit-mode="[[_editMode]]" num-files-shown="{{_numFilesShown}}" files-expanded="{{_filesExpanded}}" file-list-increment="{{_numFilesShown}}" on-files-shown-changed="_setShownFiles" on-file-action-tap="_handleFileActionTap" on-reload-drafts="_reloadDraftsWithCallback">
- </gr-file-list>
- </div>
-
- <template is="dom-if" if="[[_isTabActive(_constants.PrimaryTabs.FINDINGS, _activeTabs)]]">
- <gr-dropdown-list class="patch-set-dropdown" items="[[_robotCommentsPatchSetDropdownItems]]" on-value-change="_handleRobotCommentPatchSetChanged" value="[[_currentRobotCommentsPatchSet]]">
- </gr-dropdown-list>
- <gr-thread-list
- threads="[[_robotCommentThreads]]"
+ <!-- end headerTitle -->
+ <div class="commitActions" hidden$="[[!_loggedIn]]">
+ <gr-change-actions
+ id="actions"
change="[[_change]]"
+ disable-edit="[[disableEdit]]"
+ has-parent="[[hasParent]]"
+ actions="[[_change.actions]]"
+ revision-actions="{{_currentRevisionActions}}"
change-num="[[_changeNum]]"
- logged-in="[[_loggedIn]]"
- hide-toggle-buttons
- empty-thread-msg="[[_messages.NO_ROBOT_COMMENTS_THREADS_MSG]]"
- on-thread-list-modified="_handleReloadDiffComments">
- </gr-thread-list>
- <template is="dom-if" if="[[_showRobotCommentsButton]]">
- <gr-button class="show-robot-comments" on-click="_toggleShowRobotComments">
- [[_computeShowText(_showAllRobotComments)]]
- </gr-button>
- </template>
- </template>
+ change-status="[[_change.status]]"
+ commit-num="[[_commitInfo.commit]]"
+ latest-patch-num="[[computeLatestPatchNum(_allPatchSets)]]"
+ commit-message="[[_latestCommitMessage]]"
+ edit-patchset-loaded="[[hasEditPatchsetLoaded(_patchRange.*)]]"
+ edit-mode="[[_editMode]]"
+ edit-based-on-current-patch-set="[[hasEditBasedOnCurrentPatchSet(_allPatchSets)]]"
+ private-by-default="[[_projectConfig.private_by_default]]"
+ on-reload-change="_handleReloadChange"
+ on-edit-tap="_handleEditTap"
+ on-stop-edit-tap="_handleStopEditTap"
+ on-download-tap="_handleOpenDownloadDialog"
+ ></gr-change-actions>
+ </div>
+ <!-- end commit actions -->
+ </div>
+ <!-- end header -->
+ <div class="changeInfo">
+ <div class="changeInfo-column changeMetadata hideOnMobileOverlay">
+ <gr-change-metadata
+ id="metadata"
+ change="{{_change}}"
+ account="[[_account]]"
+ revision="[[_selectedRevision]]"
+ commit-info="[[_commitInfo]]"
+ server-config="[[_serverConfig]]"
+ parent-is-current="[[_parentIsCurrent]]"
+ on-show-reply-dialog="_handleShowReplyDialog"
+ >
+ </gr-change-metadata>
+ </div>
+ <div id="mainChangeInfo" class="changeInfo-column mainChangeInfo">
+ <div id="commitAndRelated" class="hideOnMobileOverlay">
+ <div class="commitContainer">
+ <div>
+ <gr-button
+ id="replyBtn"
+ class="reply"
+ title="[[createTitle(Shortcut.OPEN_REPLY_DIALOG,
+ ShortcutSection.ACTIONS)]]"
+ hidden$="[[!_loggedIn]]"
+ primary=""
+ disabled="[[_replyDisabled]]"
+ on-click="_handleReplyTap"
+ >[[_replyButtonLabel]]</gr-button
+ >
+ </div>
+ <div id="commitMessage" class="commitMessage">
+ <gr-editable-content
+ id="commitMessageEditor"
+ editing="[[_editingCommitMessage]]"
+ content="{{_latestCommitMessage}}"
+ storage-key="[[_computeCommitMessageKey(_change._number, _change.current_revision)]]"
+ remove-zero-width-space=""
+ collapsed$="[[_computeCommitMessageCollapsed(_commitCollapsed, _commitCollapsible)]]"
+ >
+ <gr-linked-text
+ pre=""
+ content="[[_latestCommitMessage]]"
+ config="[[_projectConfig.commentlinks]]"
+ remove-zero-width-space=""
+ ></gr-linked-text>
+ </gr-editable-content>
+ <gr-button
+ link=""
+ class="editCommitMessage"
+ on-click="_handleEditCommitMessage"
+ hidden$="[[_hideEditCommitMessage]]"
+ >Edit</gr-button
+ >
+ <div
+ class="changeId"
+ hidden$="[[!_changeIdCommitMessageError]]"
+ >
+ <hr />
+ Change-Id:
+ <span
+ class$="[[_computeChangeIdClass(_changeIdCommitMessageError)]]"
+ title$="[[_computeTitleAttributeWarning(_changeIdCommitMessageError)]]"
+ >
+ [[_change.change_id]]
+ </span>
+ </div>
+ </div>
+ <div
+ id="commitCollapseToggle"
+ class="collapseToggleContainer"
+ hidden$="[[!_commitCollapsible]]"
+ >
+ <gr-button
+ link=""
+ id="commitCollapseToggleButton"
+ class="collapseToggleButton"
+ on-click="_toggleCommitCollapsed"
+ >
+ [[_computeCollapseText(_commitCollapsed)]]
+ </gr-button>
+ </div>
+ <gr-endpoint-decorator name="commit-container">
+ <gr-endpoint-param name="change" value="[[_change]]">
+ </gr-endpoint-param>
+ <gr-endpoint-param
+ name="revision"
+ value="[[_selectedRevision]]"
+ >
+ </gr-endpoint-param>
+ </gr-endpoint-decorator>
+ </div>
+ <div class="relatedChanges">
+ <gr-related-changes-list
+ id="relatedChanges"
+ class$="[[_computeRelatedChangesClass(_relatedChangesCollapsed)]]"
+ change="[[_change]]"
+ mergeable="[[_mergeable]]"
+ has-parent="{{hasParent}}"
+ on-update="_updateRelatedChangeMaxHeight"
+ patch-num="[[computeLatestPatchNum(_allPatchSets)]]"
+ on-new-section-loaded="_computeShowRelatedToggle"
+ >
+ </gr-related-changes-list>
+ <div id="relatedChangesToggle" class="collapseToggleContainer">
+ <gr-button
+ link=""
+ id="relatedChangesToggleButton"
+ class="collapseToggleButton"
+ on-click="_toggleRelatedChangesCollapsed"
+ >
+ [[_computeCollapseText(_relatedChangesCollapsed)]]
+ </gr-button>
+ </div>
+ </div>
+ </div>
+ </div>
+ </div>
+ </section>
- <template is="dom-if" if="[[_isTabActive(_selectedTabPluginHeader, _activeTabs)]]">
- <gr-endpoint-decorator name\$="[[_selectedTabPluginEndpoint]]">
+ <paper-tabs id="primaryTabs" on-selected-changed="_setActivePrimaryTab">
+ <paper-tab data-name$="[[_constants.PrimaryTabs.FILES]]">Files</paper-tab>
+ <template
+ is="dom-repeat"
+ items="[[_dynamicTabHeaderEndpoints]]"
+ as="tabHeader"
+ >
+ <paper-tab data-name$="[[tabHeader]]">
+ <gr-endpoint-decorator name$="[[tabHeader]]">
<gr-endpoint-param name="change" value="[[_change]]">
</gr-endpoint-param>
<gr-endpoint-param name="revision" value="[[_selectedRevision]]">
</gr-endpoint-param>
</gr-endpoint-decorator>
- </template>
- </section>
-
- <gr-endpoint-decorator name="change-view-integration">
- <gr-endpoint-param name="change" value="[[_change]]">
- </gr-endpoint-param>
- <gr-endpoint-param name="revision" value="[[_selectedRevision]]">
- </gr-endpoint-param>
- </gr-endpoint-decorator>
-
- <paper-tabs id="secondaryTabs" on-selected-changed="_setActiveSecondaryTab">
- <paper-tab
- data-name\$="[[_constants.SecondaryTabs.CHANGE_LOG]]"
- class="changeLog">
- Change Log
</paper-tab>
- <paper-tab
- data-name\$="[[_constants.SecondaryTabs.COMMENT_THREADS]]"
- class="commentThreads">
- <gr-tooltip-content has-tooltip="" title\$="[[_computeTotalCommentCounts(_change.unresolved_comment_count, _changeComments)]]">
- <span>Comment Threads</span></gr-tooltip-content>
- </paper-tab>
- </paper-tabs>
- <section class="changeLog">
- <template is="dom-if" if="[[_isTabActive(_constants.SecondaryTabs.CHANGE_LOG, _activeTabs)]]">
- <template is="dom-if" if="[[!_isChangeLogExperimentEnabled()]]">
- <gr-messages-list class="hideOnMobileOverlay" change-num="[[_changeNum]]" labels="[[_change.labels]]" messages="[[_change.messages]]" reviewer-updates="[[_change.reviewer_updates]]" change-comments="[[_changeComments]]" project-name="[[_change.project]]" show-reply-buttons="[[_loggedIn]]" on-message-anchor-tap="_handleMessageAnchorTap" on-reply="_handleMessageReply"></gr-messages-list>
- </template>
- <template is="dom-if" if="[[_isChangeLogExperimentEnabled()]]">
- <gr-messages-list-experimental class="hideOnMobileOverlay" change-num="[[_changeNum]]" labels="[[_change.labels]]" messages="[[_change.messages]]" reviewer-updates="[[_change.reviewer_updates]]" change-comments="[[_changeComments]]" project-name="[[_change.project]]" show-reply-buttons="[[_loggedIn]]" on-message-anchor-tap="_handleMessageAnchorTap" on-reply="_handleMessageReply"></gr-messages-list-experimental>
- </template>
- </template>
- <template is="dom-if" if="[[_isTabActive(_constants.SecondaryTabs.COMMENT_THREADS, _activeTabs)]]">
- <gr-thread-list threads="[[_commentThreads]]" change="[[_change]]" change-num="[[_changeNum]]" logged-in="[[_loggedIn]]" only-show-robot-comments-with-human-reply="" on-thread-list-modified="_handleReloadDiffComments"></gr-thread-list>
- </template>
- </section>
- </div>
+ </template>
+ <paper-tab data-name$="[[_constants.PrimaryTabs.FINDINGS]]">
+ Findings
+ </paper-tab>
+ </paper-tabs>
- <gr-apply-fix-dialog id="applyFixDialog" prefs="[[_diffPrefs]]" change="[[_change]]" change-num="[[_changeNum]]"></gr-apply-fix-dialog>
- <gr-overlay id="downloadOverlay" with-backdrop="">
- <gr-download-dialog id="downloadDialog" change="[[_change]]" patch-num="[[_patchRange.patchNum]]" config="[[_serverConfig.download]]" on-close="_handleDownloadDialogClose"></gr-download-dialog>
- </gr-overlay>
- <gr-overlay id="uploadHelpOverlay" with-backdrop="">
- <gr-upload-help-dialog revision="[[_currentRevision]]" target-branch="[[_change.branch]]" on-close="_handleCloseUploadHelpDialog"></gr-upload-help-dialog>
- </gr-overlay>
- <gr-overlay id="includedInOverlay" with-backdrop="">
- <gr-included-in-dialog id="includedInDialog" change-num="[[_changeNum]]" on-close="_handleIncludedInDialogClose"></gr-included-in-dialog>
- </gr-overlay>
- <gr-overlay id="replyOverlay" class="scrollable" no-cancel-on-outside-click="" no-cancel-on-esc-key="" with-backdrop="">
- <gr-reply-dialog id="replyDialog" change="{{_change}}" patch-num="[[computeLatestPatchNum(_allPatchSets)]]" permitted-labels="[[_change.permitted_labels]]" draft-comment-threads="[[_draftCommentThreads]]" project-config="[[_projectConfig]]" can-be-started="[[_canStartReview]]" on-send="_handleReplySent" on-cancel="_handleReplyCancel" on-autogrow="_handleReplyAutogrow" on-send-disabled-changed="_resetReplyOverlayFocusStops" hidden\$="[[!_loggedIn]]">
- </gr-reply-dialog>
- </gr-overlay>
- <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
- <gr-comment-api id="commentAPI"></gr-comment-api>
- <gr-reporting id="reporting"></gr-reporting>
+ <section class="patchInfo">
+ <div
+ hidden$="[[!_isTabActive(_constants.PrimaryTabs.FILES, _activeTabs)]]"
+ >
+ <gr-file-list-header
+ id="fileListHeader"
+ account="[[_account]]"
+ all-patch-sets="[[_allPatchSets]]"
+ change="[[_change]]"
+ change-num="[[_changeNum]]"
+ revision-info="[[_revisionInfo]]"
+ change-comments="[[_changeComments]]"
+ commit-info="[[_commitInfo]]"
+ change-url="[[_computeChangeUrl(_change)]]"
+ edit-mode="[[_editMode]]"
+ logged-in="[[_loggedIn]]"
+ server-config="[[_serverConfig]]"
+ shown-file-count="[[_shownFileCount]]"
+ diff-prefs="[[_diffPrefs]]"
+ diff-view-mode="{{viewState.diffMode}}"
+ patch-num="{{_patchRange.patchNum}}"
+ base-patch-num="{{_patchRange.basePatchNum}}"
+ files-expanded="[[_filesExpanded]]"
+ diff-prefs-disabled="[[_diffPrefsDisabled]]"
+ on-open-diff-prefs="_handleOpenDiffPrefs"
+ on-open-download-dialog="_handleOpenDownloadDialog"
+ on-open-upload-help-dialog="_handleOpenUploadHelpDialog"
+ on-open-included-in-dialog="_handleOpenIncludedInDialog"
+ on-expand-diffs="_expandAllDiffs"
+ on-collapse-diffs="_collapseAllDiffs"
+ >
+ </gr-file-list-header>
+ <gr-file-list
+ id="fileList"
+ class="hideOnMobileOverlay"
+ diff-prefs="{{_diffPrefs}}"
+ change="[[_change]]"
+ change-num="[[_changeNum]]"
+ patch-range="{{_patchRange}}"
+ change-comments="[[_changeComments]]"
+ drafts="[[_diffDrafts]]"
+ revisions="[[_change.revisions]]"
+ project-config="[[_projectConfig]]"
+ selected-index="{{viewState.selectedFileIndex}}"
+ diff-view-mode="[[viewState.diffMode]]"
+ edit-mode="[[_editMode]]"
+ num-files-shown="{{_numFilesShown}}"
+ files-expanded="{{_filesExpanded}}"
+ file-list-increment="{{_numFilesShown}}"
+ on-files-shown-changed="_setShownFiles"
+ on-file-action-tap="_handleFileActionTap"
+ on-reload-drafts="_reloadDraftsWithCallback"
+ >
+ </gr-file-list>
+ </div>
+
+ <template
+ is="dom-if"
+ if="[[_isTabActive(_constants.PrimaryTabs.FINDINGS, _activeTabs)]]"
+ >
+ <gr-dropdown-list
+ class="patch-set-dropdown"
+ items="[[_robotCommentsPatchSetDropdownItems]]"
+ on-value-change="_handleRobotCommentPatchSetChanged"
+ value="[[_currentRobotCommentsPatchSet]]"
+ >
+ </gr-dropdown-list>
+ <gr-thread-list
+ threads="[[_robotCommentThreads]]"
+ change="[[_change]]"
+ change-num="[[_changeNum]]"
+ logged-in="[[_loggedIn]]"
+ hide-toggle-buttons
+ empty-thread-msg="[[_messages.NO_ROBOT_COMMENTS_THREADS_MSG]]"
+ on-thread-list-modified="_handleReloadDiffComments"
+ >
+ </gr-thread-list>
+ <template is="dom-if" if="[[_showRobotCommentsButton]]">
+ <gr-button
+ class="show-robot-comments"
+ on-click="_toggleShowRobotComments"
+ >
+ [[_computeShowText(_showAllRobotComments)]]
+ </gr-button>
+ </template>
+ </template>
+
+ <template
+ is="dom-if"
+ if="[[_isTabActive(_selectedTabPluginHeader, _activeTabs)]]"
+ >
+ <gr-endpoint-decorator name$="[[_selectedTabPluginEndpoint]]">
+ <gr-endpoint-param name="change" value="[[_change]]">
+ </gr-endpoint-param>
+ <gr-endpoint-param name="revision" value="[[_selectedRevision]]">
+ </gr-endpoint-param>
+ </gr-endpoint-decorator>
+ </template>
+ </section>
+
+ <gr-endpoint-decorator name="change-view-integration">
+ <gr-endpoint-param name="change" value="[[_change]]"> </gr-endpoint-param>
+ <gr-endpoint-param name="revision" value="[[_selectedRevision]]">
+ </gr-endpoint-param>
+ </gr-endpoint-decorator>
+
+ <paper-tabs id="secondaryTabs" on-selected-changed="_setActiveSecondaryTab">
+ <paper-tab
+ data-name$="[[_constants.SecondaryTabs.CHANGE_LOG]]"
+ class="changeLog"
+ >
+ Change Log
+ </paper-tab>
+ <paper-tab
+ data-name$="[[_constants.SecondaryTabs.COMMENT_THREADS]]"
+ class="commentThreads"
+ >
+ <gr-tooltip-content
+ has-tooltip=""
+ title$="[[_computeTotalCommentCounts(_change.unresolved_comment_count, _changeComments)]]"
+ >
+ <span>Comment Threads</span></gr-tooltip-content
+ >
+ </paper-tab>
+ </paper-tabs>
+ <section class="changeLog">
+ <template
+ is="dom-if"
+ if="[[_isTabActive(_constants.SecondaryTabs.CHANGE_LOG, _activeTabs)]]"
+ >
+ <template is="dom-if" if="[[!_isChangeLogExperimentEnabled()]]">
+ <gr-messages-list
+ class="hideOnMobileOverlay"
+ change-num="[[_changeNum]]"
+ labels="[[_change.labels]]"
+ messages="[[_change.messages]]"
+ reviewer-updates="[[_change.reviewer_updates]]"
+ change-comments="[[_changeComments]]"
+ project-name="[[_change.project]]"
+ show-reply-buttons="[[_loggedIn]]"
+ on-message-anchor-tap="_handleMessageAnchorTap"
+ on-reply="_handleMessageReply"
+ ></gr-messages-list>
+ </template>
+ <template is="dom-if" if="[[_isChangeLogExperimentEnabled()]]">
+ <gr-messages-list-experimental
+ class="hideOnMobileOverlay"
+ change-num="[[_changeNum]]"
+ labels="[[_change.labels]]"
+ messages="[[_change.messages]]"
+ reviewer-updates="[[_change.reviewer_updates]]"
+ change-comments="[[_changeComments]]"
+ project-name="[[_change.project]]"
+ show-reply-buttons="[[_loggedIn]]"
+ on-message-anchor-tap="_handleMessageAnchorTap"
+ on-reply="_handleMessageReply"
+ ></gr-messages-list-experimental>
+ </template>
+ </template>
+ <template
+ is="dom-if"
+ if="[[_isTabActive(_constants.SecondaryTabs.COMMENT_THREADS, _activeTabs)]]"
+ >
+ <gr-thread-list
+ threads="[[_commentThreads]]"
+ change="[[_change]]"
+ change-num="[[_changeNum]]"
+ logged-in="[[_loggedIn]]"
+ only-show-robot-comments-with-human-reply=""
+ on-thread-list-modified="_handleReloadDiffComments"
+ ></gr-thread-list>
+ </template>
+ </section>
+ </div>
+
+ <gr-apply-fix-dialog
+ id="applyFixDialog"
+ prefs="[[_diffPrefs]]"
+ change="[[_change]]"
+ change-num="[[_changeNum]]"
+ ></gr-apply-fix-dialog>
+ <gr-overlay id="downloadOverlay" with-backdrop="">
+ <gr-download-dialog
+ id="downloadDialog"
+ change="[[_change]]"
+ patch-num="[[_patchRange.patchNum]]"
+ config="[[_serverConfig.download]]"
+ on-close="_handleDownloadDialogClose"
+ ></gr-download-dialog>
+ </gr-overlay>
+ <gr-overlay id="uploadHelpOverlay" with-backdrop="">
+ <gr-upload-help-dialog
+ revision="[[_currentRevision]]"
+ target-branch="[[_change.branch]]"
+ on-close="_handleCloseUploadHelpDialog"
+ ></gr-upload-help-dialog>
+ </gr-overlay>
+ <gr-overlay id="includedInOverlay" with-backdrop="">
+ <gr-included-in-dialog
+ id="includedInDialog"
+ change-num="[[_changeNum]]"
+ on-close="_handleIncludedInDialogClose"
+ ></gr-included-in-dialog>
+ </gr-overlay>
+ <gr-overlay
+ id="replyOverlay"
+ class="scrollable"
+ no-cancel-on-outside-click=""
+ no-cancel-on-esc-key=""
+ with-backdrop=""
+ >
+ <gr-reply-dialog
+ id="replyDialog"
+ change="{{_change}}"
+ patch-num="[[computeLatestPatchNum(_allPatchSets)]]"
+ permitted-labels="[[_change.permitted_labels]]"
+ draft-comment-threads="[[_draftCommentThreads]]"
+ project-config="[[_projectConfig]]"
+ can-be-started="[[_canStartReview]]"
+ on-send="_handleReplySent"
+ on-cancel="_handleReplyCancel"
+ on-autogrow="_handleReplyAutogrow"
+ on-send-disabled-changed="_resetReplyOverlayFocusStops"
+ hidden$="[[!_loggedIn]]"
+ >
+ </gr-reply-dialog>
+ </gr-overlay>
+ <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-comment-api id="commentAPI"></gr-comment-api>
+ <gr-reporting id="reporting"></gr-reporting>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list_html.js b/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list_html.js
index d50ba6a..60b83ee 100644
--- a/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list_html.js
+++ b/polygerrit-ui/app/elements/change/gr-comment-list/gr-comment-list_html.js
@@ -17,53 +17,73 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- word-wrap: break-word;
- }
- .file {
- padding: var(--spacing-s) 0;
- }
+ <style include="shared-styles">
+ :host {
+ display: block;
+ word-wrap: break-word;
+ }
+ .file {
+ padding: var(--spacing-s) 0;
+ }
+ .container {
+ display: flex;
+ padding: var(--spacing-s) 0;
+ }
+ .lineNum {
+ margin-right: var(--spacing-s);
+ min-width: 135px;
+ text-align: right;
+ }
+ .message {
+ flex: 1;
+ --gr-formatted-text-prose-max-width: 80ch;
+ }
+ @media screen and (max-width: 50em) {
.container {
- display: flex;
- padding: var(--spacing-s) 0;
+ flex-direction: column;
}
.lineNum {
- margin-right: var(--spacing-s);
- min-width: 135px;
- text-align: right;
+ margin-right: 0;
+ min-width: initial;
+ text-align: left;
}
- .message {
- flex: 1;
- --gr-formatted-text-prose-max-width: 80ch;
- }
- @media screen and (max-width: 50em) {
- .container {
- flex-direction: column;
- }
- .lineNum {
- margin-right: 0;
- min-width: initial;
- text-align: left;
- }
- }
- </style>
- <template is="dom-repeat" items="[[_computeFilesFromComments(comments)]]" as="file">
- <div class="file"><a class="fileLink" href="[[_computeDiffURL(file, changeNum, comments)]]">[[computeDisplayPath(file)]]</a></div>
- <template is="dom-repeat" items="[[_computeCommentsForFile(comments, file)]]" as="comment">
- <div class="container">
- <a class="lineNum" href\$="[[_computeDiffLineURL(file, changeNum, comment.patch_set, comment)]]">
- <span hidden\$="[[!comment.line]]">
- <span>[[_computePatchDisplayName(comment)]]</span>
- Line <span>[[comment.line]]</span>
- </span>
- <span hidden\$="[[comment.line]]">
- File comment:
- </span>
- </a>
- <gr-formatted-text class="message" no-trailing-margin="" content="[[comment.message]]" config="[[projectConfig.commentlinks]]"></gr-formatted-text>
- </div>
- </template>
+ }
+ </style>
+ <template
+ is="dom-repeat"
+ items="[[_computeFilesFromComments(comments)]]"
+ as="file"
+ >
+ <div class="file">
+ <a class="fileLink" href="[[_computeDiffURL(file, changeNum, comments)]]"
+ >[[computeDisplayPath(file)]]</a
+ >
+ </div>
+ <template
+ is="dom-repeat"
+ items="[[_computeCommentsForFile(comments, file)]]"
+ as="comment"
+ >
+ <div class="container">
+ <a
+ class="lineNum"
+ href$="[[_computeDiffLineURL(file, changeNum, comment.patch_set, comment)]]"
+ >
+ <span hidden$="[[!comment.line]]">
+ <span>[[_computePatchDisplayName(comment)]]</span>
+ Line <span>[[comment.line]]</span>
+ </span>
+ <span hidden$="[[comment.line]]">
+ File comment:
+ </span>
+ </a>
+ <gr-formatted-text
+ class="message"
+ no-trailing-margin=""
+ content="[[comment.message]]"
+ config="[[projectConfig.commentlinks]]"
+ ></gr-formatted-text>
+ </div>
</template>
+ </template>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-commit-info/gr-commit-info_html.js b/polygerrit-ui/app/elements/change/gr-commit-info/gr-commit-info_html.js
index ffd36f4..608d12b 100644
--- a/polygerrit-ui/app/elements/change/gr-commit-info/gr-commit-info_html.js
+++ b/polygerrit-ui/app/elements/change/gr-commit-info/gr-commit-info_html.js
@@ -17,20 +17,27 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- .container {
- align-items: center;
- display: flex;
- }
- </style>
- <div class="container">
- <template is="dom-if" if="[[_showWebLink]]">
- <a target="_blank" rel="noopener" href\$="[[_webLink]]">[[_computeShortHash(commitInfo)]]</a>
- </template>
- <template is="dom-if" if="[[!_showWebLink]]">
- [[_computeShortHash(commitInfo)]]
- </template>
- <gr-copy-clipboard has-tooltip="" button-title="Copy full SHA to clipboard" hide-input="" text="[[commitInfo.commit]]">
- </gr-copy-clipboard>
- </div>
+ <style include="shared-styles">
+ .container {
+ align-items: center;
+ display: flex;
+ }
+ </style>
+ <div class="container">
+ <template is="dom-if" if="[[_showWebLink]]">
+ <a target="_blank" rel="noopener" href$="[[_webLink]]"
+ >[[_computeShortHash(commitInfo)]]</a
+ >
+ </template>
+ <template is="dom-if" if="[[!_showWebLink]]">
+ [[_computeShortHash(commitInfo)]]
+ </template>
+ <gr-copy-clipboard
+ has-tooltip=""
+ button-title="Copy full SHA to clipboard"
+ hide-input=""
+ text="[[commitInfo.commit]]"
+ >
+ </gr-copy-clipboard>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog_html.js b/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog_html.js
index e8b530b..050df25 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog_html.js
+++ b/polygerrit-ui/app/elements/change/gr-confirm-abandon-dialog/gr-confirm-abandon-dialog_html.js
@@ -17,36 +17,46 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- }
- :host([disabled]) {
- opacity: .5;
- pointer-events: none;
- }
- .main {
- display: flex;
- flex-direction: column;
- width: 100%;
- }
- label {
- cursor: pointer;
- display: block;
- width: 100%;
- }
- iron-autogrow-textarea {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-mono);
- line-height: var(--line-height-mono);
- width: 73ch; /* Add a char to account for the border. */
- }
- </style>
- <gr-dialog confirm-label="Abandon" on-confirm="_handleConfirmTap" on-cancel="_handleCancelTap">
- <div class="header" slot="header">Abandon Change</div>
- <div class="main" slot="main">
- <label for="messageInput">Abandon Message</label>
- <iron-autogrow-textarea id="messageInput" class="message" autocomplete="on" placeholder="<Insert reasoning here>" bind-value="{{message}}"></iron-autogrow-textarea>
- </div>
- </gr-dialog>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ :host([disabled]) {
+ opacity: 0.5;
+ pointer-events: none;
+ }
+ .main {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ }
+ label {
+ cursor: pointer;
+ display: block;
+ width: 100%;
+ }
+ iron-autogrow-textarea {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-mono);
+ line-height: var(--line-height-mono);
+ width: 73ch; /* Add a char to account for the border. */
+ }
+ </style>
+ <gr-dialog
+ confirm-label="Abandon"
+ on-confirm="_handleConfirmTap"
+ on-cancel="_handleCancelTap"
+ >
+ <div class="header" slot="header">Abandon Change</div>
+ <div class="main" slot="main">
+ <label for="messageInput">Abandon Message</label>
+ <iron-autogrow-textarea
+ id="messageInput"
+ class="message"
+ autocomplete="on"
+ placeholder="<Insert reasoning here>"
+ bind-value="{{message}}"
+ ></iron-autogrow-textarea>
+ </div>
+ </gr-dialog>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog_html.js b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog_html.js
index c03c246..c7fb70c 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog_html.js
+++ b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-conflict-dialog/gr-confirm-cherrypick-conflict-dialog_html.js
@@ -17,26 +17,33 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- }
- :host([disabled]) {
- opacity: .5;
- pointer-events: none;
- }
- .main {
- display: flex;
- flex-direction: column;
- width: 100%;
- }
- </style>
- <gr-dialog confirm-label="Continue" on-confirm="_handleConfirmTap" on-cancel="_handleCancelTap">
- <div class="header" slot="header">Cherry Pick Conflict!</div>
- <div class="main" slot="main">
- <span>Cherry Pick failed! (merge conflicts)</span>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ :host([disabled]) {
+ opacity: 0.5;
+ pointer-events: none;
+ }
+ .main {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ }
+ </style>
+ <gr-dialog
+ confirm-label="Continue"
+ on-confirm="_handleConfirmTap"
+ on-cancel="_handleCancelTap"
+ >
+ <div class="header" slot="header">Cherry Pick Conflict!</div>
+ <div class="main" slot="main">
+ <span>Cherry Pick failed! (merge conflicts)</span>
- <span>Please select "Continue" to continue with conflicts or select "cancel" to close the dialog.</span>
- </div>
- </gr-dialog>
+ <span
+ >Please select "Continue" to continue with conflicts or select "cancel"
+ to close the dialog.</span
+ >
+ </div>
+ </gr-dialog>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog_html.js b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog_html.js
index 4edee72..aeb8061 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog_html.js
+++ b/polygerrit-ui/app/elements/change/gr-confirm-cherrypick-dialog/gr-confirm-cherrypick-dialog_html.js
@@ -17,142 +17,204 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- }
- :host([disabled]) {
- opacity: .5;
- pointer-events: none;
- }
- label {
- cursor: pointer;
- }
- .main {
- display: flex;
- flex-direction: column;
- width: 100%;
- }
- .main label,
- .main input[type="text"] {
- display: block;
- width: 100%;
- }
- iron-autogrow-textarea {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-mono);
- line-height: var(--line-height-mono);
- width: 73ch; /* Add a char to account for the border. */
- }
- .cherryPickTopicLayout {
- display: flex;
- }
- .cherryPickSingleChange, .cherryPickTopic {
- margin-left: var(--spacing-m);
- margin-bottom: var(--spacing-m);
- }
- .cherry-pick-topic-message {
- margin-bottom: var(--spacing-m);
- }
- label[for='messageInput'] , label[for='baseInput'] {
- margin-top: var(--spacing-m);
- }
- .title {
- font-weight: var(--font-weight-bold);
- }
- tr > td {
- padding: var(--spacing-m);
- }
- th {
- color: var(--deemphasized-text-color);
- }
- table {
- border-collapse: collapse;
- }
- tr {
- border-bottom: 1px solid var(--border-color);
- }
- .error {
- color: var(--error-text-color);
- }
- .error-message {
- color: var(--error-text-color);
- margin: var(--spacing-m) 0 var(--spacing-m) 0;
- }
- </style>
- <gr-dialog confirm-label="Cherry Pick" cancel-label="[[_computeCancelLabel(_statuses)]]" disabled\$="[[_computeDisableCherryPick(_cherryPickType, _duplicateProjectChanges, _statuses)]]" on-confirm="_handleConfirmTap" on-cancel="_handleCancelTap">
- <div class="header title" slot="header">Cherry Pick Change to Another Branch</div>
- <div class="main" slot="main">
-
- <template is="dom-if" if="[[_showCherryPickTopic]]">
- <div class="cherryPickTopicLayout">
- <input name="cherryPickOptions" type="radio" id="cherryPickSingleChange" on-change="_handlecherryPickSingleChangeClicked" checked="">
- <label for="cherryPickSingleChange" class="cherryPickSingleChange">
- Cherry Pick single change
- </label>
- </div>
- <div class="cherryPickTopicLayout">
- <input name="cherryPickOptions" type="radio" id="cherryPickTopic" on-change="_handlecherryPickTopicClicked">
- <label for="cherryPickTopic" class="cherryPickTopic">
- Cherry Pick entire topic ([[_changesCount]] Changes)
- </label>
- </div></template>
-
- <label for="branchInput">
- Cherry Pick to branch
- </label>
- <gr-autocomplete id="branchInput" text="{{branch}}" query="[[_query]]" placeholder="Destination branch">
- </gr-autocomplete>
- <template is="dom-if" if="[[_invalidBranch]]">
- <span class="error"> Branch name cannot contain space or commas. </span>
- </template>
- <template is="dom-if" if="[[_computeIfSinglecherryPick(_cherryPickType)]]">
- <label for="baseInput">
- Provide base commit sha1 for cherry-pick
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ :host([disabled]) {
+ opacity: 0.5;
+ pointer-events: none;
+ }
+ label {
+ cursor: pointer;
+ }
+ .main {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ }
+ .main label,
+ .main input[type='text'] {
+ display: block;
+ width: 100%;
+ }
+ iron-autogrow-textarea {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-mono);
+ line-height: var(--line-height-mono);
+ width: 73ch; /* Add a char to account for the border. */
+ }
+ .cherryPickTopicLayout {
+ display: flex;
+ }
+ .cherryPickSingleChange,
+ .cherryPickTopic {
+ margin-left: var(--spacing-m);
+ margin-bottom: var(--spacing-m);
+ }
+ .cherry-pick-topic-message {
+ margin-bottom: var(--spacing-m);
+ }
+ label[for='messageInput'],
+ label[for='baseInput'] {
+ margin-top: var(--spacing-m);
+ }
+ .title {
+ font-weight: var(--font-weight-bold);
+ }
+ tr > td {
+ padding: var(--spacing-m);
+ }
+ th {
+ color: var(--deemphasized-text-color);
+ }
+ table {
+ border-collapse: collapse;
+ }
+ tr {
+ border-bottom: 1px solid var(--border-color);
+ }
+ .error {
+ color: var(--error-text-color);
+ }
+ .error-message {
+ color: var(--error-text-color);
+ margin: var(--spacing-m) 0 var(--spacing-m) 0;
+ }
+ </style>
+ <gr-dialog
+ confirm-label="Cherry Pick"
+ cancel-label="[[_computeCancelLabel(_statuses)]]"
+ disabled$="[[_computeDisableCherryPick(_cherryPickType, _duplicateProjectChanges, _statuses)]]"
+ on-confirm="_handleConfirmTap"
+ on-cancel="_handleCancelTap"
+ >
+ <div class="header title" slot="header">
+ Cherry Pick Change to Another Branch
+ </div>
+ <div class="main" slot="main">
+ <template is="dom-if" if="[[_showCherryPickTopic]]">
+ <div class="cherryPickTopicLayout">
+ <input
+ name="cherryPickOptions"
+ type="radio"
+ id="cherryPickSingleChange"
+ on-change="_handlecherryPickSingleChangeClicked"
+ checked=""
+ />
+ <label for="cherryPickSingleChange" class="cherryPickSingleChange">
+ Cherry Pick single change
</label>
- <iron-input maxlength="40" placeholder="(optional)" bind-value="{{baseCommit}}">
- <input is="iron-input" id="baseCommitInput" maxlength="40" placeholder="(optional)" bind-value="{{baseCommit}}">
- </iron-input>
- <label for="messageInput">
- Cherry Pick Commit Message
- </label>
- </template>
- <template is="dom-if" if="[[_computeIfSinglecherryPick(_cherryPickType)]]">
- <iron-autogrow-textarea id="messageInput" class="message" autocomplete="on" rows="4" max-rows="15" bind-value="{{message}}"></iron-autogrow-textarea>
- </template>
- <template is="dom-if" if="[[_computeIfCherryPickTopic(_cherryPickType)]]">
- <span class="error-message">[[_computeTopicErrorMessage(_duplicateProjectChanges)]]</span>
- <span class="cherry-pick-topic-message"> Commit Message will be auto generated </span>
- <table>
- <thead>
+ </div>
+ <div class="cherryPickTopicLayout">
+ <input
+ name="cherryPickOptions"
+ type="radio"
+ id="cherryPickTopic"
+ on-change="_handlecherryPickTopicClicked"
+ />
+ <label for="cherryPickTopic" class="cherryPickTopic">
+ Cherry Pick entire topic ([[_changesCount]] Changes)
+ </label>
+ </div></template
+ >
+
+ <label for="branchInput">
+ Cherry Pick to branch
+ </label>
+ <gr-autocomplete
+ id="branchInput"
+ text="{{branch}}"
+ query="[[_query]]"
+ placeholder="Destination branch"
+ >
+ </gr-autocomplete>
+ <template is="dom-if" if="[[_invalidBranch]]">
+ <span class="error"> Branch name cannot contain space or commas. </span>
+ </template>
+ <template
+ is="dom-if"
+ if="[[_computeIfSinglecherryPick(_cherryPickType)]]"
+ >
+ <label for="baseInput">
+ Provide base commit sha1 for cherry-pick
+ </label>
+ <iron-input
+ maxlength="40"
+ placeholder="(optional)"
+ bind-value="{{baseCommit}}"
+ >
+ <input
+ is="iron-input"
+ id="baseCommitInput"
+ maxlength="40"
+ placeholder="(optional)"
+ bind-value="{{baseCommit}}"
+ />
+ </iron-input>
+ <label for="messageInput">
+ Cherry Pick Commit Message
+ </label>
+ </template>
+ <template
+ is="dom-if"
+ if="[[_computeIfSinglecherryPick(_cherryPickType)]]"
+ >
+ <iron-autogrow-textarea
+ id="messageInput"
+ class="message"
+ autocomplete="on"
+ rows="4"
+ max-rows="15"
+ bind-value="{{message}}"
+ ></iron-autogrow-textarea>
+ </template>
+ <template is="dom-if" if="[[_computeIfCherryPickTopic(_cherryPickType)]]">
+ <span class="error-message"
+ >[[_computeTopicErrorMessage(_duplicateProjectChanges)]]</span
+ >
+ <span class="cherry-pick-topic-message">
+ Commit Message will be auto generated
+ </span>
+ <table>
+ <thead>
+ <tr>
+ <th>Change</th>
+ <th>Subject</th>
+ <th>Project</th>
+ <th>Status</th>
+ <!-- Error Message -->
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <template is="dom-repeat" items="[[changes]]">
<tr>
- <th> Change </th>
- <th> Subject </th>
- <th> Project </th>
- <th> Status </th>
- <!-- Error Message -->
- <th></th>
+ <td><span> [[_getChangeId(item)]] </span></td>
+ <td>
+ <span> [[_getTrimmedChangeSubject(item.subject)]] </span>
+ </td>
+ <td><span> [[item.project]] </span></td>
+ <td>
+ <span class$="[[_computeStatusClass(item, _statuses)]]">
+ [[_computeStatus(item, _statuses)]]
+ </span>
+ </td>
+ <td>
+ <span class="error">
+ [[_computeError(item, _statuses)]]
+ </span>
+ </td>
</tr>
- </thead>
- <tbody>
- <template is="dom-repeat" items="[[changes]]">
- <tr>
- <td> <span> [[_getChangeId(item)]] </span> </td>
- <td> <span> [[_getTrimmedChangeSubject(item.subject)]] </span> </td>
- <td> <span> [[item.project]] </span> </td>
- <td>
- <span class\$="[[_computeStatusClass(item, _statuses)]]">
- [[_computeStatus(item, _statuses)]]
- </span>
- </td>
- <td> <span class="error"> [[_computeError(item, _statuses)]] </span> </td>
- </tr>
- </template>
- </tbody>
- </table>
- </template>
- </div>
- </gr-dialog>
- <gr-reporting id="reporting" category="confirm-cherry-pick-dialog"></gr-reporting>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </template>
+ </tbody>
+ </table>
+ </template>
+ </div>
+ </gr-dialog>
+ <gr-reporting
+ id="reporting"
+ category="confirm-cherry-pick-dialog"
+ ></gr-reporting>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog_html.js b/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog_html.js
index b8f3336..f5ddf41 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog_html.js
+++ b/polygerrit-ui/app/elements/change/gr-confirm-move-dialog/gr-confirm-move-dialog_html.js
@@ -17,51 +17,67 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- width: 30em;
- }
- :host([disabled]) {
- opacity: .5;
- pointer-events: none;
- }
- label {
- cursor: pointer;
- }
- .main {
- display: flex;
- flex-direction: column;
- width: 100%;
- }
- .main label,
- .main input[type="text"] {
- display: block;
- width: 100%;
- }
- .main .message {
- width: 100%;
- }
- .warning {
- color: var(--error-text-color);
- }
- </style>
- <gr-dialog confirm-label="Move Change" on-confirm="_handleConfirmTap" on-cancel="_handleCancelTap">
- <div class="header" slot="header">Move Change to Another Branch</div>
- <div class="main" slot="main">
- <p class="warning">
- Warning: moving a change will not change its parents.
- </p>
- <label for="branchInput">
- Move change to branch
- </label>
- <gr-autocomplete id="branchInput" text="{{branch}}" query="[[_query]]" placeholder="Destination branch">
- </gr-autocomplete>
- <label for="messageInput">
- Move Change Message
- </label>
- <iron-autogrow-textarea id="messageInput" class="message" autocomplete="on" rows="4" max-rows="15" bind-value="{{message}}"></iron-autogrow-textarea>
- </div>
- </gr-dialog>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ width: 30em;
+ }
+ :host([disabled]) {
+ opacity: 0.5;
+ pointer-events: none;
+ }
+ label {
+ cursor: pointer;
+ }
+ .main {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ }
+ .main label,
+ .main input[type='text'] {
+ display: block;
+ width: 100%;
+ }
+ .main .message {
+ width: 100%;
+ }
+ .warning {
+ color: var(--error-text-color);
+ }
+ </style>
+ <gr-dialog
+ confirm-label="Move Change"
+ on-confirm="_handleConfirmTap"
+ on-cancel="_handleCancelTap"
+ >
+ <div class="header" slot="header">Move Change to Another Branch</div>
+ <div class="main" slot="main">
+ <p class="warning">
+ Warning: moving a change will not change its parents.
+ </p>
+ <label for="branchInput">
+ Move change to branch
+ </label>
+ <gr-autocomplete
+ id="branchInput"
+ text="{{branch}}"
+ query="[[_query]]"
+ placeholder="Destination branch"
+ >
+ </gr-autocomplete>
+ <label for="messageInput">
+ Move Change Message
+ </label>
+ <iron-autogrow-textarea
+ id="messageInput"
+ class="message"
+ autocomplete="on"
+ rows="4"
+ max-rows="15"
+ bind-value="{{message}}"
+ ></iron-autogrow-textarea>
+ </div>
+ </gr-dialog>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog_html.js b/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog_html.js
index 20872bc..e9a8424 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog_html.js
+++ b/polygerrit-ui/app/elements/change/gr-confirm-rebase-dialog/gr-confirm-rebase-dialog_html.js
@@ -17,70 +17,115 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- width: 30em;
- }
- :host([disabled]) {
- opacity: .5;
- pointer-events: none;
- }
- label {
- cursor: pointer;
- }
- .message {
- font-style: italic;
- }
- .parentRevisionContainer label,
- .parentRevisionContainer input[type="text"] {
- display: block;
- width: 100%;
- }
- .parentRevisionContainer label {
- margin-bottom: var(--spacing-xs);
- }
- .rebaseOption {
- margin: var(--spacing-m) 0;
- }
- </style>
- <gr-dialog id="confirmDialog" confirm-label="Rebase" on-confirm="_handleConfirmTap" on-cancel="_handleCancelTap">
- <div class="header" slot="header">Confirm rebase</div>
- <div class="main" slot="main">
- <div id="rebaseOnParent" class="rebaseOption" hidden\$="[[!_displayParentOption(rebaseOnCurrent, hasParent)]]">
- <input id="rebaseOnParentInput" name="rebaseOptions" type="radio" on-click="_handleRebaseOnParent">
- <label id="rebaseOnParentLabel" for="rebaseOnParentInput">
- Rebase on parent change
- </label>
- </div>
- <div id="parentUpToDateMsg" class="message" hidden\$="[[!_displayParentUpToDateMsg(rebaseOnCurrent, hasParent)]]">
- This change is up to date with its parent.
- </div>
- <div id="rebaseOnTip" class="rebaseOption" hidden\$="[[!_displayTipOption(rebaseOnCurrent, hasParent)]]">
- <input id="rebaseOnTipInput" name="rebaseOptions" type="radio" disabled\$="[[!_displayTipOption(rebaseOnCurrent, hasParent)]]" on-click="_handleRebaseOnTip">
- <label id="rebaseOnTipLabel" for="rebaseOnTipInput">
- Rebase on top of the [[branch]]
- branch<span hidden\$="[[!hasParent]]">
- (breaks relation chain)
- </span>
- </label>
- </div>
- <div id="tipUpToDateMsg" class="message" hidden\$="[[_displayTipOption(rebaseOnCurrent, hasParent)]]">
- Change is up to date with the target branch already ([[branch]])
- </div>
- <div id="rebaseOnOther" class="rebaseOption">
- <input id="rebaseOnOtherInput" name="rebaseOptions" type="radio" on-click="_handleRebaseOnOther">
- <label id="rebaseOnOtherLabel" for="rebaseOnOtherInput">
- Rebase on a specific change, ref, or commit <span hidden\$="[[!hasParent]]">
- (breaks relation chain)
- </span>
- </label>
- </div>
- <div class="parentRevisionContainer">
- <gr-autocomplete id="parentInput" query="[[_query]]" no-debounce="" text="{{_text}}" on-click="_handleEnterChangeNumberClick" allow-non-suggested-values="" placeholder="Change number, ref, or commit hash">
- </gr-autocomplete>
- </div>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ width: 30em;
+ }
+ :host([disabled]) {
+ opacity: 0.5;
+ pointer-events: none;
+ }
+ label {
+ cursor: pointer;
+ }
+ .message {
+ font-style: italic;
+ }
+ .parentRevisionContainer label,
+ .parentRevisionContainer input[type='text'] {
+ display: block;
+ width: 100%;
+ }
+ .parentRevisionContainer label {
+ margin-bottom: var(--spacing-xs);
+ }
+ .rebaseOption {
+ margin: var(--spacing-m) 0;
+ }
+ </style>
+ <gr-dialog
+ id="confirmDialog"
+ confirm-label="Rebase"
+ on-confirm="_handleConfirmTap"
+ on-cancel="_handleCancelTap"
+ >
+ <div class="header" slot="header">Confirm rebase</div>
+ <div class="main" slot="main">
+ <div
+ id="rebaseOnParent"
+ class="rebaseOption"
+ hidden$="[[!_displayParentOption(rebaseOnCurrent, hasParent)]]"
+ >
+ <input
+ id="rebaseOnParentInput"
+ name="rebaseOptions"
+ type="radio"
+ on-click="_handleRebaseOnParent"
+ />
+ <label id="rebaseOnParentLabel" for="rebaseOnParentInput">
+ Rebase on parent change
+ </label>
</div>
- </gr-dialog>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <div
+ id="parentUpToDateMsg"
+ class="message"
+ hidden$="[[!_displayParentUpToDateMsg(rebaseOnCurrent, hasParent)]]"
+ >
+ This change is up to date with its parent.
+ </div>
+ <div
+ id="rebaseOnTip"
+ class="rebaseOption"
+ hidden$="[[!_displayTipOption(rebaseOnCurrent, hasParent)]]"
+ >
+ <input
+ id="rebaseOnTipInput"
+ name="rebaseOptions"
+ type="radio"
+ disabled$="[[!_displayTipOption(rebaseOnCurrent, hasParent)]]"
+ on-click="_handleRebaseOnTip"
+ />
+ <label id="rebaseOnTipLabel" for="rebaseOnTipInput">
+ Rebase on top of the [[branch]] branch<span hidden$="[[!hasParent]]">
+ (breaks relation chain)
+ </span>
+ </label>
+ </div>
+ <div
+ id="tipUpToDateMsg"
+ class="message"
+ hidden$="[[_displayTipOption(rebaseOnCurrent, hasParent)]]"
+ >
+ Change is up to date with the target branch already ([[branch]])
+ </div>
+ <div id="rebaseOnOther" class="rebaseOption">
+ <input
+ id="rebaseOnOtherInput"
+ name="rebaseOptions"
+ type="radio"
+ on-click="_handleRebaseOnOther"
+ />
+ <label id="rebaseOnOtherLabel" for="rebaseOnOtherInput">
+ Rebase on a specific change, ref, or commit
+ <span hidden$="[[!hasParent]]">
+ (breaks relation chain)
+ </span>
+ </label>
+ </div>
+ <div class="parentRevisionContainer">
+ <gr-autocomplete
+ id="parentInput"
+ query="[[_query]]"
+ no-debounce=""
+ text="{{_text}}"
+ on-click="_handleEnterChangeNumberClick"
+ allow-non-suggested-values=""
+ placeholder="Change number, ref, or commit hash"
+ >
+ </gr-autocomplete>
+ </div>
+ </div>
+ </gr-dialog>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog_html.js b/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog_html.js
index 3f293cf..7875fa7 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog_html.js
+++ b/polygerrit-ui/app/elements/change/gr-confirm-revert-dialog/gr-confirm-revert-dialog_html.js
@@ -17,65 +17,88 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- }
- :host([disabled]) {
- opacity: .5;
- pointer-events: none;
- }
- label {
- cursor: pointer;
- display: block;
- width: 100%;
- }
- .revertSubmissionLayout {
- display: flex;
- }
- .label {
- margin-left: var(--spacing-m);
- margin-bottom: var(--spacing-m);
- }
- iron-autogrow-textarea {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-mono);
- line-height: var(--line-height-mono);
- width: 73ch; /* Add a char to account for the border. */
- }
- .error {
- color: var(--error-text-color);
- margin-bottom: var(--spacing-m);
- }
- </style>
- <gr-dialog confirm-label="Revert" on-confirm="_handleConfirmTap" on-cancel="_handleCancelTap">
- <div class="header" slot="header">
- Revert Merged Change
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ :host([disabled]) {
+ opacity: 0.5;
+ pointer-events: none;
+ }
+ label {
+ cursor: pointer;
+ display: block;
+ width: 100%;
+ }
+ .revertSubmissionLayout {
+ display: flex;
+ }
+ .label {
+ margin-left: var(--spacing-m);
+ margin-bottom: var(--spacing-m);
+ }
+ iron-autogrow-textarea {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-mono);
+ line-height: var(--line-height-mono);
+ width: 73ch; /* Add a char to account for the border. */
+ }
+ .error {
+ color: var(--error-text-color);
+ margin-bottom: var(--spacing-m);
+ }
+ </style>
+ <gr-dialog
+ confirm-label="Revert"
+ on-confirm="_handleConfirmTap"
+ on-cancel="_handleCancelTap"
+ >
+ <div class="header" slot="header">
+ Revert Merged Change
+ </div>
+ <div class="main" slot="main">
+ <div class="error" hidden$="[[!_showErrorMessage]]">
+ <span> A reason is required </span>
</div>
- <div class="main" slot="main">
- <div class="error" hidden\$="[[!_showErrorMessage]]">
- <span> A reason is required </span>
- </div>
- <template is="dom-if" if="[[_showRevertSubmission]]">
- <div class="revertSubmissionLayout">
- <input name="revertOptions" type="radio" id="revertSingleChange" on-change="_handleRevertSingleChangeClicked" checked="[[_computeIfSingleRevert(_revertType)]]">
- <label for="revertSingleChange" class="label revertSingleChange">
- Revert single change
- </label>
- </div>
- <div class="revertSubmissionLayout">
- <input name="revertOptions" type="radio" id="revertSubmission" on-change="_handleRevertSubmissionClicked" checked="[[_computeIfRevertSubmission(_revertType)]]">
- <label for="revertSubmission" class="label revertSubmission">
- Revert entire submission ([[_changesCount]] Changes)
- </label>
- </div></template>
- <gr-endpoint-decorator name="confirm-revert-change">
- <label for="messageInput">
- Revert Commit Message
+ <template is="dom-if" if="[[_showRevertSubmission]]">
+ <div class="revertSubmissionLayout">
+ <input
+ name="revertOptions"
+ type="radio"
+ id="revertSingleChange"
+ on-change="_handleRevertSingleChangeClicked"
+ checked="[[_computeIfSingleRevert(_revertType)]]"
+ />
+ <label for="revertSingleChange" class="label revertSingleChange">
+ Revert single change
</label>
- <iron-autogrow-textarea id="messageInput" class="message" autocomplete="on" max-rows="15" bind-value="{{_message}}"></iron-autogrow-textarea>
- </gr-endpoint-decorator>
- </div>
- </gr-dialog>
- <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
+ </div>
+ <div class="revertSubmissionLayout">
+ <input
+ name="revertOptions"
+ type="radio"
+ id="revertSubmission"
+ on-change="_handleRevertSubmissionClicked"
+ checked="[[_computeIfRevertSubmission(_revertType)]]"
+ />
+ <label for="revertSubmission" class="label revertSubmission">
+ Revert entire submission ([[_changesCount]] Changes)
+ </label>
+ </div></template
+ >
+ <gr-endpoint-decorator name="confirm-revert-change">
+ <label for="messageInput">
+ Revert Commit Message
+ </label>
+ <iron-autogrow-textarea
+ id="messageInput"
+ class="message"
+ autocomplete="on"
+ max-rows="15"
+ bind-value="{{_message}}"
+ ></iron-autogrow-textarea>
+ </gr-endpoint-decorator>
+ </div>
+ </gr-dialog>
+ <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-revert-submission-dialog/gr-confirm-revert-submission-dialog_html.js b/polygerrit-ui/app/elements/change/gr-confirm-revert-submission-dialog/gr-confirm-revert-submission-dialog_html.js
index a68920c..48051a0 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-revert-submission-dialog/gr-confirm-revert-submission-dialog_html.js
+++ b/polygerrit-ui/app/elements/change/gr-confirm-revert-submission-dialog/gr-confirm-revert-submission-dialog_html.js
@@ -17,35 +17,45 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <!-- TODO(taoalpha): move all shared styles to a style module. -->
- <style include="shared-styles">
- :host {
- display: block;
- }
- :host([disabled]) {
- opacity: .5;
- pointer-events: none;
- }
- label {
- cursor: pointer;
- display: block;
- width: 100%;
- }
- iron-autogrow-textarea {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-mono);
- line-height: var(--line-height-mono);
- width: 73ch; /* Add a char to account for the border. */
- }
- </style>
- <gr-dialog confirm-label="Revert Submission" on-confirm="_handleConfirmTap" on-cancel="_handleCancelTap">
- <div class="header" slot="header">Revert Submission</div>
- <div class="main" slot="main">
- <label for="messageInput">
- Revert Commit Message
- </label>
- <iron-autogrow-textarea id="messageInput" class="message" autocomplete="on" max-rows="15" bind-value="{{message}}"></iron-autogrow-textarea>
- </div>
- </gr-dialog>
- <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
+ <!-- TODO(taoalpha): move all shared styles to a style module. -->
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ :host([disabled]) {
+ opacity: 0.5;
+ pointer-events: none;
+ }
+ label {
+ cursor: pointer;
+ display: block;
+ width: 100%;
+ }
+ iron-autogrow-textarea {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-mono);
+ line-height: var(--line-height-mono);
+ width: 73ch; /* Add a char to account for the border. */
+ }
+ </style>
+ <gr-dialog
+ confirm-label="Revert Submission"
+ on-confirm="_handleConfirmTap"
+ on-cancel="_handleCancelTap"
+ >
+ <div class="header" slot="header">Revert Submission</div>
+ <div class="main" slot="main">
+ <label for="messageInput">
+ Revert Commit Message
+ </label>
+ <iron-autogrow-textarea
+ id="messageInput"
+ class="message"
+ autocomplete="on"
+ max-rows="15"
+ bind-value="{{message}}"
+ ></iron-autogrow-textarea>
+ </div>
+ </gr-dialog>
+ <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_html.js b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_html.js
index 83b3611..cf1a332 100644
--- a/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_html.js
+++ b/polygerrit-ui/app/elements/change/gr-confirm-submit-dialog/gr-confirm-submit-dialog_html.js
@@ -17,54 +17,69 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
+ <style include="shared-styles">
+ #dialog {
+ min-width: 40em;
+ }
+ p {
+ margin-bottom: var(--spacing-l);
+ }
+ .warningBeforeSubmit {
+ color: var(--error-text-color);
+ vertical-align: top;
+ margin-right: var(--spacing-s);
+ }
+ @media screen and (max-width: 50em) {
#dialog {
- min-width: 40em;
+ min-width: inherit;
+ width: 100%;
}
- p {
- margin-bottom: var(--spacing-l);
- }
- .warningBeforeSubmit {
- color: var(--error-text-color);
- vertical-align: top;
- margin-right: var(--spacing-s);
- }
- @media screen and (max-width: 50em) {
- #dialog {
- min-width: inherit;
- width: 100%;
- }
- }
- </style>
- <gr-dialog id="dialog" confirm-label="Continue" confirm-on-enter="" on-cancel="_handleCancelTap" on-confirm="_handleConfirmTap">
- <div class="header" slot="header">
- [[action.label]]
- </div>
- <div class="main" slot="main">
- <gr-endpoint-decorator name="confirm-submit-change">
- <p>Ready to submit “<strong>[[change.subject]]</strong>”?</p>
- <template is="dom-if" if="[[change.is_private]]">
- <p>
- <iron-icon icon="gr-icons:error" class="warningBeforeSubmit"></iron-icon>
- <strong>Heads Up!</strong>
- Submitting this private change will also make it public.
- </p>
- </template>
- <template is="dom-if" if="[[change.unresolved_comment_count]]">
- <p>
- <iron-icon icon="gr-icons:error" class="warningBeforeSubmit"></iron-icon>
- [[_computeUnresolvedCommentsWarning(change)]]
- </p>
- </template>
- <template is="dom-if" if="[[_computeHasChangeEdit(change)]]">
- <iron-icon icon="gr-icons:error" class="warningBeforeSubmit"></iron-icon>
- Your unpublished edit will not be submitted. Did you
- forget to click <b>PUBLISH</b>?
- </template>
- <gr-endpoint-param name="change" value="[[change]]"></gr-endpoint-param>
- <gr-endpoint-param name="action" value="[[action]]"></gr-endpoint-param>
- </gr-endpoint-decorator>
- </div>
- </gr-dialog>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ }
+ </style>
+ <gr-dialog
+ id="dialog"
+ confirm-label="Continue"
+ confirm-on-enter=""
+ on-cancel="_handleCancelTap"
+ on-confirm="_handleConfirmTap"
+ >
+ <div class="header" slot="header">
+ [[action.label]]
+ </div>
+ <div class="main" slot="main">
+ <gr-endpoint-decorator name="confirm-submit-change">
+ <p>Ready to submit “<strong>[[change.subject]]</strong>”?</p>
+ <template is="dom-if" if="[[change.is_private]]">
+ <p>
+ <iron-icon
+ icon="gr-icons:error"
+ class="warningBeforeSubmit"
+ ></iron-icon>
+ <strong>Heads Up!</strong>
+ Submitting this private change will also make it public.
+ </p>
+ </template>
+ <template is="dom-if" if="[[change.unresolved_comment_count]]">
+ <p>
+ <iron-icon
+ icon="gr-icons:error"
+ class="warningBeforeSubmit"
+ ></iron-icon>
+ [[_computeUnresolvedCommentsWarning(change)]]
+ </p>
+ </template>
+ <template is="dom-if" if="[[_computeHasChangeEdit(change)]]">
+ <iron-icon
+ icon="gr-icons:error"
+ class="warningBeforeSubmit"
+ ></iron-icon>
+ Your unpublished edit will not be submitted. Did you forget to click
+ <b>PUBLISH</b>?
+ </template>
+ <gr-endpoint-param name="change" value="[[change]]"></gr-endpoint-param>
+ <gr-endpoint-param name="action" value="[[action]]"></gr-endpoint-param>
+ </gr-endpoint-decorator>
+ </div>
+ </gr-dialog>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog_html.js b/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog_html.js
index 324f9f4..9569c03 100644
--- a/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog_html.js
+++ b/polygerrit-ui/app/elements/change/gr-download-dialog/gr-download-dialog_html.js
@@ -17,87 +17,108 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- padding: var(--spacing-m) 0;
- }
- section {
- display: flex;
- padding: var(--spacing-m) var(--spacing-xl);
- }
- .flexContainer {
- display: flex;
- justify-content: space-between;
- padding-top: var(--spacing-m);
- }
- .footer {
- justify-content: flex-end;
- }
- .closeButtonContainer {
- align-items: flex-end;
- display: flex;
- flex: 0;
- justify-content: flex-end;
- }
- .patchFiles,
- .archivesContainer {
- padding-bottom: var(--spacing-m);
- }
- .patchFiles {
- margin-right: var(--spacing-xxl);
- }
- .patchFiles a,
- .archives a {
- display: inline-block;
- margin-right: var(--spacing-l);
- }
- .patchFiles a:last-of-type,
- .archives a:last-of-type {
- margin-right: 0;
- }
- .title {
- flex: 1;
- font-weight: var(--font-weight-bold);
- }
- .hidden {
- display: none;
- }
- </style>
- <section>
- <h3 class="title">
- Patch set [[patchNum]] of [[_computePatchSetQuantity(change.revisions)]]
- </h3>
- </section>
- <section class\$="[[_computeShowDownloadCommands(_schemes)]]">
- <gr-download-commands id="downloadCommands" commands="[[_computeDownloadCommands(change, patchNum, _selectedScheme)]]" schemes="[[_schemes]]" selected-scheme="{{_selectedScheme}}"></gr-download-commands>
- </section>
- <section class="flexContainer">
- <div class="patchFiles" hidden="[[_computeHidePatchFile(change, patchNum)]]">
- <label>Patch file</label>
- <div>
- <a id="download" href\$="[[_computeDownloadLink(change, patchNum)]]" download="">
- [[_computeDownloadFilename(change, patchNum)]]
- </a>
- <a href\$="[[_computeZipDownloadLink(change, patchNum)]]" download="">
- [[_computeZipDownloadFilename(change, patchNum)]]
- </a>
- </div>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ padding: var(--spacing-m) 0;
+ }
+ section {
+ display: flex;
+ padding: var(--spacing-m) var(--spacing-xl);
+ }
+ .flexContainer {
+ display: flex;
+ justify-content: space-between;
+ padding-top: var(--spacing-m);
+ }
+ .footer {
+ justify-content: flex-end;
+ }
+ .closeButtonContainer {
+ align-items: flex-end;
+ display: flex;
+ flex: 0;
+ justify-content: flex-end;
+ }
+ .patchFiles,
+ .archivesContainer {
+ padding-bottom: var(--spacing-m);
+ }
+ .patchFiles {
+ margin-right: var(--spacing-xxl);
+ }
+ .patchFiles a,
+ .archives a {
+ display: inline-block;
+ margin-right: var(--spacing-l);
+ }
+ .patchFiles a:last-of-type,
+ .archives a:last-of-type {
+ margin-right: 0;
+ }
+ .title {
+ flex: 1;
+ font-weight: var(--font-weight-bold);
+ }
+ .hidden {
+ display: none;
+ }
+ </style>
+ <section>
+ <h3 class="title">
+ Patch set [[patchNum]] of [[_computePatchSetQuantity(change.revisions)]]
+ </h3>
+ </section>
+ <section class$="[[_computeShowDownloadCommands(_schemes)]]">
+ <gr-download-commands
+ id="downloadCommands"
+ commands="[[_computeDownloadCommands(change, patchNum, _selectedScheme)]]"
+ schemes="[[_schemes]]"
+ selected-scheme="{{_selectedScheme}}"
+ ></gr-download-commands>
+ </section>
+ <section class="flexContainer">
+ <div
+ class="patchFiles"
+ hidden="[[_computeHidePatchFile(change, patchNum)]]"
+ >
+ <label>Patch file</label>
+ <div>
+ <a
+ id="download"
+ href$="[[_computeDownloadLink(change, patchNum)]]"
+ download=""
+ >
+ [[_computeDownloadFilename(change, patchNum)]]
+ </a>
+ <a href$="[[_computeZipDownloadLink(change, patchNum)]]" download="">
+ [[_computeZipDownloadFilename(change, patchNum)]]
+ </a>
</div>
- <div class="archivesContainer" hidden\$="[[!config.archives.length]]" hidden="">
- <label>Archive</label>
- <div id="archives" class="archives">
- <template is="dom-repeat" items="[[config.archives]]" as="format">
- <a href\$="[[_computeArchiveDownloadLink(change, patchNum, format)]]" download="">
- [[format]]
- </a>
- </template>
- </div>
+ </div>
+ <div
+ class="archivesContainer"
+ hidden$="[[!config.archives.length]]"
+ hidden=""
+ >
+ <label>Archive</label>
+ <div id="archives" class="archives">
+ <template is="dom-repeat" items="[[config.archives]]" as="format">
+ <a
+ href$="[[_computeArchiveDownloadLink(change, patchNum, format)]]"
+ download=""
+ >
+ [[format]]
+ </a>
+ </template>
</div>
- </section>
- <section class="footer">
- <span class="closeButtonContainer">
- <gr-button id="closeButton" link="" on-click="_handleCloseTap">Close</gr-button>
- </span>
- </section>
+ </div>
+ </section>
+ <section class="footer">
+ <span class="closeButtonContainer">
+ <gr-button id="closeButton" link="" on-click="_handleCloseTap"
+ >Close</gr-button
+ >
+ </span>
+ </section>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header_html.js b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header_html.js
index 28cd645..10b8606 100644
--- a/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header_html.js
+++ b/polygerrit-ui/app/elements/change/gr-file-list-header/gr-file-list-header_html.js
@@ -17,180 +17,254 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- .prefsButton {
- float: right;
+ <style include="shared-styles">
+ .prefsButton {
+ float: right;
+ }
+ .collapseToggleButton {
+ text-decoration: none;
+ }
+ .patchInfoOldPatchSet.patchInfo-header {
+ background-color: var(--emphasis-color);
+ }
+ .patchInfo-header {
+ align-items: center;
+ border-top: 1px solid var(--border-color);
+ display: flex;
+ padding: var(--spacing-s) var(--spacing-l);
+ }
+ .patchInfo-left {
+ align-items: baseline;
+ display: flex;
+ }
+ .patchInfoContent {
+ align-items: center;
+ display: flex;
+ flex-wrap: wrap;
+ }
+ .patchInfo-header .container.latestPatchContainer {
+ display: none;
+ }
+ .patchInfoOldPatchSet .container.latestPatchContainer {
+ display: initial;
+ }
+ .latestPatchContainer a {
+ text-decoration: none;
+ }
+ gr-editable-label.descriptionLabel {
+ max-width: 100%;
+ }
+ .mobile {
+ display: none;
+ }
+ .patchInfo-header .container {
+ align-items: center;
+ display: flex;
+ }
+ .downloadContainer,
+ .uploadContainer,
+ .includedInContainer {
+ margin-right: 16px;
+ }
+ .includedInContainer.hide,
+ .uploadContainer.hide {
+ display: none;
+ }
+ .rightControls {
+ align-self: flex-end;
+ margin: auto 0 auto auto;
+ align-items: center;
+ display: flex;
+ flex-wrap: wrap;
+ font-weight: var(--font-weight-normal);
+ justify-content: flex-end;
+ }
+ #collapseBtn,
+ .expanded #expandBtn,
+ .fileViewActions {
+ display: none;
+ }
+ .expanded #expandBtn {
+ display: none;
+ }
+ gr-linked-chip {
+ --linked-chip-text-color: var(--primary-text-color);
+ }
+ .expanded #collapseBtn,
+ .openFile .fileViewActions {
+ align-items: center;
+ display: flex;
+ }
+ .rightControls gr-button,
+ gr-patch-range-select {
+ margin: 0 -4px;
+ }
+ .fileViewActions gr-button {
+ margin: 0;
+ --gr-button: {
+ padding: 2px 4px;
}
- .collapseToggleButton {
- text-decoration: none;
- }
- .patchInfoOldPatchSet.patchInfo-header {
- background-color: var(--emphasis-color);
- }
- .patchInfo-header {
- align-items: center;
- border-top: 1px solid var(--border-color);
- display: flex;
- padding: var(--spacing-s) var(--spacing-l);
- }
- .patchInfo-left {
- align-items: baseline;
- display: flex;
- }
- .patchInfoContent {
- align-items: center;
- display: flex;
- flex-wrap: wrap;
- }
- .patchInfo-header .container.latestPatchContainer {
+ }
+ .editMode .hideOnEdit {
+ display: none;
+ }
+ .showOnEdit {
+ display: none;
+ }
+ .editMode .showOnEdit {
+ display: initial;
+ }
+ .editMode .showOnEdit.flexContainer {
+ align-items: center;
+ display: flex;
+ }
+ .label {
+ font-weight: var(--font-weight-bold);
+ margin-right: 24px;
+ }
+ gr-commit-info,
+ gr-edit-controls {
+ margin-right: -5px;
+ }
+ .fileViewActionsLabel {
+ margin-right: var(--spacing-xs);
+ }
+ @media screen and (max-width: 50em) {
+ .patchInfo-header .desktop {
display: none;
}
- .patchInfoOldPatchSet .container.latestPatchContainer {
- display: initial;
- }
- .latestPatchContainer a {
- text-decoration: none;
- }
- gr-editable-label.descriptionLabel {
- max-width: 100%;
- }
- .mobile {
- display: none;
- }
- .patchInfo-header .container {
- align-items: center;
- display: flex;
- }
- .downloadContainer,
- .uploadContainer,
- .includedInContainer {
- margin-right: 16px;
- }
- .includedInContainer.hide,
- .uploadContainer.hide {
- display: none;
- }
- .rightControls {
- align-self: flex-end;
- margin: auto 0 auto auto;
- align-items: center;
- display: flex;
- flex-wrap: wrap;
- font-weight: var(--font-weight-normal);
- justify-content: flex-end;
- }
- #collapseBtn,
- .expanded #expandBtn,
- .fileViewActions{
- display: none;
- }
- .expanded #expandBtn {
- display: none;
- }
- gr-linked-chip {
- --linked-chip-text-color: var(--primary-text-color);
- }
- .expanded #collapseBtn,
- .openFile .fileViewActions {
- align-items: center;
- display: flex;
- }
- .rightControls gr-button,
- gr-patch-range-select {
- margin: 0 -4px;
- }
- .fileViewActions gr-button {
- margin: 0;
- --gr-button: {
- padding: 2px 4px;
- }
- }
- .editMode .hideOnEdit {
- display: none;
- }
- .showOnEdit {
- display: none;
- }
- .editMode .showOnEdit {
- display: initial;
- }
- .editMode .showOnEdit.flexContainer {
- align-items: center;
- display: flex;
- }
- .label {
- font-weight: var(--font-weight-bold);
- margin-right: 24px;
- }
- gr-commit-info,
- gr-edit-controls {
- margin-right: -5px;
- }
- .fileViewActionsLabel {
- margin-right: var(--spacing-xs);
- }
- @media screen and (max-width: 50em) {
- .patchInfo-header .desktop {
- display: none;
- }
- }
- </style>
- <div class\$="patchInfo-header [[_computeEditModeClass(editMode)]] [[_computePatchInfoClass(patchNum, allPatchSets)]]">
- <div class="patchInfo-left">
- <div class="patchInfoContent">
- <gr-patch-range-select id="rangeSelect" change-comments="[[changeComments]]" change-num="[[changeNum]]" patch-num="[[patchNum]]" base-patch-num="[[basePatchNum]]" available-patches="[[allPatchSets]]" revisions="[[change.revisions]]" revision-info="[[revisionInfo]]" on-patch-range-change="_handlePatchChange">
- </gr-patch-range-select>
+ }
+ </style>
+ <div
+ class$="patchInfo-header [[_computeEditModeClass(editMode)]] [[_computePatchInfoClass(patchNum, allPatchSets)]]"
+ >
+ <div class="patchInfo-left">
+ <div class="patchInfoContent">
+ <gr-patch-range-select
+ id="rangeSelect"
+ change-comments="[[changeComments]]"
+ change-num="[[changeNum]]"
+ patch-num="[[patchNum]]"
+ base-patch-num="[[basePatchNum]]"
+ available-patches="[[allPatchSets]]"
+ revisions="[[change.revisions]]"
+ revision-info="[[revisionInfo]]"
+ on-patch-range-change="_handlePatchChange"
+ >
+ </gr-patch-range-select>
+ <span class="separator"></span>
+ <gr-commit-info
+ change="[[change]]"
+ server-config="[[serverConfig]]"
+ commit-info="[[commitInfo]]"
+ ></gr-commit-info>
+ <span class="container latestPatchContainer">
<span class="separator"></span>
- <gr-commit-info change="[[change]]" server-config="[[serverConfig]]" commit-info="[[commitInfo]]"></gr-commit-info>
- <span class="container latestPatchContainer">
- <span class="separator"></span>
- <a href\$="[[changeUrl]]">Go to latest patch set</a>
- </span>
- <span class="container descriptionContainer hideOnEdit">
- <span class="separator"></span>
- <template is="dom-if" if="[[_patchsetDescription]]">
- <gr-linked-chip id="descriptionChip" text="[[_patchsetDescription]]" removable="[[!_descriptionReadOnly]]" on-remove="_handleDescriptionRemoved"></gr-linked-chip>
- </template>
- <template is="dom-if" if="[[!_patchsetDescription]]">
- <gr-editable-label id="descriptionLabel" uppercase="" class="descriptionLabel" label-text="Add patchset description" value="[[_patchsetDescription]]" placeholder="[[_computeDescriptionPlaceholder(_descriptionReadOnly)]]" read-only="[[_descriptionReadOnly]]" on-changed="_handleDescriptionChanged"></gr-editable-label>
- </template>
- </span>
- </div>
- </div>
- <div class\$="rightControls [[_computeExpandedClass(filesExpanded)]]">
- <span class="showOnEdit flexContainer">
- <gr-edit-controls id="editControls" patch-num="[[patchNum]]" change="[[change]]"></gr-edit-controls>
+ <a href$="[[changeUrl]]">Go to latest patch set</a>
+ </span>
+ <span class="container descriptionContainer hideOnEdit">
<span class="separator"></span>
+ <template is="dom-if" if="[[_patchsetDescription]]">
+ <gr-linked-chip
+ id="descriptionChip"
+ text="[[_patchsetDescription]]"
+ removable="[[!_descriptionReadOnly]]"
+ on-remove="_handleDescriptionRemoved"
+ ></gr-linked-chip>
+ </template>
+ <template is="dom-if" if="[[!_patchsetDescription]]">
+ <gr-editable-label
+ id="descriptionLabel"
+ uppercase=""
+ class="descriptionLabel"
+ label-text="Add patchset description"
+ value="[[_patchsetDescription]]"
+ placeholder="[[_computeDescriptionPlaceholder(_descriptionReadOnly)]]"
+ read-only="[[_descriptionReadOnly]]"
+ on-changed="_handleDescriptionChanged"
+ ></gr-editable-label>
+ </template>
</span>
- <span class\$="[[_computeUploadHelpContainerClass(change, account)]]">
- <gr-button link="" class="upload" on-click="_handleUploadTap">Update Change</gr-button>
- </span>
- <span class="downloadContainer desktop">
- <gr-button link="" class="download" title="[[createTitle(Shortcut.OPEN_DOWNLOAD_DIALOG,
- ShortcutSection.ACTIONS)]]" on-click="_handleDownloadTap">Download</gr-button>
- </span>
- <span class\$="includedInContainer [[_hideIncludedIn(change)]] desktop">
- <gr-button link="" class="includedIn" on-click="_handleIncludedInTap">Included In</gr-button>
- </span>
- <template is="dom-if" if="[[_fileListActionsVisible(shownFileCount, _maxFilesForBulkActions)]]">
- <gr-button id="expandBtn" link="" title="[[createTitle(Shortcut.EXPAND_ALL_DIFF_CONTEXT,
- ShortcutSection.DIFFS)]]" on-click="_expandAllDiffs">Expand All</gr-button>
- <gr-button id="collapseBtn" link="" on-click="_collapseAllDiffs">Collapse All</gr-button>
- </template>
- <template is="dom-if" if="[[!_fileListActionsVisible(shownFileCount, _maxFilesForBulkActions)]]">
- <div class="warning">
- Bulk actions disabled because there are too many files.
- </div>
- </template>
- <div class="fileViewActions">
- <span class="separator"></span>
- <span class="fileViewActionsLabel">Diff view:</span>
- <gr-diff-mode-selector id="modeSelect" mode="{{diffViewMode}}" save-on-change="[[!diffPrefsDisabled]]"></gr-diff-mode-selector>
- <span id="diffPrefsContainer" class="hideOnEdit" hidden\$="[[_computePrefsButtonHidden(diffPrefs, diffPrefsDisabled)]]" hidden="">
- <gr-button link="" has-tooltip="" title="Diff preferences" class="prefsButton desktop" on-click="_handlePrefsTap"><iron-icon icon="gr-icons:settings"></iron-icon></gr-button>
- </span>
- </div>
</div>
</div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <div class$="rightControls [[_computeExpandedClass(filesExpanded)]]">
+ <span class="showOnEdit flexContainer">
+ <gr-edit-controls
+ id="editControls"
+ patch-num="[[patchNum]]"
+ change="[[change]]"
+ ></gr-edit-controls>
+ <span class="separator"></span>
+ </span>
+ <span class$="[[_computeUploadHelpContainerClass(change, account)]]">
+ <gr-button link="" class="upload" on-click="_handleUploadTap"
+ >Update Change</gr-button
+ >
+ </span>
+ <span class="downloadContainer desktop">
+ <gr-button
+ link=""
+ class="download"
+ title="[[createTitle(Shortcut.OPEN_DOWNLOAD_DIALOG,
+ ShortcutSection.ACTIONS)]]"
+ on-click="_handleDownloadTap"
+ >Download</gr-button
+ >
+ </span>
+ <span class$="includedInContainer [[_hideIncludedIn(change)]] desktop">
+ <gr-button link="" class="includedIn" on-click="_handleIncludedInTap"
+ >Included In</gr-button
+ >
+ </span>
+ <template
+ is="dom-if"
+ if="[[_fileListActionsVisible(shownFileCount, _maxFilesForBulkActions)]]"
+ >
+ <gr-button
+ id="expandBtn"
+ link=""
+ title="[[createTitle(Shortcut.EXPAND_ALL_DIFF_CONTEXT,
+ ShortcutSection.DIFFS)]]"
+ on-click="_expandAllDiffs"
+ >Expand All</gr-button
+ >
+ <gr-button id="collapseBtn" link="" on-click="_collapseAllDiffs"
+ >Collapse All</gr-button
+ >
+ </template>
+ <template
+ is="dom-if"
+ if="[[!_fileListActionsVisible(shownFileCount, _maxFilesForBulkActions)]]"
+ >
+ <div class="warning">
+ Bulk actions disabled because there are too many files.
+ </div>
+ </template>
+ <div class="fileViewActions">
+ <span class="separator"></span>
+ <span class="fileViewActionsLabel">Diff view:</span>
+ <gr-diff-mode-selector
+ id="modeSelect"
+ mode="{{diffViewMode}}"
+ save-on-change="[[!diffPrefsDisabled]]"
+ ></gr-diff-mode-selector>
+ <span
+ id="diffPrefsContainer"
+ class="hideOnEdit"
+ hidden$="[[_computePrefsButtonHidden(diffPrefs, diffPrefsDisabled)]]"
+ hidden=""
+ >
+ <gr-button
+ link=""
+ has-tooltip=""
+ title="Diff preferences"
+ class="prefsButton desktop"
+ on-click="_handlePrefsTap"
+ ><iron-icon icon="gr-icons:settings"></iron-icon
+ ></gr-button>
+ </span>
+ </div>
+ </div>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_html.js b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_html.js
index 93b8414..a9a785e 100644
--- a/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_html.js
+++ b/polygerrit-ui/app/elements/change/gr-file-list/gr-file-list_html.js
@@ -17,428 +17,575 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- }
- .row {
- align-items: center;
- border-top: 1px solid var(--border-color);
- display: flex;
- min-height: calc(var(--line-height-normal) + 2*var(--spacing-s));
- padding: var(--spacing-xs) var(--spacing-l) var(--spacing-xs) calc(var(--spacing-l) - .35rem);
- }
- :host(.loading) .row {
- opacity: .5;
- };
- :host(.editMode) .hideOnEdit {
- display: none;
- }
- .showOnEdit {
- display: none;
- }
- :host(.editMode) .showOnEdit {
- display: initial;
- }
- .invisible {
- visibility: hidden;
- }
- .header-row {
- background-color: var(--background-color-secondary);
- }
- .controlRow {
- align-items: center;
- display: flex;
- height: 2.25em;
- justify-content: center;
- }
- .controlRow.invisible,
- .show-hide.invisible {
- display: none;
- }
- .reviewed,
- .status {
- align-items: center;
- display: inline-flex;
- }
- .reviewed,
- .status {
- display: inline-block;
- text-align: left;
- width: 1.5em;
- }
- .file-row {
- cursor: pointer;
- }
- .file-row.expanded {
- border-bottom: 1px solid var(--border-color);
- position: -webkit-sticky;
- position: sticky;
- top: 0;
- /* Has to visible above the diff view, and by default has a lower
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ .row {
+ align-items: center;
+ border-top: 1px solid var(--border-color);
+ display: flex;
+ min-height: calc(var(--line-height-normal) + 2 * var(--spacing-s));
+ padding: var(--spacing-xs) var(--spacing-l) var(--spacing-xs)
+ calc(var(--spacing-l) - 0.35rem);
+ }
+ :host(.loading) .row {
+ opacity: 0.5;
+ }
+ :host(.editMode) .hideOnEdit {
+ display: none;
+ }
+ .showOnEdit {
+ display: none;
+ }
+ :host(.editMode) .showOnEdit {
+ display: initial;
+ }
+ .invisible {
+ visibility: hidden;
+ }
+ .header-row {
+ background-color: var(--background-color-secondary);
+ }
+ .controlRow {
+ align-items: center;
+ display: flex;
+ height: 2.25em;
+ justify-content: center;
+ }
+ .controlRow.invisible,
+ .show-hide.invisible {
+ display: none;
+ }
+ .reviewed,
+ .status {
+ align-items: center;
+ display: inline-flex;
+ }
+ .reviewed,
+ .status {
+ display: inline-block;
+ text-align: left;
+ width: 1.5em;
+ }
+ .file-row {
+ cursor: pointer;
+ }
+ .file-row.expanded {
+ border-bottom: 1px solid var(--border-color);
+ position: -webkit-sticky;
+ position: sticky;
+ top: 0;
+ /* Has to visible above the diff view, and by default has a lower
z-index. setting to 1 places it directly above. */
- z-index: 1;
+ z-index: 1;
+ }
+ .file-row:hover {
+ background-color: var(--hover-background-color);
+ }
+ .file-row.selected {
+ background-color: var(--selection-background-color);
+ }
+ .file-row.expanded,
+ .file-row.expanded:hover {
+ background-color: var(--expanded-background-color);
+ }
+ .path {
+ cursor: pointer;
+ flex: 1;
+ /* Wrap it into multiple lines if too long. */
+ white-space: normal;
+ word-break: break-word;
+ }
+ .oldPath {
+ color: var(--deemphasized-text-color);
+ }
+ .header-stats {
+ text-align: center;
+ min-width: 7.5em;
+ }
+ .stats {
+ text-align: right;
+ min-width: 7.5em;
+ }
+ .comments {
+ padding-left: var(--spacing-l);
+ min-width: 7.5em;
+ }
+ .row:not(.header-row) .stats,
+ .total-stats {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-mono);
+ line-height: var(--line-height-mono);
+ display: flex;
+ }
+ .sizeBars {
+ margin-left: var(--spacing-m);
+ min-width: 7em;
+ text-align: center;
+ }
+ .sizeBars.hide {
+ display: none;
+ }
+ .added,
+ .removed {
+ display: inline-block;
+ min-width: 3.5em;
+ }
+ .added {
+ color: var(--vote-text-color-recommended);
+ }
+ .removed {
+ color: var(--vote-text-color-disliked);
+ text-align: left;
+ min-width: 4em;
+ padding-left: var(--spacing-s);
+ }
+ .drafts {
+ color: #c62828;
+ font-weight: var(--font-weight-bold);
+ }
+ .show-hide {
+ margin-left: var(--spacing-s);
+ width: 1.9em;
+ }
+ .fileListButton {
+ margin: var(--spacing-m);
+ }
+ .totalChanges {
+ justify-content: flex-end;
+ text-align: right;
+ }
+ .warning {
+ color: var(--deemphasized-text-color);
+ }
+ input.show-hide {
+ display: none;
+ }
+ label.show-hide {
+ cursor: pointer;
+ display: block;
+ min-width: 2em;
+ }
+ gr-diff {
+ display: block;
+ overflow-x: auto;
+ }
+ .truncatedFileName {
+ display: none;
+ }
+ .mobile {
+ display: none;
+ }
+ .reviewed {
+ margin-left: var(--spacing-xxl);
+ width: 15em;
+ }
+ .reviewed label {
+ color: var(--link-color);
+ opacity: 0;
+ justify-content: flex-end;
+ width: 100%;
+ }
+ .reviewed label:hover {
+ cursor: pointer;
+ opacity: 100;
+ }
+ .row:focus {
+ outline: none;
+ }
+ .row:hover .reviewed label,
+ .row:focus .reviewed label,
+ .row.expanded .reviewed label {
+ opacity: 100;
+ }
+ .reviewed input {
+ display: none;
+ }
+ .reviewedLabel {
+ color: var(--deemphasized-text-color);
+ margin-right: var(--spacing-l);
+ opacity: 0;
+ }
+ .reviewedLabel.isReviewed {
+ display: initial;
+ opacity: 100;
+ }
+ .editFileControls {
+ width: 7em;
+ }
+ .markReviewed,
+ .pathLink {
+ display: inline-block;
+ margin: -2px 0;
+ padding: var(--spacing-s) 0;
+ text-decoration: none;
+ }
+ .pathLink:hover {
+ text-decoration: underline;
+ }
+
+ /** copy on file path **/
+ .pathLink gr-copy-clipboard,
+ .oldPath gr-copy-clipboard {
+ display: inline-block;
+ visibility: hidden;
+ vertical-align: bottom;
+ text-decoration: none;
+ --gr-button: {
+ padding: 0px;
}
- .file-row:hover {
- background-color: var(--hover-background-color);
- }
- .file-row.selected {
- background-color: var(--selection-background-color);
- }
- .file-row.expanded,
- .file-row.expanded:hover {
- background-color: var(--expanded-background-color);
- }
- .path {
- cursor: pointer;
- flex: 1;
- /* Wrap it into multiple lines if too long. */
- white-space: normal;
- word-break: break-word;
- }
- .oldPath {
- color: var(--deemphasized-text-color);
- }
- .header-stats {
- text-align: center;
- min-width: 7.5em;
- }
- .stats {
- text-align: right;
- min-width: 7.5em;
- }
- .comments {
- padding-left: var(--spacing-l);
- min-width: 7.5em;
- }
- .row:not(.header-row) .stats,
- .total-stats {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-mono);
- line-height: var(--line-height-mono);
- display: flex;
- }
- .sizeBars {
- margin-left: var(--spacing-m);
- min-width: 7em;
- text-align: center;
- }
- .sizeBars.hide {
- display: none;
- }
- .added,
- .removed {
- display: inline-block;
- min-width: 3.5em;
- }
- .added {
- color: var(--vote-text-color-recommended);
- }
- .removed {
- color: var(--vote-text-color-disliked);
- text-align: left;
- min-width: 4em;
- padding-left: var(--spacing-s);
- }
- .drafts {
- color: #C62828;
- font-weight: var(--font-weight-bold);
- }
- .show-hide {
- margin-left: var(--spacing-s);
- width: 1.9em;
- }
- .fileListButton {
- margin: var(--spacing-m);
- }
- .totalChanges {
- justify-content: flex-end;
- text-align: right;
- }
- .warning {
- color: var(--deemphasized-text-color);
- }
- input.show-hide {
- display: none;
- }
- label.show-hide {
- cursor: pointer;
- display: block;
- min-width: 2em;
- }
- gr-diff {
- display: block;
- overflow-x: auto;
- }
- .truncatedFileName {
+ }
+ .pathLink:hover gr-copy-clipboard,
+ .oldPath:hover gr-copy-clipboard {
+ visibility: visible;
+ }
+
+ /** small screen breakpoint: 768px */
+ @media screen and (max-width: 55em) {
+ .desktop {
display: none;
}
.mobile {
+ display: block;
+ }
+ .row.selected {
+ background-color: var(--view-background-color);
+ }
+ .stats {
display: none;
}
+ .reviewed,
+ .status {
+ justify-content: flex-start;
+ }
.reviewed {
- margin-left: var(--spacing-xxl);
- width: 15em;
- }
- .reviewed label {
- color: var(--link-color);
- opacity: 0;
- justify-content: flex-end;
- width: 100%;
- }
- .reviewed label:hover {
- cursor: pointer;
- opacity: 100;
- }
- .row:focus {
- outline: none;
- }
- .row:hover .reviewed label,
- .row:focus .reviewed label,
- .row.expanded .reviewed label {
- opacity: 100;
- }
- .reviewed input {
display: none;
}
- .reviewedLabel {
- color: var(--deemphasized-text-color);
- margin-right: var(--spacing-l);
- opacity: 0;
+ .comments {
+ min-width: initial;
}
- .reviewedLabel.isReviewed {
- display: initial;
- opacity: 100;
+ .expanded .fullFileName,
+ .truncatedFileName {
+ display: inline;
}
- .editFileControls {
- width: 7em;
+ .expanded .truncatedFileName,
+ .fullFileName {
+ display: none;
}
- .markReviewed,
- .pathLink {
- display: inline-block;
- margin: -2px 0;
- padding: var(--spacing-s) 0;
- text-decoration: none;
- }
- .pathLink:hover {
- text-decoration: underline;
- }
-
- /** copy on file path **/
- .pathLink gr-copy-clipboard,
- .oldPath gr-copy-clipboard {
- display: inline-block;
- visibility: hidden;
- vertical-align: bottom;
- text-decoration: none;
- --gr-button: {
- padding: 0px;
- }
- }
- .pathLink:hover gr-copy-clipboard,
- .oldPath:hover gr-copy-clipboard {
- visibility: visible;
- }
-
- /** small screen breakpoint: 768px */
- @media screen and (max-width: 55em) {
- .desktop {
- display: none;
- }
- .mobile {
- display: block;
- }
- .row.selected {
- background-color: var(--view-background-color);
- }
- .stats {
- display: none;
- }
- .reviewed,
- .status {
- justify-content: flex-start;
- }
- .reviewed {
- display: none;
- }
- .comments {
- min-width: initial;
- }
- .expanded .fullFileName,
- .truncatedFileName {
- display: inline;
- }
- .expanded .truncatedFileName,
- .fullFileName {
- display: none;
- }
- }
- </style>
- <div id="container" on-click="_handleFileListClick">
- <div class="header-row row">
- <div class="status"></div>
- <div class="path">File</div>
- <div class="comments">Comments</div>
- <div class="sizeBars">Size</div>
- <div class="header-stats">Delta</div>
- <template is="dom-if" if="[[_showDynamicColumns]]">
- <template is="dom-repeat" items="[[_dynamicHeaderEndpoints]]" as="headerEndpoint">
- <gr-endpoint-decorator name\$="[[headerEndpoint]]">
- </gr-endpoint-decorator>
- </template>
- </template>
- <!-- Empty div here exists to keep spacing in sync with file rows. -->
- <div class="reviewed hideOnEdit" hidden\$="[[!_loggedIn]]"></div>
- <div class="editFileControls showOnEdit"></div>
- <div class="show-hide"></div>
- </div>
-
- <template is="dom-repeat" items="[[_shownFiles]]" id="files" as="file" initial-count="[[fileListIncrement]]" target-framerate="1">
- [[_reportRenderedRow(index)]]
- <div class="stickyArea">
- <div class\$="file-row row [[_computePathClass(file.__path, _expandedFiles.*)]]" data-file\$="[[_computeFileData(file)]]" tabindex="-1">
- <div class\$="[[_computeClass('status', file.__path)]]" tabindex="0" title\$="[[_computeFileStatusLabel(file.status)]]" aria-label\$="[[_computeFileStatusLabel(file.status)]]">
- [[_computeFileStatus(file.status)]]
- </div>
- <!-- TODO: Remove data-url as it appears its not used -->
- <span data-url="[[_computeDiffURL(change, patchRange, file.__path, editMode)]]" class="path">
- <a class="pathLink" href\$="[[_computeDiffURL(change, patchRange, file.__path, editMode)]]">
- <span title\$="[[computeDisplayPath(file.__path)]]" class="fullFileName">
- [[computeDisplayPath(file.__path)]]
- </span>
- <span title\$="[[computeDisplayPath(file.__path)]]" class="truncatedFileName">
- [[computeTruncatedPath(file.__path)]]
- </span>
- <gr-copy-clipboard hide-input="" text="[[file.__path]]"></gr-copy-clipboard>
- </a>
- <template is="dom-if" if="[[file.old_path]]">
- <div class="oldPath" title\$="[[file.old_path]]">
- [[file.old_path]]
- <gr-copy-clipboard hide-input="" text="[[file.old_path]]"></gr-copy-clipboard>
- </div>
- </template>
- </span>
- <div class="comments desktop">
- <span class="drafts">
- [[_computeDraftsString(changeComments, patchRange, file.__path)]]
- </span>
- [[_computeCommentsString(changeComments, patchRange, file.__path)]]
- </div>
- <div class="comments mobile">
- <span class="drafts">
- [[_computeDraftsStringMobile(changeComments, patchRange,
- file.__path)]]
- </span>
- [[_computeCommentsStringMobile(changeComments, patchRange,
- file.__path)]]
- </div>
- <div class\$="[[_computeSizeBarsClass(_showSizeBars, file.__path)]]">
- <svg width="61" height="8">
- <rect x\$="[[_computeBarAdditionX(file, _sizeBarLayout)]]" y="0" height="8" fill="#388E3C" width\$="[[_computeBarAdditionWidth(file, _sizeBarLayout)]]"></rect>
- <rect x\$="[[_computeBarDeletionX(_sizeBarLayout)]]" y="0" height="8" fill="#D32F2F" width\$="[[_computeBarDeletionWidth(file, _sizeBarLayout)]]"></rect>
- </svg>
- </div>
- <div class\$="[[_computeClass('stats', file.__path)]]">
- <span class="added" tabindex="0" aria-label\$="[[file.lines_inserted]] lines added" hidden\$="[[file.binary]]">
- +[[file.lines_inserted]]
- </span>
- <span class="removed" tabindex="0" aria-label\$="[[file.lines_deleted]] lines removed" hidden\$="[[file.binary]]">
- -[[file.lines_deleted]]
- </span>
- <span class\$="[[_computeBinaryClass(file.size_delta)]]" hidden\$="[[!file.binary]]">
- [[_formatBytes(file.size_delta)]]
- [[_formatPercentage(file.size, file.size_delta)]]
- </span>
- </div>
- <template is="dom-if" if="[[_showDynamicColumns]]">
- <template is="dom-repeat" items="[[_dynamicContentEndpoints]]" as="contentEndpoint">
- <div class\$="[[_computeClass('', file.__path)]]">
- <gr-endpoint-decorator name="[[contentEndpoint]]">
- <gr-endpoint-param name="changeNum" value="[[changeNum]]">
- </gr-endpoint-param>
- <gr-endpoint-param name="patchRange" value="[[patchRange]]">
- </gr-endpoint-param>
- <gr-endpoint-param name="path" value="[[file.__path]]">
- </gr-endpoint-param>
- </gr-endpoint-decorator>
- </div>
- </template>
- </template>
- <div class="reviewed hideOnEdit" hidden\$="[[!_loggedIn]]" hidden="">
- <span class\$="reviewedLabel [[_computeReviewedClass(file.isReviewed)]]">Reviewed</span>
- <label>
- <input class="reviewed" type="checkbox" checked="[[file.isReviewed]]">
- <span class="markReviewed" title\$="[[_reviewedTitle(file.isReviewed)]]">[[_computeReviewedText(file.isReviewed)]]</span>
- </label>
- </div>
- <div class="editFileControls showOnEdit">
- <template is="dom-if" if="[[editMode]]">
- <gr-edit-file-controls class\$="[[_computeClass('', file.__path)]]" file-path="[[file.__path]]"></gr-edit-file-controls>
- </template>
- </div>
- <div class="show-hide">
- <label class="show-hide" data-path\$="[[file.__path]]" data-expand="true">
- <input type="checkbox" class="show-hide" checked\$="[[_isFileExpanded(file.__path, _expandedFiles.*)]]" data-path\$="[[file.__path]]" data-expand="true">
- <iron-icon id="icon" icon="[[_computeShowHideIcon(file.__path, _expandedFiles.*)]]">
- </iron-icon>
- </label>
- </div>
- </div>
- <template is="dom-if" if="[[_isFileExpanded(file.__path, _expandedFiles.*)]]">
- <gr-diff-host no-auto-render="" show-load-failure="" display-line="[[_displayLine]]" hidden="[[!_isFileExpanded(file.__path, _expandedFiles.*)]]" change-num="[[changeNum]]" patch-range="[[patchRange]]" path="[[file.__path]]" prefs="[[diffPrefs]]" project-name="[[change.project]]" no-render-on-prefs-change="" view-mode="[[diffViewMode]]"></gr-diff-host>
- </template>
- </div>
- </template>
- </div>
- <div class="row totalChanges" hidden\$="[[_hideChangeTotals]]">
- <div class="total-stats">
- <span class="added" tabindex="0" aria-label\$="[[_patchChange.inserted]] lines added">
- +[[_patchChange.inserted]]
- </span>
- <span class="removed" tabindex="0" aria-label\$="[[_patchChange.deleted]] lines removed">
- -[[_patchChange.deleted]]
- </span>
- </div>
+ }
+ </style>
+ <div id="container" on-click="_handleFileListClick">
+ <div class="header-row row">
+ <div class="status"></div>
+ <div class="path">File</div>
+ <div class="comments">Comments</div>
+ <div class="sizeBars">Size</div>
+ <div class="header-stats">Delta</div>
<template is="dom-if" if="[[_showDynamicColumns]]">
- <template is="dom-repeat" items="[[_dynamicSummaryEndpoints]]" as="summaryEndpoint">
- <gr-endpoint-decorator name="[[summaryEndpoint]]">
+ <template
+ is="dom-repeat"
+ items="[[_dynamicHeaderEndpoints]]"
+ as="headerEndpoint"
+ >
+ <gr-endpoint-decorator name$="[[headerEndpoint]]">
</gr-endpoint-decorator>
</template>
</template>
<!-- Empty div here exists to keep spacing in sync with file rows. -->
- <div class="reviewed hideOnEdit" hidden\$="[[!_loggedIn]]"></div>
+ <div class="reviewed hideOnEdit" hidden$="[[!_loggedIn]]"></div>
<div class="editFileControls showOnEdit"></div>
<div class="show-hide"></div>
</div>
- <div class="row totalChanges" hidden\$="[[_hideBinaryChangeTotals]]">
- <div class="total-stats">
- <span class="added" aria-label="Total lines added">
- [[_formatBytes(_patchChange.size_delta_inserted)]]
- [[_formatPercentage(_patchChange.total_size,
- _patchChange.size_delta_inserted)]]
- </span>
- <span class="removed" aria-label="Total lines removed">
- [[_formatBytes(_patchChange.size_delta_deleted)]]
- [[_formatPercentage(_patchChange.total_size,
- _patchChange.size_delta_deleted)]]
- </span>
+
+ <template
+ is="dom-repeat"
+ items="[[_shownFiles]]"
+ id="files"
+ as="file"
+ initial-count="[[fileListIncrement]]"
+ target-framerate="1"
+ >
+ [[_reportRenderedRow(index)]]
+ <div class="stickyArea">
+ <div
+ class$="file-row row [[_computePathClass(file.__path, _expandedFiles.*)]]"
+ data-file$="[[_computeFileData(file)]]"
+ tabindex="-1"
+ >
+ <div
+ class$="[[_computeClass('status', file.__path)]]"
+ tabindex="0"
+ title$="[[_computeFileStatusLabel(file.status)]]"
+ aria-label$="[[_computeFileStatusLabel(file.status)]]"
+ >
+ [[_computeFileStatus(file.status)]]
+ </div>
+ <!-- TODO: Remove data-url as it appears its not used -->
+ <span
+ data-url="[[_computeDiffURL(change, patchRange, file.__path, editMode)]]"
+ class="path"
+ >
+ <a
+ class="pathLink"
+ href$="[[_computeDiffURL(change, patchRange, file.__path, editMode)]]"
+ >
+ <span
+ title$="[[computeDisplayPath(file.__path)]]"
+ class="fullFileName"
+ >
+ [[computeDisplayPath(file.__path)]]
+ </span>
+ <span
+ title$="[[computeDisplayPath(file.__path)]]"
+ class="truncatedFileName"
+ >
+ [[computeTruncatedPath(file.__path)]]
+ </span>
+ <gr-copy-clipboard
+ hide-input=""
+ text="[[file.__path]]"
+ ></gr-copy-clipboard>
+ </a>
+ <template is="dom-if" if="[[file.old_path]]">
+ <div class="oldPath" title$="[[file.old_path]]">
+ [[file.old_path]]
+ <gr-copy-clipboard
+ hide-input=""
+ text="[[file.old_path]]"
+ ></gr-copy-clipboard>
+ </div>
+ </template>
+ </span>
+ <div class="comments desktop">
+ <span class="drafts">
+ [[_computeDraftsString(changeComments, patchRange, file.__path)]]
+ </span>
+ [[_computeCommentsString(changeComments, patchRange, file.__path)]]
+ </div>
+ <div class="comments mobile">
+ <span class="drafts">
+ [[_computeDraftsStringMobile(changeComments, patchRange,
+ file.__path)]]
+ </span>
+ [[_computeCommentsStringMobile(changeComments, patchRange,
+ file.__path)]]
+ </div>
+ <div class$="[[_computeSizeBarsClass(_showSizeBars, file.__path)]]">
+ <svg width="61" height="8">
+ <rect
+ x$="[[_computeBarAdditionX(file, _sizeBarLayout)]]"
+ y="0"
+ height="8"
+ fill="#388E3C"
+ width$="[[_computeBarAdditionWidth(file, _sizeBarLayout)]]"
+ ></rect>
+ <rect
+ x$="[[_computeBarDeletionX(_sizeBarLayout)]]"
+ y="0"
+ height="8"
+ fill="#D32F2F"
+ width$="[[_computeBarDeletionWidth(file, _sizeBarLayout)]]"
+ ></rect>
+ </svg>
+ </div>
+ <div class$="[[_computeClass('stats', file.__path)]]">
+ <span
+ class="added"
+ tabindex="0"
+ aria-label$="[[file.lines_inserted]] lines added"
+ hidden$="[[file.binary]]"
+ >
+ +[[file.lines_inserted]]
+ </span>
+ <span
+ class="removed"
+ tabindex="0"
+ aria-label$="[[file.lines_deleted]] lines removed"
+ hidden$="[[file.binary]]"
+ >
+ -[[file.lines_deleted]]
+ </span>
+ <span
+ class$="[[_computeBinaryClass(file.size_delta)]]"
+ hidden$="[[!file.binary]]"
+ >
+ [[_formatBytes(file.size_delta)]] [[_formatPercentage(file.size,
+ file.size_delta)]]
+ </span>
+ </div>
+ <template is="dom-if" if="[[_showDynamicColumns]]">
+ <template
+ is="dom-repeat"
+ items="[[_dynamicContentEndpoints]]"
+ as="contentEndpoint"
+ >
+ <div class$="[[_computeClass('', file.__path)]]">
+ <gr-endpoint-decorator name="[[contentEndpoint]]">
+ <gr-endpoint-param name="changeNum" value="[[changeNum]]">
+ </gr-endpoint-param>
+ <gr-endpoint-param name="patchRange" value="[[patchRange]]">
+ </gr-endpoint-param>
+ <gr-endpoint-param name="path" value="[[file.__path]]">
+ </gr-endpoint-param>
+ </gr-endpoint-decorator>
+ </div>
+ </template>
+ </template>
+ <div class="reviewed hideOnEdit" hidden$="[[!_loggedIn]]" hidden="">
+ <span
+ class$="reviewedLabel [[_computeReviewedClass(file.isReviewed)]]"
+ >Reviewed</span
+ >
+ <label>
+ <input
+ class="reviewed"
+ type="checkbox"
+ checked="[[file.isReviewed]]"
+ />
+ <span
+ class="markReviewed"
+ title$="[[_reviewedTitle(file.isReviewed)]]"
+ >[[_computeReviewedText(file.isReviewed)]]</span
+ >
+ </label>
+ </div>
+ <div class="editFileControls showOnEdit">
+ <template is="dom-if" if="[[editMode]]">
+ <gr-edit-file-controls
+ class$="[[_computeClass('', file.__path)]]"
+ file-path="[[file.__path]]"
+ ></gr-edit-file-controls>
+ </template>
+ </div>
+ <div class="show-hide">
+ <label
+ class="show-hide"
+ data-path$="[[file.__path]]"
+ data-expand="true"
+ >
+ <input
+ type="checkbox"
+ class="show-hide"
+ checked$="[[_isFileExpanded(file.__path, _expandedFiles.*)]]"
+ data-path$="[[file.__path]]"
+ data-expand="true"
+ />
+ <iron-icon
+ id="icon"
+ icon="[[_computeShowHideIcon(file.__path, _expandedFiles.*)]]"
+ >
+ </iron-icon>
+ </label>
+ </div>
+ </div>
+ <template
+ is="dom-if"
+ if="[[_isFileExpanded(file.__path, _expandedFiles.*)]]"
+ >
+ <gr-diff-host
+ no-auto-render=""
+ show-load-failure=""
+ display-line="[[_displayLine]]"
+ hidden="[[!_isFileExpanded(file.__path, _expandedFiles.*)]]"
+ change-num="[[changeNum]]"
+ patch-range="[[patchRange]]"
+ path="[[file.__path]]"
+ prefs="[[diffPrefs]]"
+ project-name="[[change.project]]"
+ no-render-on-prefs-change=""
+ view-mode="[[diffViewMode]]"
+ ></gr-diff-host>
+ </template>
</div>
+ </template>
+ </div>
+ <div class="row totalChanges" hidden$="[[_hideChangeTotals]]">
+ <div class="total-stats">
+ <span
+ class="added"
+ tabindex="0"
+ aria-label$="[[_patchChange.inserted]] lines added"
+ >
+ +[[_patchChange.inserted]]
+ </span>
+ <span
+ class="removed"
+ tabindex="0"
+ aria-label$="[[_patchChange.deleted]] lines removed"
+ >
+ -[[_patchChange.deleted]]
+ </span>
</div>
- <div class\$="row controlRow [[_computeFileListControlClass(numFilesShown, _files)]]">
- <gr-button class="fileListButton" id="incrementButton" link="" on-click="_incrementNumFilesShown">
- [[_computeIncrementText(numFilesShown, _files)]]
- </gr-button>
- <gr-tooltip-content has-tooltip="[[_computeWarnShowAll(_files)]]" show-icon="[[_computeWarnShowAll(_files)]]" title\$="[[_computeShowAllWarning(_files)]]">
- <gr-button class="fileListButton" id="showAllButton" link="" on-click="_showAllFiles">
- [[_computeShowAllText(_files)]]
- </gr-button><!--
+ <template is="dom-if" if="[[_showDynamicColumns]]">
+ <template
+ is="dom-repeat"
+ items="[[_dynamicSummaryEndpoints]]"
+ as="summaryEndpoint"
+ >
+ <gr-endpoint-decorator name="[[summaryEndpoint]]">
+ </gr-endpoint-decorator>
+ </template>
+ </template>
+ <!-- Empty div here exists to keep spacing in sync with file rows. -->
+ <div class="reviewed hideOnEdit" hidden$="[[!_loggedIn]]"></div>
+ <div class="editFileControls showOnEdit"></div>
+ <div class="show-hide"></div>
+ </div>
+ <div class="row totalChanges" hidden$="[[_hideBinaryChangeTotals]]">
+ <div class="total-stats">
+ <span class="added" aria-label="Total lines added">
+ [[_formatBytes(_patchChange.size_delta_inserted)]]
+ [[_formatPercentage(_patchChange.total_size,
+ _patchChange.size_delta_inserted)]]
+ </span>
+ <span class="removed" aria-label="Total lines removed">
+ [[_formatBytes(_patchChange.size_delta_deleted)]]
+ [[_formatPercentage(_patchChange.total_size,
+ _patchChange.size_delta_deleted)]]
+ </span>
+ </div>
+ </div>
+ <div
+ class$="row controlRow [[_computeFileListControlClass(numFilesShown, _files)]]"
+ >
+ <gr-button
+ class="fileListButton"
+ id="incrementButton"
+ link=""
+ on-click="_incrementNumFilesShown"
+ >
+ [[_computeIncrementText(numFilesShown, _files)]]
+ </gr-button>
+ <gr-tooltip-content
+ has-tooltip="[[_computeWarnShowAll(_files)]]"
+ show-icon="[[_computeWarnShowAll(_files)]]"
+ title$="[[_computeShowAllWarning(_files)]]"
+ >
+ <gr-button
+ class="fileListButton"
+ id="showAllButton"
+ link=""
+ on-click="_showAllFiles"
+ >
+ [[_computeShowAllText(_files)]] </gr-button
+ ><!--
--></gr-tooltip-content>
- </div>
- <gr-diff-preferences-dialog id="diffPreferencesDialog" diff-prefs="{{diffPrefs}}" on-reload-diff-preference="_handleReloadingDiffPreference">
- </gr-diff-preferences-dialog>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
- <gr-storage id="storage"></gr-storage>
- <gr-diff-cursor id="diffCursor"></gr-diff-cursor>
- <gr-cursor-manager id="fileCursor" scroll-behavior="keep-visible" focus-on-move="" cursor-target-class="selected"></gr-cursor-manager>
- <gr-reporting id="reporting"></gr-reporting>
+ </div>
+ <gr-diff-preferences-dialog
+ id="diffPreferencesDialog"
+ diff-prefs="{{diffPrefs}}"
+ on-reload-diff-preference="_handleReloadingDiffPreference"
+ >
+ </gr-diff-preferences-dialog>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-storage id="storage"></gr-storage>
+ <gr-diff-cursor id="diffCursor"></gr-diff-cursor>
+ <gr-cursor-manager
+ id="fileCursor"
+ scroll-behavior="keep-visible"
+ focus-on-move=""
+ cursor-target-class="selected"
+ ></gr-cursor-manager>
+ <gr-reporting id="reporting"></gr-reporting>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog_html.js b/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog_html.js
index b7d455c..f5948e8 100644
--- a/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog_html.js
+++ b/polygerrit-ui/app/elements/change/gr-included-in-dialog/gr-included-in-dialog_html.js
@@ -17,74 +17,85 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- background-color: var(--dialog-background-color);
- display: block;
- max-height: 80vh;
- overflow-y: auto;
- padding: 4.5em var(--spacing-l) var(--spacing-l) var(--spacing-l);
- }
- header {
- background-color: var(--dialog-background-color);
- border-bottom: 1px solid var(--border-color);
- left: 0;
- padding: var(--spacing-l);
- position: absolute;
- right: 0;
- top: 0;
- }
- #title {
- display: inline-block;
- font-family: var(--header-font-family);
- font-size: var(--font-size-h3);
- font-weight: var(--font-weight-h3);
- line-height: var(--line-height-h3);
- margin-top: var(--spacing-xs);
- }
- #filterInput {
- display: inline-block;
- float: right;
- margin: 0 var(--spacing-l);
- padding: var(--spacing-xs);
- }
- .closeButtonContainer {
- float: right;
- }
- ul {
- margin-bottom: var(--spacing-l);
- }
- ul li {
- border: 1px solid var(--border-color);
- border-radius: var(--border-radius);
- background: var(--chip-background-color);
- display: inline-block;
- margin: 0 var(--spacing-xs) var(--spacing-s) var(--spacing-xs);
- padding: var(--spacing-xs) var(--spacing-s);
- }
- .loading.loaded {
- display: none;
- }
- </style>
- <header>
- <h1 id="title">Included In:</h1>
- <span class="closeButtonContainer">
- <gr-button id="closeButton" link="" on-click="_handleCloseTap">Close</gr-button>
- </span>
- <iron-input placeholder="Filter" on-bind-value-changed="_onFilterChanged">
- <input id="filterInput" is="iron-input" placeholder="Filter" on-bind-value-changed="_onFilterChanged">
- </iron-input>
- </header>
- <div class\$="[[_computeLoadingClass(_loaded)]]">Loading...</div>
- <template is="dom-repeat" items="[[_computeGroups(_includedIn, _filterText)]]" as="group">
- <div>
- <span>[[group.title]]:</span>
- <ul>
- <template is="dom-repeat" items="[[group.items]]">
- <li>[[item]]</li>
- </template>
- </ul>
- </div>
- </template>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <style include="shared-styles">
+ :host {
+ background-color: var(--dialog-background-color);
+ display: block;
+ max-height: 80vh;
+ overflow-y: auto;
+ padding: 4.5em var(--spacing-l) var(--spacing-l) var(--spacing-l);
+ }
+ header {
+ background-color: var(--dialog-background-color);
+ border-bottom: 1px solid var(--border-color);
+ left: 0;
+ padding: var(--spacing-l);
+ position: absolute;
+ right: 0;
+ top: 0;
+ }
+ #title {
+ display: inline-block;
+ font-family: var(--header-font-family);
+ font-size: var(--font-size-h3);
+ font-weight: var(--font-weight-h3);
+ line-height: var(--line-height-h3);
+ margin-top: var(--spacing-xs);
+ }
+ #filterInput {
+ display: inline-block;
+ float: right;
+ margin: 0 var(--spacing-l);
+ padding: var(--spacing-xs);
+ }
+ .closeButtonContainer {
+ float: right;
+ }
+ ul {
+ margin-bottom: var(--spacing-l);
+ }
+ ul li {
+ border: 1px solid var(--border-color);
+ border-radius: var(--border-radius);
+ background: var(--chip-background-color);
+ display: inline-block;
+ margin: 0 var(--spacing-xs) var(--spacing-s) var(--spacing-xs);
+ padding: var(--spacing-xs) var(--spacing-s);
+ }
+ .loading.loaded {
+ display: none;
+ }
+ </style>
+ <header>
+ <h1 id="title">Included In:</h1>
+ <span class="closeButtonContainer">
+ <gr-button id="closeButton" link="" on-click="_handleCloseTap"
+ >Close</gr-button
+ >
+ </span>
+ <iron-input placeholder="Filter" on-bind-value-changed="_onFilterChanged">
+ <input
+ id="filterInput"
+ is="iron-input"
+ placeholder="Filter"
+ on-bind-value-changed="_onFilterChanged"
+ />
+ </iron-input>
+ </header>
+ <div class$="[[_computeLoadingClass(_loaded)]]">Loading...</div>
+ <template
+ is="dom-repeat"
+ items="[[_computeGroups(_includedIn, _filterText)]]"
+ as="group"
+ >
+ <div>
+ <span>[[group.title]]:</span>
+ <ul>
+ <template is="dom-repeat" items="[[group.items]]">
+ <li>[[item]]</li>
+ </template>
+ </ul>
+ </div>
+ </template>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_html.js b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_html.js
index 1b5b425..77148ad 100644
--- a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_html.js
+++ b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_html.js
@@ -17,99 +17,128 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="gr-voting-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="shared-styles">
- .labelNameCell,
- .buttonsCell,
+ <style include="gr-voting-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="shared-styles">
+ .labelNameCell,
+ .buttonsCell,
+ .selectedValueCell {
+ padding: var(--spacing-s) var(--spacing-m);
+ display: table-cell;
+ }
+ /* We want the :hover highlight to extend to the border of the dialog. */
+ .labelNameCell {
+ padding-left: var(--spacing-xl);
+ }
+ .selectedValueCell {
+ padding-right: var(--spacing-xl);
+ }
+ /* This is a trick to let the selectedValueCell take the remaining width. */
+ .labelNameCell,
+ .buttonsCell {
+ white-space: nowrap;
+ }
+ .selectedValueCell {
+ width: 75%;
+ }
+ .labelMessage {
+ color: var(--deemphasized-text-color);
+ }
+ gr-button {
+ min-width: 42px;
+ box-sizing: border-box;
+ --gr-button: {
+ background-color: var(
+ --button-background-color,
+ var(--table-header-background-color)
+ );
+ color: var(--primary-text-color);
+ padding: 0 var(--spacing-m);
+ @apply --vote-chip-styles;
+ }
+ }
+ gr-button.iron-selected[vote='max'] {
+ --button-background-color: var(--vote-color-approved);
+ }
+ gr-button.iron-selected[vote='positive'] {
+ --button-background-color: var(--vote-color-recommended);
+ }
+ gr-button.iron-selected[vote='min'] {
+ --button-background-color: var(--vote-color-rejected);
+ }
+ gr-button.iron-selected[vote='negative'] {
+ --button-background-color: var(--vote-color-disliked);
+ }
+ gr-button.iron-selected[vote='neutral'] {
+ --button-background-color: var(--vote-color-neutral);
+ }
+ .placeholder {
+ display: inline-block;
+ width: 42px;
+ height: 1px;
+ }
+ .placeholder::before {
+ content: ' ';
+ }
+ .selectedValueCell {
+ color: var(--deemphasized-text-color);
+ font-style: italic;
+ }
+ .selectedValueCell.hidden {
+ display: none;
+ }
+ @media only screen and (max-width: 50em) {
.selectedValueCell {
- padding: var(--spacing-s) var(--spacing-m);
- display: table-cell;
- }
- /* We want the :hover highlight to extend to the border of the dialog. */
- .labelNameCell {
- padding-left: var(--spacing-xl);
- }
- .selectedValueCell {
- padding-right: var(--spacing-xl);
- }
- /* This is a trick to let the selectedValueCell take the remaining width. */
- .labelNameCell,
- .buttonsCell {
- white-space: nowrap;
- }
- .selectedValueCell {
- width: 75%;
- }
- .labelMessage {
- color: var(--deemphasized-text-color);
- }
- gr-button {
- min-width: 42px;
- box-sizing: border-box;
- --gr-button: {
- background-color: var(--button-background-color, var(--table-header-background-color));
- color: var(--primary-text-color);
- padding: 0 var(--spacing-m);
- @apply --vote-chip-styles;
- }
- }
- gr-button.iron-selected[vote="max"] {
- --button-background-color: var(--vote-color-approved);
- }
- gr-button.iron-selected[vote="positive"] {
- --button-background-color: var(--vote-color-recommended);
- }
- gr-button.iron-selected[vote="min"] {
- --button-background-color: var(--vote-color-rejected);
- }
- gr-button.iron-selected[vote="negative"] {
- --button-background-color: var(--vote-color-disliked);
- }
- gr-button.iron-selected[vote="neutral"] {
- --button-background-color: var(--vote-color-neutral);
- }
- .placeholder {
- display: inline-block;
- width: 42px;
- height: 1px;
- }
- .placeholder::before {
- content: ' ';
- }
- .selectedValueCell {
- color: var(--deemphasized-text-color);
- font-style: italic;
- }
- .selectedValueCell.hidden {
display: none;
}
- @media only screen and (max-width: 50em) {
- .selectedValueCell {
- display: none;
- }
- }
- </style>
- <span class="labelNameCell">[[label.name]]</span>
- <div class="buttonsCell">
- <template is="dom-repeat" items="[[_computeBlankItems(permittedLabels, label.name, 'start')]]" as="value">
- <span class="placeholder" data-label\$="[[label.name]]"></span>
+ }
+ </style>
+ <span class="labelNameCell">[[label.name]]</span>
+ <div class="buttonsCell">
+ <template
+ is="dom-repeat"
+ items="[[_computeBlankItems(permittedLabels, label.name, 'start')]]"
+ as="value"
+ >
+ <span class="placeholder" data-label$="[[label.name]]"></span>
+ </template>
+ <iron-selector
+ id="labelSelector"
+ attr-for-selected="data-value"
+ selected="[[_computeLabelValue(labels, permittedLabels, label)]]"
+ hidden$="[[!_computeAnyPermittedLabelValues(permittedLabels, label.name)]]"
+ on-selected-item-changed="_setSelectedValueText"
+ >
+ <template is="dom-repeat" items="[[_items]]" as="value">
+ <gr-button
+ vote$="[[_computeVoteAttribute(value, index, _items.length)]]"
+ has-tooltip=""
+ data-name$="[[label.name]]"
+ data-value$="[[value]]"
+ title$="[[_computeLabelValueTitle(labels, label.name, value)]]"
+ >
+ [[value]]</gr-button
+ >
</template>
- <iron-selector id="labelSelector" attr-for-selected="data-value" selected="[[_computeLabelValue(labels, permittedLabels, label)]]" hidden\$="[[!_computeAnyPermittedLabelValues(permittedLabels, label.name)]]" on-selected-item-changed="_setSelectedValueText">
- <template is="dom-repeat" items="[[_items]]" as="value">
- <gr-button vote\$="[[_computeVoteAttribute(value, index, _items.length)]]" has-tooltip="" data-name\$="[[label.name]]" data-value\$="[[value]]" title\$="[[_computeLabelValueTitle(labels, label.name, value)]]">
- [[value]]</gr-button>
- </template>
- </iron-selector>
- <template is="dom-repeat" items="[[_computeBlankItems(permittedLabels, label.name, 'end')]]" as="value">
- <span class="placeholder" data-label\$="[[label.name]]"></span>
- </template>
- <span class="labelMessage" hidden\$="[[_computeAnyPermittedLabelValues(permittedLabels, label.name)]]">
- You don't have permission to edit this label.
- </span>
- </div>
- <div class\$="selectedValueCell [[_computeHiddenClass(permittedLabels, label.name)]]">
- <span id="selectedValueLabel">[[_selectedValueText]]</span>
- </div>
+ </iron-selector>
+ <template
+ is="dom-repeat"
+ items="[[_computeBlankItems(permittedLabels, label.name, 'end')]]"
+ as="value"
+ >
+ <span class="placeholder" data-label$="[[label.name]]"></span>
+ </template>
+ <span
+ class="labelMessage"
+ hidden$="[[_computeAnyPermittedLabelValues(permittedLabels, label.name)]]"
+ >
+ You don't have permission to edit this label.
+ </span>
+ </div>
+ <div
+ class$="selectedValueCell [[_computeHiddenClass(permittedLabels, label.name)]]"
+ >
+ <span id="selectedValueLabel">[[_selectedValueText]]</span>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores_html.js b/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores_html.js
index b9c53c3..1e3e7ec 100644
--- a/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores_html.js
+++ b/polygerrit-ui/app/elements/change/gr-label-scores/gr-label-scores_html.js
@@ -17,32 +17,39 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- .scoresTable {
- display: table;
- width: 100%;
- }
- .mergedMessage {
- font-style: italic;
- text-align: center;
- width: 100%;
- }
- gr-label-score-row:hover {
- background-color: var(--hover-background-color);
- }
- gr-label-score-row {
- display: table-row;
- }
- gr-label-score-row.no-access {
- display: var(--label-no-access-display, table-row);
- }
- </style>
- <div class="scoresTable">
- <template is="dom-repeat" items="[[_labels]]" as="label">
- <gr-label-score-row class\$="[[_computeLabelAccessClass(label.name, permittedLabels)]]" label="[[label]]" name="[[label.name]]" labels="[[change.labels]]" permitted-labels="[[permittedLabels]]" label-values="[[_labelValues]]"></gr-label-score-row>
- </template>
- </div>
- <div class="mergedMessage" hidden\$="[[!_changeIsMerged(change.status)]]">
- Because this change has been merged, votes may not be decreased.
- </div>
+ <style include="shared-styles">
+ .scoresTable {
+ display: table;
+ width: 100%;
+ }
+ .mergedMessage {
+ font-style: italic;
+ text-align: center;
+ width: 100%;
+ }
+ gr-label-score-row:hover {
+ background-color: var(--hover-background-color);
+ }
+ gr-label-score-row {
+ display: table-row;
+ }
+ gr-label-score-row.no-access {
+ display: var(--label-no-access-display, table-row);
+ }
+ </style>
+ <div class="scoresTable">
+ <template is="dom-repeat" items="[[_labels]]" as="label">
+ <gr-label-score-row
+ class$="[[_computeLabelAccessClass(label.name, permittedLabels)]]"
+ label="[[label]]"
+ name="[[label.name]]"
+ labels="[[change.labels]]"
+ permitted-labels="[[permittedLabels]]"
+ label-values="[[_labelValues]]"
+ ></gr-label-score-row>
+ </template>
+ </div>
+ <div class="mergedMessage" hidden$="[[!_changeIsMerged(change.status)]]">
+ Because this change has been merged, votes may not be decreased.
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-message/gr-message_html.js b/polygerrit-ui/app/elements/change/gr-message/gr-message_html.js
index 5754fdc..c8e1cc1 100644
--- a/polygerrit-ui/app/elements/change/gr-message/gr-message_html.js
+++ b/polygerrit-ui/app/elements/change/gr-message/gr-message_html.js
@@ -17,237 +17,288 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="gr-voting-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="shared-styles">
- :host {
- display: block;
- position: relative;
- cursor: pointer;
- overflow-y: hidden;
- }
- :host(.expanded) {
- cursor: auto;
- }
- .collapsed .contentContainer {
- align-items: center;
- color: var(--deemphasized-text-color);
- display: flex;
- white-space: nowrap;
- }
- .contentContainer {
- padding: var(--spacing-m) var(--spacing-l);
- }
- .collapsed .contentContainer {
- /* For expanded state we inherit the alternating background color
+ <style include="gr-voting-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ position: relative;
+ cursor: pointer;
+ overflow-y: hidden;
+ }
+ :host(.expanded) {
+ cursor: auto;
+ }
+ .collapsed .contentContainer {
+ align-items: center;
+ color: var(--deemphasized-text-color);
+ display: flex;
+ white-space: nowrap;
+ }
+ .contentContainer {
+ padding: var(--spacing-m) var(--spacing-l);
+ }
+ .collapsed .contentContainer {
+ /* For expanded state we inherit the alternating background color
that is set in gr-messages-list. */
- background-color: var(--background-color-primary);
- }
- .name {
+ background-color: var(--background-color-primary);
+ }
+ .name {
+ font-weight: var(--font-weight-bold);
+ }
+ .message {
+ --gr-formatted-text-prose-max-width: 80ch;
+ }
+ .collapsed .message {
+ max-width: none;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+ .collapsed .author,
+ .collapsed .content,
+ .collapsed .message,
+ .collapsed .updateCategory,
+ gr-account-chip {
+ display: inline;
+ }
+ gr-button {
+ margin: 0 -4px;
+ }
+ .collapsed gr-comment-list,
+ .collapsed .replyBtn,
+ .collapsed .deleteBtn,
+ .collapsed .hideOnCollapsed,
+ .hideOnOpen {
+ display: none;
+ }
+ .replyBtn {
+ margin-right: var(--spacing-m);
+ }
+ .collapsed .hideOnOpen {
+ display: block;
+ }
+ .collapsed .content {
+ flex: 1;
+ margin-right: var(--spacing-m);
+ min-width: 0;
+ overflow: hidden;
+ }
+ .collapsed .content.messageContent {
+ text-overflow: ellipsis;
+ }
+ .collapsed .dateContainer {
+ position: static;
+ }
+ .collapsed .author {
+ overflow: hidden;
+ color: var(--primary-text-color);
+ margin-right: var(--spacing-s);
+ }
+ .authorLabel {
+ min-width: 160px;
+ display: inline-block;
+ }
+ .expanded .author {
+ cursor: pointer;
+ margin-bottom: var(--spacing-m);
+ }
+ .expanded .content {
+ padding-left: 40px;
+ }
+ .dateContainer {
+ position: absolute;
+ /* right and top values should match .contentContainer padding */
+ right: var(--spacing-l);
+ top: var(--spacing-m);
+ }
+ .dateContainer .patchset {
+ margin-right: var(--spacing-m);
+ color: var(--deemphasized-text-color);
+ }
+ .dateContainer .patchset:before {
+ content: 'Patchset ';
+ }
+ span.date {
+ color: var(--deemphasized-text-color);
+ }
+ span.date:hover {
+ text-decoration: underline;
+ }
+ .dateContainer iron-icon {
+ cursor: pointer;
+ vertical-align: top;
+ }
+ .score {
+ border-radius: var(--border-radius);
+ color: var(--primary-text-color);
+ display: inline-block;
+ padding: 0 var(--spacing-s);
+ text-align: center;
+ }
+ .score,
+ .commentsSummary {
+ margin-right: var(--spacing-s);
+ min-width: 115px;
+ }
+ .expanded .commentsSummary {
+ display: none;
+ }
+ .commentsIcon {
+ vertical-align: top;
+ }
+ .score.removed {
+ background-color: var(--vote-color-neutral);
+ }
+ .score.negative {
+ background-color: var(--vote-color-disliked);
+ }
+ .score.negative.min {
+ background-color: var(--vote-color-rejected);
+ }
+ .score.positive {
+ background-color: var(--vote-color-recommended);
+ }
+ .score.positive.max {
+ background-color: var(--vote-color-approved);
+ }
+ gr-account-label {
+ --gr-account-label-text-style: {
font-weight: var(--font-weight-bold);
}
- .message {
- --gr-formatted-text-prose-max-width: 80ch;
- }
- .collapsed .message {
- max-width: none;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .collapsed .author,
- .collapsed .content,
- .collapsed .message,
- .collapsed .updateCategory,
- gr-account-chip {
- display: inline;
- }
- gr-button {
- margin: 0 -4px;
- }
- .collapsed gr-comment-list,
- .collapsed .replyBtn,
- .collapsed .deleteBtn,
- .collapsed .hideOnCollapsed,
- .hideOnOpen {
- display: none;
- }
- .replyBtn {
- margin-right: var(--spacing-m);
- }
- .collapsed .hideOnOpen {
- display: block;
- }
- .collapsed .content {
- flex: 1;
- margin-right: var(--spacing-m);
- min-width: 0;
- overflow: hidden;
- }
- .collapsed .content.messageContent {
- text-overflow: ellipsis;
- }
- .collapsed .dateContainer {
- position: static;
- }
- .collapsed .author {
- overflow: hidden;
- color: var(--primary-text-color);
- margin-right: var(--spacing-s);
- }
- .authorLabel {
- min-width: 160px;
- display: inline-block;
- }
- .expanded .author {
- cursor: pointer;
- margin-bottom: var(--spacing-m);
- }
+ }
+ @media screen and (max-width: 50em) {
.expanded .content {
- padding-left: 40px;
- }
- .dateContainer {
- position: absolute;
- /* right and top values should match .contentContainer padding */
- right: var(--spacing-l);
- top: var(--spacing-m);
- }
- .dateContainer .patchset {
- margin-right: var(--spacing-m);
- color: var(--deemphasized-text-color);
- }
- .dateContainer .patchset:before {
- content: 'Patchset ';
- }
- span.date {
- color: var(--deemphasized-text-color);
- }
- span.date:hover {
- text-decoration: underline;
- }
- .dateContainer iron-icon {
- cursor: pointer;
- vertical-align: top;
- }
- .score {
- border-radius: var(--border-radius);
- color: var(--primary-text-color);
- display: inline-block;
- padding: 0 var(--spacing-s);
- text-align: center;
+ padding-left: 0;
}
.score,
- .commentsSummary {
- margin-right: var(--spacing-s);
- min-width: 115px;
+ .commentsSummary,
+ .authorLabel {
+ min-width: 0px;
}
- .expanded .commentsSummary {
- display: none;
+ .dateContainer .patchset:before {
+ content: 'PS ';
}
- .commentsIcon {
- vertical-align: top;
- }
- .score.removed {
- background-color: var(--vote-color-neutral);
- }
- .score.negative {
- background-color: var(--vote-color-disliked);
- }
- .score.negative.min {
- background-color: var(--vote-color-rejected);
- }
- .score.positive {
- background-color: var(--vote-color-recommended);
- }
- .score.positive.max {
- background-color: var(--vote-color-approved);
- }
- gr-account-label {
- --gr-account-label-text-style: {
- font-weight: var(--font-weight-bold);
- };
- }
- @media screen and (max-width: 50em) {
- .expanded .content {
- padding-left: 0;
- }
- .score,
- .commentsSummary,
- .authorLabel {
- min-width: 0px;
- }
- .dateContainer .patchset:before {
- content: 'PS ';
- }
- }
- </style>
- <div class\$="[[_computeClass(_expanded)]]">
- <div class="contentContainer">
- <div class="author" on-click="_handleAuthorClick">
- <span hidden\$="[[!showOnBehalfOf]]">
- <span class="name">[[message.real_author.name]]</span>
- on behalf of
+ }
+ </style>
+ <div class$="[[_computeClass(_expanded)]]">
+ <div class="contentContainer">
+ <div class="author" on-click="_handleAuthorClick">
+ <span hidden$="[[!showOnBehalfOf]]">
+ <span class="name">[[message.real_author.name]]</span>
+ on behalf of
+ </span>
+ <gr-account-label
+ account="[[author]]"
+ class="authorLabel"
+ ></gr-account-label>
+ <template
+ is="dom-repeat"
+ items="[[_getScores(message, labelExtremes)]]"
+ as="score"
+ >
+ <span class$="score [[_computeScoreClass(score, labelExtremes)]]">
+ [[score.label]] [[score.value]]
</span>
- <gr-account-label account="[[author]]" class="authorLabel"></gr-account-label>
- <template is="dom-repeat" items="[[_getScores(message, labelExtremes)]]" as="score">
- <span class\$="score [[_computeScoreClass(score, labelExtremes)]]">
- [[score.label]] [[score.value]]
- </span>
+ </template>
+ </div>
+ <template is="dom-if" if="[[_commentCountText]]">
+ <div class="commentsSummary">
+ <iron-icon icon="gr-icons:comment" class="commentsIcon"></iron-icon>
+ <span class="numberOfComments">[[_commentCountText]]</span>
+ </div>
+ </template>
+ <template is="dom-if" if="[[message.message]]">
+ <div class="content messageContent">
+ <div class="message hideOnOpen">[[_messageContentCollapsed]]</div>
+ <gr-formatted-text
+ no-trailing-margin=""
+ class="message hideOnCollapsed"
+ content="[[_messageContentExpanded]]"
+ config="[[_projectConfig.commentlinks]]"
+ ></gr-formatted-text>
+ <template is="dom-if" if="[[!_isMessageContentEmpty()]]">
+ <div
+ class="replyActionContainer"
+ hidden$="[[!showReplyButton]]"
+ hidden=""
+ >
+ <gr-button
+ class="replyBtn"
+ link=""
+ small=""
+ on-click="_handleReplyTap"
+ >
+ Reply
+ </gr-button>
+ <gr-button
+ disabled$="[[_isDeletingChangeMsg]]"
+ class="deleteBtn"
+ hidden$="[[!_isAdmin]]"
+ hidden=""
+ link=""
+ small=""
+ on-click="_handleDeleteMessage"
+ >
+ Delete
+ </gr-button>
+ </div>
+ </template>
+ <gr-comment-list
+ comments="[[comments]]"
+ change-num="[[changeNum]]"
+ patch-num="[[message._revision_number]]"
+ project-name="[[projectName]]"
+ project-config="[[_projectConfig]]"
+ ></gr-comment-list>
+ </div>
+ </template>
+ <template is="dom-if" if="[[_computeIsReviewerUpdate(message)]]">
+ <div class="content">
+ <template is="dom-repeat" items="[[message.updates]]" as="update">
+ <div class="updateCategory">
+ [[update.message]]
+ <template
+ is="dom-repeat"
+ items="[[update.reviewers]]"
+ as="reviewer"
+ >
+ <gr-account-chip account="[[reviewer]]"> </gr-account-chip>
+ </template>
+ </div>
</template>
</div>
- <template is="dom-if" if="[[_commentCountText]]">
- <div class="commentsSummary">
- <iron-icon icon="gr-icons:comment" class="commentsIcon"></iron-icon>
- <span class="numberOfComments">[[_commentCountText]]</span>
- </div>
+ </template>
+ <span class="dateContainer">
+ <template is="dom-if" if="[[message._revision_number]]">
+ <span class="patchset">[[message._revision_number]]</span>
</template>
- <template is="dom-if" if="[[message.message]]">
- <div class="content messageContent">
- <div class="message hideOnOpen">[[_messageContentCollapsed]]</div>
- <gr-formatted-text no-trailing-margin="" class="message hideOnCollapsed" content="[[_messageContentExpanded]]" config="[[_projectConfig.commentlinks]]"></gr-formatted-text>
- <template is="dom-if" if="[[!_isMessageContentEmpty()]]">
- <div class="replyActionContainer" hidden\$="[[!showReplyButton]]" hidden="">
- <gr-button class="replyBtn" link="" small="" on-click="_handleReplyTap">
- Reply
- </gr-button>
- <gr-button disabled\$="[[_isDeletingChangeMsg]]" class="deleteBtn" hidden\$="[[!_isAdmin]]" hidden="" link="" small="" on-click="_handleDeleteMessage">
- Delete
- </gr-button>
- </div>
- </template>
- <gr-comment-list comments="[[comments]]" change-num="[[changeNum]]" patch-num="[[message._revision_number]]" project-name="[[projectName]]" project-config="[[_projectConfig]]"></gr-comment-list>
- </div>
+ <template is="dom-if" if="[[!message.id]]">
+ <span class="date">
+ <gr-date-formatter
+ has-tooltip=""
+ show-date-and-time=""
+ date-str="[[message.date]]"
+ ></gr-date-formatter>
+ </span>
</template>
- <template is="dom-if" if="[[_computeIsReviewerUpdate(message)]]">
- <div class="content">
- <template is="dom-repeat" items="[[message.updates]]" as="update">
- <div class="updateCategory">
- [[update.message]]
- <template is="dom-repeat" items="[[update.reviewers]]" as="reviewer">
- <gr-account-chip account="[[reviewer]]">
- </gr-account-chip>
- </template>
- </div>
- </template>
- </div>
+ <template is="dom-if" if="[[message.id]]">
+ <span class="date" on-click="_handleAnchorClick">
+ <gr-date-formatter
+ has-tooltip=""
+ show-date-and-time=""
+ date-str="[[message.date]]"
+ ></gr-date-formatter>
+ </span>
</template>
- <span class="dateContainer">
- <template is="dom-if" if="[[message._revision_number]]">
- <span class="patchset">[[message._revision_number]]</span>
- </template>
- <template is="dom-if" if="[[!message.id]]">
- <span class="date">
- <gr-date-formatter has-tooltip="" show-date-and-time="" date-str="[[message.date]]"></gr-date-formatter>
- </span>
- </template>
- <template is="dom-if" if="[[message.id]]">
- <span class="date" on-click="_handleAnchorClick">
- <gr-date-formatter has-tooltip="" show-date-and-time="" date-str="[[message.date]]"></gr-date-formatter>
- </span>
- </template>
- <iron-icon id="expandToggle" on-click="_toggleExpanded" title="Toggle expanded state" icon="[[_computeExpandToggleIcon(_expanded)]]"></iron-icon>
- </span>
- </div>
+ <iron-icon
+ id="expandToggle"
+ on-click="_toggleExpanded"
+ title="Toggle expanded state"
+ icon="[[_computeExpandToggleIcon(_expanded)]]"
+ ></iron-icon>
+ </span>
</div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list-experimental_html.js b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list-experimental_html.js
index 83e2815..540418b 100644
--- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list-experimental_html.js
+++ b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list-experimental_html.js
@@ -17,58 +17,83 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: flex;
- justify-content: space-between;
+ <style include="shared-styles">
+ :host {
+ display: flex;
+ justify-content: space-between;
+ }
+ .header {
+ align-items: center;
+ border-top: 1px solid var(--border-color);
+ border-bottom: 1px solid var(--border-color);
+ display: flex;
+ justify-content: space-between;
+ padding: var(--spacing-s) var(--spacing-l);
+ }
+ .highlighted {
+ animation: 3s fadeOut;
+ }
+ @keyframes fadeOut {
+ 0% {
+ background-color: var(--emphasis-color);
}
- .header {
- align-items: center;
- border-top: 1px solid var(--border-color);
- border-bottom: 1px solid var(--border-color);
- display: flex;
- justify-content: space-between;
- padding: var(--spacing-s) var(--spacing-l);
+ 100% {
+ background-color: var(--view-background-color);
}
- .highlighted {
- animation: 3s fadeOut;
- }
- @keyframes fadeOut {
- 0% { background-color: var(--emphasis-color); }
- 100% { background-color: var(--view-background-color); }
- }
- .container {
- align-items: center;
- display: flex;
- }
- gr-message:not(:last-of-type) {
- border-bottom: 1px solid var(--border-color);
- }
- gr-message:nth-child(2n) {
- background-color: var(--background-color-secondary);
- }
- gr-message:nth-child(2n+1) {
- background-color: var(--background-color-tertiary);
- }
- </style>
- <div class="header">
- <span id="automatedMessageToggleContainer" class="container" hidden\$="[[!_hasAutomatedMessages(messages)]]">
- <paper-toggle-button id="automatedMessageToggle" checked="{{_hideAutomated}}"></paper-toggle-button>Only comments
- <span class="transparent separator"></span>
- </span>
- <gr-button id="collapse-messages" link="" title="[[_expandAllTitle]]" on-click="_handleExpandCollapseTap">
- [[_expandAllState]]
- </gr-button>
- </div>
- <template id="messageRepeat" is="dom-repeat" items="[[_combinedMessages]]" as="message" filter="_isMessageVisible">
- <gr-message change-num="[[changeNum]]"
- message="[[message]]"
- comments="[[_computeCommentsForMessage(changeComments, message)]]"
- project-name="[[projectName]]"
- show-reply-button="[[showReplyButtons]]"
- on-message-anchor-tap="_handleAnchorClick"
- label-extremes="[[_labelExtremes]]"
- data-message-id\$="[[message.id]]"></gr-message>
- </template>
- <gr-reporting id="reporting" category="message-list"></gr-reporting>
+ }
+ .container {
+ align-items: center;
+ display: flex;
+ }
+ gr-message:not(:last-of-type) {
+ border-bottom: 1px solid var(--border-color);
+ }
+ gr-message:nth-child(2n) {
+ background-color: var(--background-color-secondary);
+ }
+ gr-message:nth-child(2n + 1) {
+ background-color: var(--background-color-tertiary);
+ }
+ </style>
+ <div class="header">
+ <span
+ id="automatedMessageToggleContainer"
+ class="container"
+ hidden$="[[!_hasAutomatedMessages(messages)]]"
+ >
+ <paper-toggle-button
+ id="automatedMessageToggle"
+ checked="{{_hideAutomated}}"
+ ></paper-toggle-button
+ >Only comments
+ <span class="transparent separator"></span>
+ </span>
+ <gr-button
+ id="collapse-messages"
+ link=""
+ title="[[_expandAllTitle]]"
+ on-click="_handleExpandCollapseTap"
+ >
+ [[_expandAllState]]
+ </gr-button>
+ </div>
+ <template
+ id="messageRepeat"
+ is="dom-repeat"
+ items="[[_combinedMessages]]"
+ as="message"
+ filter="_isMessageVisible"
+ >
+ <gr-message
+ change-num="[[changeNum]]"
+ message="[[message]]"
+ comments="[[_computeCommentsForMessage(changeComments, message)]]"
+ project-name="[[projectName]]"
+ show-reply-button="[[showReplyButtons]]"
+ on-message-anchor-tap="_handleAnchorClick"
+ label-extremes="[[_labelExtremes]]"
+ data-message-id$="[[message.id]]"
+ ></gr-message>
+ </template>
+ <gr-reporting id="reporting" category="message-list"></gr-reporting>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_html.js b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_html.js
index 1a24234..94ae1b0 100644
--- a/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_html.js
+++ b/polygerrit-ui/app/elements/change/gr-messages-list/gr-messages-list_html.js
@@ -17,77 +17,116 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host,
- .messageListControls {
- display: flex;
- justify-content: space-between;
+ <style include="shared-styles">
+ :host,
+ .messageListControls {
+ display: flex;
+ justify-content: space-between;
+ }
+ .header {
+ align-items: center;
+ border-top: 1px solid var(--border-color);
+ border-bottom: 1px solid var(--border-color);
+ display: flex;
+ justify-content: space-between;
+ padding: var(--spacing-s) var(--spacing-l);
+ }
+ #messageControlsContainer {
+ padding: 0 var(--spacing-l);
+ }
+ .highlighted {
+ animation: 3s fadeOut;
+ }
+ @keyframes fadeOut {
+ 0% {
+ background-color: var(--emphasis-color);
}
- .header {
- align-items: center;
- border-top: 1px solid var(--border-color);
- border-bottom: 1px solid var(--border-color);
- display: flex;
- justify-content: space-between;
- padding: var(--spacing-s) var(--spacing-l);
+ 100% {
+ background-color: var(--view-background-color);
}
- #messageControlsContainer {
- padding: 0 var(--spacing-l);
- }
- .highlighted {
- animation: 3s fadeOut;
- }
- @keyframes fadeOut {
- 0% { background-color: var(--emphasis-color); }
- 100% { background-color: var(--view-background-color); }
- }
- #messageControlsContainer {
- align-items: center;
- background-color: var(--background-color-secondary);
- border-bottom: 1px solid var(--border-color);
- display: flex;
- height: 2.25em;
- justify-content: center;
- }
- #messageControlsContainer gr-button {
- padding: var(--spacing-s) 0;
- }
- .container {
- align-items: center;
- display: flex;
- }
- gr-message:not(:last-of-type) {
- border-bottom: 1px solid var(--border-color);
- }
- gr-message:nth-child(2n) {
- background-color: var(--background-color-secondary);
- }
- gr-message:nth-child(2n+1) {
- background-color: var(--background-color-tertiary);
- }
- </style>
- <div class="header">
- <span id="automatedMessageToggleContainer" class="container" hidden\$="[[!_hasAutomatedMessages(messages)]]">
- <paper-toggle-button id="automatedMessageToggle" checked="{{_hideAutomated}}"></paper-toggle-button>Only comments
- <span class="transparent separator"></span>
- </span>
- <gr-button id="collapse-messages" link="" title="[[_expandAllTitle]]" on-click="_handleExpandCollapseTap">
- [[_expandAllState]]
- </gr-button>
- </div>
- <span id="messageControlsContainer" hidden\$="[[_computeShowHideTextHidden(_visibleMessages, _processedMessages, _hideAutomated, _visibleMessages.length)]]">
- <gr-button id="oldMessagesBtn" link="" on-click="_handleShowAllTap">
- [[_computeNumMessagesText(_visibleMessages, _processedMessages, _hideAutomated, _visibleMessages.length)]]
- </gr-button>
- <span class="container" hidden\$="[[_computeIncrementHidden(_visibleMessages, _processedMessages, _hideAutomated, _visibleMessages.length)]]">
- <span class="transparent separator"></span>
- <gr-button id="incrementMessagesBtn" link="" on-click="_handleIncrementShownMessages">
- [[_computeIncrementText(_visibleMessages, _processedMessages, _hideAutomated, _visibleMessages.length)]]
- </gr-button>
- </span>
+ }
+ #messageControlsContainer {
+ align-items: center;
+ background-color: var(--background-color-secondary);
+ border-bottom: 1px solid var(--border-color);
+ display: flex;
+ height: 2.25em;
+ justify-content: center;
+ }
+ #messageControlsContainer gr-button {
+ padding: var(--spacing-s) 0;
+ }
+ .container {
+ align-items: center;
+ display: flex;
+ }
+ gr-message:not(:last-of-type) {
+ border-bottom: 1px solid var(--border-color);
+ }
+ gr-message:nth-child(2n) {
+ background-color: var(--background-color-secondary);
+ }
+ gr-message:nth-child(2n + 1) {
+ background-color: var(--background-color-tertiary);
+ }
+ </style>
+ <div class="header">
+ <span
+ id="automatedMessageToggleContainer"
+ class="container"
+ hidden$="[[!_hasAutomatedMessages(messages)]]"
+ >
+ <paper-toggle-button
+ id="automatedMessageToggle"
+ checked="{{_hideAutomated}}"
+ ></paper-toggle-button
+ >Only comments
+ <span class="transparent separator"></span>
</span>
- <template is="dom-repeat" items="[[_visibleMessages]]" as="message">
- <gr-message change-num="[[changeNum]]" message="[[message]]" comments="[[_computeCommentsForMessage(changeComments, message)]]" hide-automated="[[_hideAutomated]]" project-name="[[projectName]]" show-reply-button="[[showReplyButtons]]" on-message-anchor-tap="_handleAnchorClick" label-extremes="[[_labelExtremes]]" data-message-id\$="[[message.id]]"></gr-message>
- </template>
- <gr-reporting id="reporting" category="message-list"></gr-reporting>
+ <gr-button
+ id="collapse-messages"
+ link=""
+ title="[[_expandAllTitle]]"
+ on-click="_handleExpandCollapseTap"
+ >
+ [[_expandAllState]]
+ </gr-button>
+ </div>
+ <span
+ id="messageControlsContainer"
+ hidden$="[[_computeShowHideTextHidden(_visibleMessages, _processedMessages, _hideAutomated, _visibleMessages.length)]]"
+ >
+ <gr-button id="oldMessagesBtn" link="" on-click="_handleShowAllTap">
+ [[_computeNumMessagesText(_visibleMessages, _processedMessages,
+ _hideAutomated, _visibleMessages.length)]]
+ </gr-button>
+ <span
+ class="container"
+ hidden$="[[_computeIncrementHidden(_visibleMessages, _processedMessages, _hideAutomated, _visibleMessages.length)]]"
+ >
+ <span class="transparent separator"></span>
+ <gr-button
+ id="incrementMessagesBtn"
+ link=""
+ on-click="_handleIncrementShownMessages"
+ >
+ [[_computeIncrementText(_visibleMessages, _processedMessages,
+ _hideAutomated, _visibleMessages.length)]]
+ </gr-button>
+ </span>
+ </span>
+ <template is="dom-repeat" items="[[_visibleMessages]]" as="message">
+ <gr-message
+ change-num="[[changeNum]]"
+ message="[[message]]"
+ comments="[[_computeCommentsForMessage(changeComments, message)]]"
+ hide-automated="[[_hideAutomated]]"
+ project-name="[[projectName]]"
+ show-reply-button="[[showReplyButtons]]"
+ on-message-anchor-tap="_handleAnchorClick"
+ label-extremes="[[_labelExtremes]]"
+ data-message-id$="[[message.id]]"
+ ></gr-message>
+ </template>
+ <gr-reporting id="reporting" category="message-list"></gr-reporting>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_html.js b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_html.js
index 1d8551d..687dbd7 100644
--- a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_html.js
+++ b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list_html.js
@@ -17,145 +17,187 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- }
- h3 {
- margin: var(--spacing-m) 0 0;
- }
- section {
- margin-bottom: 1.4em; /* Same as line height for collapse purposes */
- }
- a {
- display: block;
- }
- .changeContainer,
- a {
- max-width: 100%;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .changeContainer {
- display: flex;
- }
- .changeContainer.thisChange:before {
- content: '➔';
- width: 1.2em;
- }
- h4,
- section div {
- display: flex;
- }
- h4:before,
- section div:before {
- content: ' ';
- flex-shrink: 0;
- width: 1.2em;
- }
- .note {
- color: var(--error-text-color);
- }
- .relatedChanges a {
- display: inline-block;
- }
- .strikethrough {
- color: var(--deemphasized-text-color);
- text-decoration: line-through;
- }
- .status {
- color: var(--deemphasized-text-color);
- font-weight: var(--font-weight-bold);
- margin-left: var(--spacing-xs);
- }
- .notCurrent {
- color: #e65100;
- }
- .indirectAncestor {
- color: #33691e;
- }
- .submittable {
- color: #1b5e20;
- }
- .submittableCheck {
- color: var(--vote-text-color-recommended);
- display: none;
- }
- .submittableCheck.submittable {
- display: inline;
- }
- .hidden,
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ h3 {
+ margin: var(--spacing-m) 0 0;
+ }
+ section {
+ margin-bottom: 1.4em; /* Same as line height for collapse purposes */
+ }
+ a {
+ display: block;
+ }
+ .changeContainer,
+ a {
+ max-width: 100%;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .changeContainer {
+ display: flex;
+ }
+ .changeContainer.thisChange:before {
+ content: '➔';
+ width: 1.2em;
+ }
+ h4,
+ section div {
+ display: flex;
+ }
+ h4:before,
+ section div:before {
+ content: ' ';
+ flex-shrink: 0;
+ width: 1.2em;
+ }
+ .note {
+ color: var(--error-text-color);
+ }
+ .relatedChanges a {
+ display: inline-block;
+ }
+ .strikethrough {
+ color: var(--deemphasized-text-color);
+ text-decoration: line-through;
+ }
+ .status {
+ color: var(--deemphasized-text-color);
+ font-weight: var(--font-weight-bold);
+ margin-left: var(--spacing-xs);
+ }
+ .notCurrent {
+ color: #e65100;
+ }
+ .indirectAncestor {
+ color: #33691e;
+ }
+ .submittable {
+ color: #1b5e20;
+ }
+ .submittableCheck {
+ color: var(--vote-text-color-recommended);
+ display: none;
+ }
+ .submittableCheck.submittable {
+ display: inline;
+ }
+ .hidden,
+ .mobile {
+ display: none;
+ }
+ @media screen and (max-width: 60em) {
.mobile {
- display: none;
+ display: block;
}
- @media screen and (max-width: 60em) {
- .mobile {
- display: block;
- }
- }
- </style>
- <div>
- <section class="relatedChanges" hidden\$="[[!_relatedResponse.changes.length]]" hidden="">
- <h4>Relation chain</h4>
- <template is="dom-repeat" items="[[_relatedResponse.changes]]" as="related">
- <div class\$="rightIndent [[_computeChangeContainerClass(change, related)]]">
- <a href\$="[[_computeChangeURL(related._change_number, related.project, related._revision_number)]]" class\$="[[_computeLinkClass(related)]]" title\$="[[related.commit.subject]]">
- [[related.commit.subject]]
- </a>
- <span class\$="[[_computeChangeStatusClass(related)]]">
- ([[_computeChangeStatus(related)]])
- </span>
- </div>
- </template>
- </section>
- <section id="submittedTogether" class\$="[[_computeSubmittedTogetherClass(_submittedTogether)]]">
- <h4>Submitted together</h4>
- <template is="dom-repeat" items="[[_submittedTogether.changes]]" as="related">
- <div class\$="[[_computeChangeContainerClass(change, related)]]">
- <a href\$="[[_computeChangeURL(related._number, related.project)]]" class\$="[[_computeLinkClass(related)]]" title\$="[[related.project]]: [[related.branch]]: [[related.subject]]">
- [[related.project]]: [[related.branch]]: [[related.subject]]
- </a>
- <span tabindex="-1" title="Submittable" class\$="submittableCheck [[_computeLinkClass(related)]]">✓</span>
- </div>
- </template>
- <template is="dom-if" if="[[_submittedTogether.non_visible_changes]]">
- <div class="note">
- [[_computeNonVisibleChangesNote(_submittedTogether.non_visible_changes)]]
- </div>
- </template>
- </section>
- <section hidden\$="[[!_sameTopic.length]]" hidden="">
- <h4>Same topic</h4>
- <template is="dom-repeat" items="[[_sameTopic]]" as="change">
- <div>
- <a href\$="[[_computeChangeURL(change._number, change.project)]]" class\$="[[_computeLinkClass(change)]]" title\$="[[change.project]]: [[change.branch]]: [[change.subject]]">
- [[change.project]]: [[change.branch]]: [[change.subject]]
- </a>
- </div>
- </template>
- </section>
- <section hidden\$="[[!_conflicts.length]]" hidden="">
- <h4>Merge conflicts</h4>
- <template is="dom-repeat" items="[[_conflicts]]" as="change">
- <div>
- <a href\$="[[_computeChangeURL(change._number, change.project)]]" class\$="[[_computeLinkClass(change)]]" title\$="[[change.subject]]">
- [[change.subject]]
- </a>
- </div>
- </template>
- </section>
- <section hidden\$="[[!_cherryPicks.length]]" hidden="">
- <h4>Cherry picks</h4>
- <template is="dom-repeat" items="[[_cherryPicks]]" as="change">
- <div>
- <a href\$="[[_computeChangeURL(change._number, change.project)]]" class\$="[[_computeLinkClass(change)]]" title\$="[[change.branch]]: [[change.subject]]">
- [[change.branch]]: [[change.subject]]
- </a>
- </div>
- </template>
- </section>
- </div>
- <div hidden\$="[[!loading]]">Loading...</div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ }
+ </style>
+ <div>
+ <section
+ class="relatedChanges"
+ hidden$="[[!_relatedResponse.changes.length]]"
+ hidden=""
+ >
+ <h4>Relation chain</h4>
+ <template
+ is="dom-repeat"
+ items="[[_relatedResponse.changes]]"
+ as="related"
+ >
+ <div
+ class$="rightIndent [[_computeChangeContainerClass(change, related)]]"
+ >
+ <a
+ href$="[[_computeChangeURL(related._change_number, related.project, related._revision_number)]]"
+ class$="[[_computeLinkClass(related)]]"
+ title$="[[related.commit.subject]]"
+ >
+ [[related.commit.subject]]
+ </a>
+ <span class$="[[_computeChangeStatusClass(related)]]">
+ ([[_computeChangeStatus(related)]])
+ </span>
+ </div>
+ </template>
+ </section>
+ <section
+ id="submittedTogether"
+ class$="[[_computeSubmittedTogetherClass(_submittedTogether)]]"
+ >
+ <h4>Submitted together</h4>
+ <template
+ is="dom-repeat"
+ items="[[_submittedTogether.changes]]"
+ as="related"
+ >
+ <div class$="[[_computeChangeContainerClass(change, related)]]">
+ <a
+ href$="[[_computeChangeURL(related._number, related.project)]]"
+ class$="[[_computeLinkClass(related)]]"
+ title$="[[related.project]]: [[related.branch]]: [[related.subject]]"
+ >
+ [[related.project]]: [[related.branch]]: [[related.subject]]
+ </a>
+ <span
+ tabindex="-1"
+ title="Submittable"
+ class$="submittableCheck [[_computeLinkClass(related)]]"
+ >✓</span
+ >
+ </div>
+ </template>
+ <template is="dom-if" if="[[_submittedTogether.non_visible_changes]]">
+ <div class="note">
+ [[_computeNonVisibleChangesNote(_submittedTogether.non_visible_changes)]]
+ </div>
+ </template>
+ </section>
+ <section hidden$="[[!_sameTopic.length]]" hidden="">
+ <h4>Same topic</h4>
+ <template is="dom-repeat" items="[[_sameTopic]]" as="change">
+ <div>
+ <a
+ href$="[[_computeChangeURL(change._number, change.project)]]"
+ class$="[[_computeLinkClass(change)]]"
+ title$="[[change.project]]: [[change.branch]]: [[change.subject]]"
+ >
+ [[change.project]]: [[change.branch]]: [[change.subject]]
+ </a>
+ </div>
+ </template>
+ </section>
+ <section hidden$="[[!_conflicts.length]]" hidden="">
+ <h4>Merge conflicts</h4>
+ <template is="dom-repeat" items="[[_conflicts]]" as="change">
+ <div>
+ <a
+ href$="[[_computeChangeURL(change._number, change.project)]]"
+ class$="[[_computeLinkClass(change)]]"
+ title$="[[change.subject]]"
+ >
+ [[change.subject]]
+ </a>
+ </div>
+ </template>
+ </section>
+ <section hidden$="[[!_cherryPicks.length]]" hidden="">
+ <h4>Cherry picks</h4>
+ <template is="dom-repeat" items="[[_cherryPicks]]" as="change">
+ <div>
+ <a
+ href$="[[_computeChangeURL(change._number, change.project)]]"
+ class$="[[_computeLinkClass(change)]]"
+ title$="[[change.branch]]: [[change.subject]]"
+ >
+ [[change.branch]]: [[change.subject]]
+ </a>
+ </div>
+ </template>
+ </section>
+ </div>
+ <div hidden$="[[!loading]]">Loading...</div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_html.js b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_html.js
index 0c98834..54fd47a 100644
--- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_html.js
+++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog_html.js
@@ -17,213 +17,306 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- background-color: var(--dialog-background-color);
- display: block;
- max-height: 90vh;
- }
- :host([disabled]) {
- pointer-events: none;
- }
- :host([disabled]) .container {
- opacity: .5;
- }
- .container {
- display: flex;
- flex-direction: column;
- max-height: 100%;
- }
- section {
- border-top: 1px solid var(--border-color);
- flex-shrink: 0;
- padding: var(--spacing-m) var(--spacing-xl);
- width: 100%;
- }
- section.labelsContainer {
- /* We want the :hover highlight to extend to the border of the dialog. */
- padding: var(--spacing-m) 0;
- }
- .actions {
- background-color: var(--dialog-background-color);
- bottom: 0;
- display: flex;
- justify-content: space-between;
- position: sticky;
- /* @see Issue 8602 */
- z-index: 1;
- }
- .actions .right gr-button {
- margin-left: var(--spacing-l);
- }
- .peopleContainer,
- .labelsContainer {
- flex-shrink: 0;
- }
- .peopleContainer {
- border-top: none;
- display: table;
- }
- .peopleList {
- display: flex;
- }
- .peopleListLabel {
- color: var(--deemphasized-text-color);
- margin-top: var(--spacing-xs);
- min-width: 6em;
- padding-right: var(--spacing-m);
- }
- gr-account-list {
- display: flex;
- flex-wrap: wrap;
- flex: 1;
- }
- #reviewerConfirmationOverlay {
- padding: var(--spacing-l);
- text-align: center;
- }
- .reviewerConfirmationButtons {
- margin-top: var(--spacing-l);
- }
- .groupName {
- font-weight: var(--font-weight-bold);
- }
- .groupSize {
- font-style: italic;
- }
- .textareaContainer {
- min-height: 12em;
- position: relative;
- }
- .textareaContainer,
- #textarea,
- gr-endpoint-decorator {
- display: flex;
- width: 100%;
- }
- gr-endpoint-decorator[name="reply-label-scores"] {
- display: block;
- }
- .previewContainer gr-formatted-text {
- background: var(--table-header-background-color);
- padding: var(--spacing-l);
- }
- .draftsContainer h3 {
- margin-top: var(--spacing-xs);
- }
- #checkingStatusLabel,
- #notLatestLabel {
- margin-left: var(--spacing-l);
- }
- #checkingStatusLabel {
- color: var(--deemphasized-text-color);
- font-style: italic;
- }
- #notLatestLabel,
- #savingLabel {
- color: var(--error-text-color);
- }
- #savingLabel {
- display: none;
- }
- #savingLabel.saving {
- display: inline;
- }
- #pluginMessage {
- color: var(--deemphasized-text-color);
- margin-left: var(--spacing-l);
- margin-bottom: var(--spacing-m);
- }
- #pluginMessage:empty {
- display: none;
- }
- </style>
- <div class="container" tabindex="-1">
- <section class="peopleContainer">
- <div class="peopleList">
- <div class="peopleListLabel">Reviewers</div>
- <gr-account-list id="reviewers" accounts="{{_reviewers}}" removable-values="[[change.removable_reviewers]]" filter="[[filterReviewerSuggestion]]" pending-confirmation="{{_reviewerPendingConfirmation}}" placeholder="Add reviewer..." on-account-text-changed="_handleAccountTextEntry" suggestions-provider="[[_getReviewerSuggestionsProvider(change)]]">
- </gr-account-list>
+ <style include="shared-styles">
+ :host {
+ background-color: var(--dialog-background-color);
+ display: block;
+ max-height: 90vh;
+ }
+ :host([disabled]) {
+ pointer-events: none;
+ }
+ :host([disabled]) .container {
+ opacity: 0.5;
+ }
+ .container {
+ display: flex;
+ flex-direction: column;
+ max-height: 100%;
+ }
+ section {
+ border-top: 1px solid var(--border-color);
+ flex-shrink: 0;
+ padding: var(--spacing-m) var(--spacing-xl);
+ width: 100%;
+ }
+ section.labelsContainer {
+ /* We want the :hover highlight to extend to the border of the dialog. */
+ padding: var(--spacing-m) 0;
+ }
+ .actions {
+ background-color: var(--dialog-background-color);
+ bottom: 0;
+ display: flex;
+ justify-content: space-between;
+ position: sticky;
+ /* @see Issue 8602 */
+ z-index: 1;
+ }
+ .actions .right gr-button {
+ margin-left: var(--spacing-l);
+ }
+ .peopleContainer,
+ .labelsContainer {
+ flex-shrink: 0;
+ }
+ .peopleContainer {
+ border-top: none;
+ display: table;
+ }
+ .peopleList {
+ display: flex;
+ }
+ .peopleListLabel {
+ color: var(--deemphasized-text-color);
+ margin-top: var(--spacing-xs);
+ min-width: 6em;
+ padding-right: var(--spacing-m);
+ }
+ gr-account-list {
+ display: flex;
+ flex-wrap: wrap;
+ flex: 1;
+ }
+ #reviewerConfirmationOverlay {
+ padding: var(--spacing-l);
+ text-align: center;
+ }
+ .reviewerConfirmationButtons {
+ margin-top: var(--spacing-l);
+ }
+ .groupName {
+ font-weight: var(--font-weight-bold);
+ }
+ .groupSize {
+ font-style: italic;
+ }
+ .textareaContainer {
+ min-height: 12em;
+ position: relative;
+ }
+ .textareaContainer,
+ #textarea,
+ gr-endpoint-decorator {
+ display: flex;
+ width: 100%;
+ }
+ gr-endpoint-decorator[name='reply-label-scores'] {
+ display: block;
+ }
+ .previewContainer gr-formatted-text {
+ background: var(--table-header-background-color);
+ padding: var(--spacing-l);
+ }
+ .draftsContainer h3 {
+ margin-top: var(--spacing-xs);
+ }
+ #checkingStatusLabel,
+ #notLatestLabel {
+ margin-left: var(--spacing-l);
+ }
+ #checkingStatusLabel {
+ color: var(--deemphasized-text-color);
+ font-style: italic;
+ }
+ #notLatestLabel,
+ #savingLabel {
+ color: var(--error-text-color);
+ }
+ #savingLabel {
+ display: none;
+ }
+ #savingLabel.saving {
+ display: inline;
+ }
+ #pluginMessage {
+ color: var(--deemphasized-text-color);
+ margin-left: var(--spacing-l);
+ margin-bottom: var(--spacing-m);
+ }
+ #pluginMessage:empty {
+ display: none;
+ }
+ </style>
+ <div class="container" tabindex="-1">
+ <section class="peopleContainer">
+ <div class="peopleList">
+ <div class="peopleListLabel">Reviewers</div>
+ <gr-account-list
+ id="reviewers"
+ accounts="{{_reviewers}}"
+ removable-values="[[change.removable_reviewers]]"
+ filter="[[filterReviewerSuggestion]]"
+ pending-confirmation="{{_reviewerPendingConfirmation}}"
+ placeholder="Add reviewer..."
+ on-account-text-changed="_handleAccountTextEntry"
+ suggestions-provider="[[_getReviewerSuggestionsProvider(change)]]"
+ >
+ </gr-account-list>
+ </div>
+ <div class="peopleList">
+ <div class="peopleListLabel">CC</div>
+ <gr-account-list
+ id="ccs"
+ accounts="{{_ccs}}"
+ filter="[[filterCCSuggestion]]"
+ pending-confirmation="{{_ccPendingConfirmation}}"
+ allow-any-input=""
+ placeholder="Add CC..."
+ on-account-text-changed="_handleAccountTextEntry"
+ suggestions-provider="[[_getCcSuggestionsProvider(change)]]"
+ >
+ </gr-account-list>
+ </div>
+ <gr-overlay
+ id="reviewerConfirmationOverlay"
+ on-iron-overlay-canceled="_cancelPendingReviewer"
+ >
+ <div class="reviewerConfirmation">
+ Group
+ <span class="groupName">
+ [[_pendingConfirmationDetails.group.name]]
+ </span>
+ has
+ <span class="groupSize">
+ [[_pendingConfirmationDetails.count]]
+ </span>
+ members.
+ <br />
+ Are you sure you want to add them all?
</div>
- <div class="peopleList">
- <div class="peopleListLabel">CC</div>
- <gr-account-list id="ccs" accounts="{{_ccs}}" filter="[[filterCCSuggestion]]" pending-confirmation="{{_ccPendingConfirmation}}" allow-any-input="" placeholder="Add CC..." on-account-text-changed="_handleAccountTextEntry" suggestions-provider="[[_getCcSuggestionsProvider(change)]]">
- </gr-account-list>
+ <div class="reviewerConfirmationButtons">
+ <gr-button on-click="_confirmPendingReviewer">Yes</gr-button>
+ <gr-button on-click="_cancelPendingReviewer">No</gr-button>
</div>
- <gr-overlay id="reviewerConfirmationOverlay" on-iron-overlay-canceled="_cancelPendingReviewer">
- <div class="reviewerConfirmation">
- Group
- <span class="groupName">
- [[_pendingConfirmationDetails.group.name]]
- </span>
- has
- <span class="groupSize">
- [[_pendingConfirmationDetails.count]]
- </span>
- members.
- <br>
- Are you sure you want to add them all?
- </div>
- <div class="reviewerConfirmationButtons">
- <gr-button on-click="_confirmPendingReviewer">Yes</gr-button>
- <gr-button on-click="_cancelPendingReviewer">No</gr-button>
- </div>
- </gr-overlay>
- </section>
- <section class="textareaContainer">
- <gr-endpoint-decorator name="reply-text">
- <gr-textarea id="textarea" class="message" autocomplete="on" placeholder="[[_messagePlaceholder]]" fixed-position-dropdown="" hide-border="true" monospace="true" disabled="{{disabled}}" rows="4" text="{{draft}}" on-bind-value-changed="_handleHeightChanged">
- </gr-textarea>
- </gr-endpoint-decorator>
- </section>
- <section class="previewContainer">
- <label>
- <input type="checkbox" checked="{{_previewFormatting::change}}">
- Preview formatting
- </label>
- <gr-formatted-text content="[[draft]]" hidden\$="[[!_previewFormatting]]" config="[[projectConfig.commentlinks]]"></gr-formatted-text>
- </section>
- <section class="labelsContainer">
- <gr-endpoint-decorator name="reply-label-scores">
- <gr-label-scores id="labelScores" account="[[_account]]" change="[[change]]" on-labels-changed="_handleLabelsChanged" permitted-labels="[[permittedLabels]]"></gr-label-scores>
- </gr-endpoint-decorator>
- <div id="pluginMessage">[[_pluginMessage]]</div>
- </section>
- <section class="draftsContainer" hidden\$="[[_computeHideDraftList(draftCommentThreads)]]">
- <div class="includeComments">
- <input type="checkbox" id="includeComments" checked="{{_includeComments::change}}">
- <label for="includeComments">Publish [[_computeDraftsTitle(draftCommentThreads)]]</label>
- </div>
- <gr-thread-list id="commentList" hidden\$="[[!_includeComments]]" threads="[[draftCommentThreads]]" change="[[change]]" change-num="[[change._number]]" logged-in="true" hide-toggle-buttons="" on-thread-list-modified="_onThreadListModified">
- </gr-thread-list>
- <span id="savingLabel" class\$="[[_computeSavingLabelClass(_savingComments)]]">
- Saving comments...
+ </gr-overlay>
+ </section>
+ <section class="textareaContainer">
+ <gr-endpoint-decorator name="reply-text">
+ <gr-textarea
+ id="textarea"
+ class="message"
+ autocomplete="on"
+ placeholder="[[_messagePlaceholder]]"
+ fixed-position-dropdown=""
+ hide-border="true"
+ monospace="true"
+ disabled="{{disabled}}"
+ rows="4"
+ text="{{draft}}"
+ on-bind-value-changed="_handleHeightChanged"
+ >
+ </gr-textarea>
+ </gr-endpoint-decorator>
+ </section>
+ <section class="previewContainer">
+ <label>
+ <input type="checkbox" checked="{{_previewFormatting::change}}" />
+ Preview formatting
+ </label>
+ <gr-formatted-text
+ content="[[draft]]"
+ hidden$="[[!_previewFormatting]]"
+ config="[[projectConfig.commentlinks]]"
+ ></gr-formatted-text>
+ </section>
+ <section class="labelsContainer">
+ <gr-endpoint-decorator name="reply-label-scores">
+ <gr-label-scores
+ id="labelScores"
+ account="[[_account]]"
+ change="[[change]]"
+ on-labels-changed="_handleLabelsChanged"
+ permitted-labels="[[permittedLabels]]"
+ ></gr-label-scores>
+ </gr-endpoint-decorator>
+ <div id="pluginMessage">[[_pluginMessage]]</div>
+ </section>
+ <section
+ class="draftsContainer"
+ hidden$="[[_computeHideDraftList(draftCommentThreads)]]"
+ >
+ <div class="includeComments">
+ <input
+ type="checkbox"
+ id="includeComments"
+ checked="{{_includeComments::change}}"
+ />
+ <label for="includeComments"
+ >Publish [[_computeDraftsTitle(draftCommentThreads)]]</label
+ >
+ </div>
+ <gr-thread-list
+ id="commentList"
+ hidden$="[[!_includeComments]]"
+ threads="[[draftCommentThreads]]"
+ change="[[change]]"
+ change-num="[[change._number]]"
+ logged-in="true"
+ hide-toggle-buttons=""
+ on-thread-list-modified="_onThreadListModified"
+ >
+ </gr-thread-list>
+ <span
+ id="savingLabel"
+ class$="[[_computeSavingLabelClass(_savingComments)]]"
+ >
+ Saving comments...
+ </span>
+ </section>
+ <section class="actions">
+ <div class="left">
+ <span
+ id="checkingStatusLabel"
+ hidden$="[[!_isState(knownLatestState, 'checking')]]"
+ >
+ Checking whether patch [[patchNum]] is latest...
</span>
- </section>
- <section class="actions">
- <div class="left">
- <span id="checkingStatusLabel" hidden\$="[[!_isState(knownLatestState, 'checking')]]">
- Checking whether patch [[patchNum]] is latest...
- </span>
- <span id="notLatestLabel" hidden\$="[[!_isState(knownLatestState, 'not-latest')]]">
- [[_computePatchSetWarning(patchNum, _labelsChanged)]]
- <gr-button link="" on-click="_reload">Reload</gr-button>
- </span>
- </div>
- <div class="right">
- <gr-button link="" id="cancelButton" class="action cancel" on-click="_cancelTapHandler">Cancel</gr-button>
- <template is="dom-if" if="[[canBeStarted]]">
- <!-- Use 'Send' here as the change may only about reviewers / ccs
+ <span
+ id="notLatestLabel"
+ hidden$="[[!_isState(knownLatestState, 'not-latest')]]"
+ >
+ [[_computePatchSetWarning(patchNum, _labelsChanged)]]
+ <gr-button link="" on-click="_reload">Reload</gr-button>
+ </span>
+ </div>
+ <div class="right">
+ <gr-button
+ link=""
+ id="cancelButton"
+ class="action cancel"
+ on-click="_cancelTapHandler"
+ >Cancel</gr-button
+ >
+ <template is="dom-if" if="[[canBeStarted]]">
+ <!-- Use 'Send' here as the change may only about reviewers / ccs
and when this button is visible, the next button will always
be 'Start review' -->
- <gr-button link="" disabled="[[_isState(knownLatestState, 'not-latest')]]" class="action save" has-tooltip="" title="[[_saveTooltip]]" on-click="_saveClickHandler">Save</gr-button>
- </template>
- <gr-button id="sendButton" primary="" disabled="[[_sendDisabled]]" class="action send" has-tooltip="" title\$="[[_computeSendButtonTooltip(canBeStarted)]]" on-click="_sendTapHandler">[[_sendButtonLabel]]</gr-button>
- </div>
- </section>
- </div>
- <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
- <gr-storage id="storage"></gr-storage>
- <gr-reporting id="reporting"></gr-reporting>
+ <gr-button
+ link=""
+ disabled="[[_isState(knownLatestState, 'not-latest')]]"
+ class="action save"
+ has-tooltip=""
+ title="[[_saveTooltip]]"
+ on-click="_saveClickHandler"
+ >Save</gr-button
+ >
+ </template>
+ <gr-button
+ id="sendButton"
+ primary=""
+ disabled="[[_sendDisabled]]"
+ class="action send"
+ has-tooltip=""
+ title$="[[_computeSendButtonTooltip(canBeStarted)]]"
+ on-click="_sendTapHandler"
+ >[[_sendButtonLabel]]</gr-button
+ >
+ </div>
+ </section>
+ </div>
+ <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-storage id="storage"></gr-storage>
+ <gr-reporting id="reporting"></gr-reporting>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list_html.js b/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list_html.js
index 300e38a..93926cf 100644
--- a/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list_html.js
+++ b/polygerrit-ui/app/elements/change/gr-reviewer-list/gr-reviewer-list_html.js
@@ -17,41 +17,55 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ :host([disabled]) {
+ opacity: 0.8;
+ pointer-events: none;
+ }
+ .container {
+ display: block;
+ }
+ gr-button {
+ --gr-button: {
+ padding: 0px 0px;
}
- :host([disabled]) {
- opacity: .8;
- pointer-events: none;
- }
- .container {
- display: block;
- }
- gr-button {
- --gr-button: {
- padding: 0px 0px;
- }
- }
- gr-account-chip {
- display: inline-block;
- }
- </style>
- <div class="container">
- <div>
- <template is="dom-repeat" items="[[_displayedReviewers]]" as="reviewer">
- <gr-account-chip class="reviewer"
- account="[[reviewer]]"
- on-remove="_handleRemove"
- voteable-text="[[_computeVoteableText(reviewer, change)]]"
- removable="[[_computeCanRemoveReviewer(reviewer, mutable)]]">
- </gr-account-chip>
- </template>
- </div>
- <gr-button class="hiddenReviewers" link="" hidden\$="[[!_hiddenReviewerCount]]" on-click="_handleViewAll">and [[_hiddenReviewerCount]] more</gr-button>
- <div class="controlsContainer" hidden\$="[[!mutable]]">
- <gr-button link="" id="addReviewer" class="addReviewer" on-click="_handleAddTap">[[_addLabel]]</gr-button>
- </div>
+ }
+ gr-account-chip {
+ display: inline-block;
+ }
+ </style>
+ <div class="container">
+ <div>
+ <template is="dom-repeat" items="[[_displayedReviewers]]" as="reviewer">
+ <gr-account-chip
+ class="reviewer"
+ account="[[reviewer]]"
+ on-remove="_handleRemove"
+ voteable-text="[[_computeVoteableText(reviewer, change)]]"
+ removable="[[_computeCanRemoveReviewer(reviewer, mutable)]]"
+ >
+ </gr-account-chip>
+ </template>
</div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-button
+ class="hiddenReviewers"
+ link=""
+ hidden$="[[!_hiddenReviewerCount]]"
+ on-click="_handleViewAll"
+ >and [[_hiddenReviewerCount]] more</gr-button
+ >
+ <div class="controlsContainer" hidden$="[[!mutable]]">
+ <gr-button
+ link=""
+ id="addReviewer"
+ class="addReviewer"
+ on-click="_handleAddTap"
+ >[[_addLabel]]</gr-button
+ >
+ </div>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list_html.js b/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list_html.js
index cf967ab..fd34b2d 100644
--- a/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list_html.js
+++ b/polygerrit-ui/app/elements/change/gr-thread-list/gr-thread-list_html.js
@@ -17,59 +17,88 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- #threads {
- display: block;
- padding: var(--spacing-l);
- }
- gr-comment-thread {
- display: block;
- margin-bottom: var(--spacing-m);
- max-width: 80ch;
- }
- .header {
- align-items: center;
- background-color: var(--table-header-background-color);
- border-bottom: 1px solid var(--border-color);
- border-top: 1px solid var(--border-color);
- display: flex;
- justify-content: left;
- min-height: 3.2em;
- padding: var(--spacing-m) var(--spacing-l);
- }
- .toggleItem.draftToggle {
- display: none;
- }
- .toggleItem.draftToggle.show {
- display: flex;
- }
- .toggleItem {
- align-items: center;
- display: flex;
- margin-right: var(--spacing-l);
- }
- .draftsOnly:not(.unresolvedOnly) gr-comment-thread[has-draft],
- .unresolvedOnly:not(.draftsOnly) gr-comment-thread[unresolved],
- .draftsOnly.unresolvedOnly gr-comment-thread[has-draft][unresolved] {
- display: block
- }
- </style>
- <template is="dom-if" if="[[!hideToggleButtons]]">
- <div class="header">
- <div class="toggleItem">
- <paper-toggle-button id="unresolvedToggle" checked="{{_unresolvedOnly}}"></paper-toggle-button>
- Only unresolved threads</div>
- <div class\$="toggleItem draftToggle [[_computeShowDraftToggle(loggedIn)]]">
- <paper-toggle-button id="draftToggle" checked="{{_draftsOnly}}"></paper-toggle-button>
- Only threads with drafts</div>
+ <style include="shared-styles">
+ #threads {
+ display: block;
+ padding: var(--spacing-l);
+ }
+ gr-comment-thread {
+ display: block;
+ margin-bottom: var(--spacing-m);
+ max-width: 80ch;
+ }
+ .header {
+ align-items: center;
+ background-color: var(--table-header-background-color);
+ border-bottom: 1px solid var(--border-color);
+ border-top: 1px solid var(--border-color);
+ display: flex;
+ justify-content: left;
+ min-height: 3.2em;
+ padding: var(--spacing-m) var(--spacing-l);
+ }
+ .toggleItem.draftToggle {
+ display: none;
+ }
+ .toggleItem.draftToggle.show {
+ display: flex;
+ }
+ .toggleItem {
+ align-items: center;
+ display: flex;
+ margin-right: var(--spacing-l);
+ }
+ .draftsOnly:not(.unresolvedOnly) gr-comment-thread[has-draft],
+ .unresolvedOnly:not(.draftsOnly) gr-comment-thread[unresolved],
+ .draftsOnly.unresolvedOnly gr-comment-thread[has-draft][unresolved] {
+ display: block;
+ }
+ </style>
+ <template is="dom-if" if="[[!hideToggleButtons]]">
+ <div class="header">
+ <div class="toggleItem">
+ <paper-toggle-button
+ id="unresolvedToggle"
+ checked="{{_unresolvedOnly}}"
+ ></paper-toggle-button>
+ Only unresolved threads
</div>
- </template>
- <div id="threads">
- <template is="dom-if" if="[[!threads.length]]">
- [[emptyThreadMsg]]
- </template>
- <template is="dom-repeat" items="[[_filteredThreads]]" as="thread" initial-count="5" target-framerate="60">
- <gr-comment-thread show-file-path="" change-num="[[changeNum]]" comments="[[thread.comments]]" comment-side="[[thread.commentSide]]" project-name="[[change.project]]" is-on-parent="[[_isOnParent(thread.commentSide)]]" line-num="[[thread.line]]" patch-num="[[thread.patchNum]]" path="[[thread.path]]" root-id="{{thread.rootId}}" on-thread-changed="_handleCommentsChanged" on-thread-discard="_handleThreadDiscard"></gr-comment-thread>
- </template>
+ <div
+ class$="toggleItem draftToggle [[_computeShowDraftToggle(loggedIn)]]"
+ >
+ <paper-toggle-button
+ id="draftToggle"
+ checked="{{_draftsOnly}}"
+ ></paper-toggle-button>
+ Only threads with drafts
+ </div>
</div>
+ </template>
+ <div id="threads">
+ <template is="dom-if" if="[[!threads.length]]">
+ [[emptyThreadMsg]]
+ </template>
+ <template
+ is="dom-repeat"
+ items="[[_filteredThreads]]"
+ as="thread"
+ initial-count="5"
+ target-framerate="60"
+ >
+ <gr-comment-thread
+ show-file-path=""
+ change-num="[[changeNum]]"
+ comments="[[thread.comments]]"
+ comment-side="[[thread.commentSide]]"
+ project-name="[[change.project]]"
+ is-on-parent="[[_isOnParent(thread.commentSide)]]"
+ line-num="[[thread.line]]"
+ patch-num="[[thread.patchNum]]"
+ path="[[thread.path]]"
+ root-id="{{thread.rootId}}"
+ on-thread-changed="_handleCommentsChanged"
+ on-thread-discard="_handleThreadDiscard"
+ ></gr-comment-thread>
+ </template>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/change/gr-upload-help-dialog/gr-upload-help-dialog_html.js b/polygerrit-ui/app/elements/change/gr-upload-help-dialog/gr-upload-help-dialog_html.js
index 3f4fc42..ec010a1 100644
--- a/polygerrit-ui/app/elements/change/gr-upload-help-dialog/gr-upload-help-dialog_html.js
+++ b/polygerrit-ui/app/elements/change/gr-upload-help-dialog/gr-upload-help-dialog_html.js
@@ -17,54 +17,54 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- background-color: var(--dialog-background-color);
- display: block;
- }
- .main {
- width: 100%;
- }
- ol {
- margin-left: var(--spacing-xl);
- list-style: decimal;
- }
- p {
- margin-bottom: var(--spacing-m);
- }
- </style>
- <gr-dialog confirm-label="Done" cancel-label="" on-confirm="_handleCloseTap">
- <div class="header" slot="header">How to update this change:</div>
- <div class="main" slot="main">
- <ol>
- <li>
- <p>
- Checkout this change locally and make your desired modifications
- to the files.
- </p>
- <template is="dom-if" if="[[_fetchCommand]]">
- <gr-shell-command command="[[_fetchCommand]]"></gr-shell-command>
- </template>
- </li>
- <li>
- <p>
- Update the local commit with your modifications using the following
- command.
- </p>
- <gr-shell-command command="[[_commitCommand]]"></gr-shell-command>
- <p>
- Leave the "Change-Id:" line of the commit message as is.
- </p>
- </li>
- <li>
- <p>Push the updated commit to Gerrit.</p>
- <gr-shell-command command="[[_pushCommand]]"></gr-shell-command>
- </li>
- <li>
- <p>Refresh this page to view the the update.</p>
- </li>
- </ol>
- </div>
- </gr-dialog>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <style include="shared-styles">
+ :host {
+ background-color: var(--dialog-background-color);
+ display: block;
+ }
+ .main {
+ width: 100%;
+ }
+ ol {
+ margin-left: var(--spacing-xl);
+ list-style: decimal;
+ }
+ p {
+ margin-bottom: var(--spacing-m);
+ }
+ </style>
+ <gr-dialog confirm-label="Done" cancel-label="" on-confirm="_handleCloseTap">
+ <div class="header" slot="header">How to update this change:</div>
+ <div class="main" slot="main">
+ <ol>
+ <li>
+ <p>
+ Checkout this change locally and make your desired modifications to
+ the files.
+ </p>
+ <template is="dom-if" if="[[_fetchCommand]]">
+ <gr-shell-command command="[[_fetchCommand]]"></gr-shell-command>
+ </template>
+ </li>
+ <li>
+ <p>
+ Update the local commit with your modifications using the following
+ command.
+ </p>
+ <gr-shell-command command="[[_commitCommand]]"></gr-shell-command>
+ <p>
+ Leave the "Change-Id:" line of the commit message as is.
+ </p>
+ </li>
+ <li>
+ <p>Push the updated commit to Gerrit.</p>
+ <gr-shell-command command="[[_pushCommand]]"></gr-shell-command>
+ </li>
+ <li>
+ <p>Refresh this page to view the the update.</p>
+ </li>
+ </ol>
+ </div>
+ </gr-dialog>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown_html.js b/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown_html.js
index e22db65..b47894e 100644
--- a/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown_html.js
+++ b/polygerrit-ui/app/elements/core/gr-account-dropdown/gr-account-dropdown_html.js
@@ -17,25 +17,36 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- gr-dropdown {
- padding: 0 var(--spacing-m);
- --gr-button: {
- color: var(--header-text-color);
- }
- --gr-dropdown-item: {
- color: var(--primary-text-color);
- }
+ <style include="shared-styles">
+ gr-dropdown {
+ padding: 0 var(--spacing-m);
+ --gr-button: {
+ color: var(--header-text-color);
}
- gr-avatar {
- height: 2em;
- width: 2em;
- vertical-align: middle;
+ --gr-dropdown-item: {
+ color: var(--primary-text-color);
}
- </style>
- <gr-dropdown link="" items="[[links]]" top-content="[[topContent]]" horizontal-align="right">
- <span hidden\$="[[_hasAvatars]]" hidden="">[[_accountName(account)]]</span>
- <gr-avatar account="[[account]]" hidden\$="[[!_hasAvatars]]" hidden="" image-size="56" aria-label="Account avatar"></gr-avatar>
- </gr-dropdown>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ }
+ gr-avatar {
+ height: 2em;
+ width: 2em;
+ vertical-align: middle;
+ }
+ </style>
+ <gr-dropdown
+ link=""
+ items="[[links]]"
+ top-content="[[topContent]]"
+ horizontal-align="right"
+ >
+ <span hidden$="[[_hasAvatars]]" hidden="">[[_accountName(account)]]</span>
+ <gr-avatar
+ account="[[account]]"
+ hidden$="[[!_hasAvatars]]"
+ hidden=""
+ image-size="56"
+ aria-label="Account avatar"
+ ></gr-avatar>
+ </gr-dropdown>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/core/gr-error-dialog/gr-error-dialog_html.js b/polygerrit-ui/app/elements/core/gr-error-dialog/gr-error-dialog_html.js
index e18d1bd..39d4f2d 100644
--- a/polygerrit-ui/app/elements/core/gr-error-dialog/gr-error-dialog_html.js
+++ b/polygerrit-ui/app/elements/core/gr-error-dialog/gr-error-dialog_html.js
@@ -17,28 +17,40 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
+ <style include="shared-styles">
+ .main {
+ max-height: 40em;
+ max-width: 60em;
+ overflow-y: auto;
+ white-space: pre-wrap;
+ }
+ @media screen and (max-width: 50em) {
.main {
- max-height: 40em;
- max-width: 60em;
- overflow-y: auto;
- white-space: pre-wrap;
+ max-height: none;
+ max-width: 50em;
}
- @media screen and (max-width: 50em) {
- .main {
- max-height: none;
- max-width: 50em;
- }
- }
- .signInLink {
- text-decoration: none;
- }
- </style>
- <gr-dialog id="dialog" cancel-label="" on-confirm="_handleConfirm" confirm-label="Dismiss" confirm-on-enter="">
- <div class="header" slot="header">An error occurred</div>
- <div class="main" slot="main">[[text]]</div>
- <gr-button id="signIn" class\$="signInLink" hidden\$="[[!showSignInButton]]" link="" slot="footer">
- <a href\$="[[loginUrl]]" class="signInLink">Sign in</a>
- </gr-button>
- </gr-dialog>
+ }
+ .signInLink {
+ text-decoration: none;
+ }
+ </style>
+ <gr-dialog
+ id="dialog"
+ cancel-label=""
+ on-confirm="_handleConfirm"
+ confirm-label="Dismiss"
+ confirm-on-enter=""
+ >
+ <div class="header" slot="header">An error occurred</div>
+ <div class="main" slot="main">[[text]]</div>
+ <gr-button
+ id="signIn"
+ class$="signInLink"
+ hidden$="[[!showSignInButton]]"
+ link=""
+ slot="footer"
+ >
+ <a href$="[[loginUrl]]" class="signInLink">Sign in</a>
+ </gr-button>
+ </gr-dialog>
`;
diff --git a/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager_html.js b/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager_html.js
index 5661d1e..4d32f24 100644
--- a/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager_html.js
+++ b/polygerrit-ui/app/elements/core/gr-error-manager/gr-error-manager_html.js
@@ -17,11 +17,23 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <gr-overlay with-backdrop="" id="errorOverlay">
- <gr-error-dialog id="errorDialog" on-dismiss="_handleDismissErrorDialog" confirm-label="Dismiss" confirm-on-enter="" login-url="[[loginUrl]]"></gr-error-dialog>
- </gr-overlay>
- <gr-overlay id="noInteractionOverlay" with-backdrop="" always-on-top="" no-cancel-on-esc-key="" no-cancel-on-outside-click="">
- </gr-overlay>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
- <gr-reporting id="reporting"></gr-reporting>
+ <gr-overlay with-backdrop="" id="errorOverlay">
+ <gr-error-dialog
+ id="errorDialog"
+ on-dismiss="_handleDismissErrorDialog"
+ confirm-label="Dismiss"
+ confirm-on-enter=""
+ login-url="[[loginUrl]]"
+ ></gr-error-dialog>
+ </gr-overlay>
+ <gr-overlay
+ id="noInteractionOverlay"
+ with-backdrop=""
+ always-on-top=""
+ no-cancel-on-esc-key=""
+ no-cancel-on-outside-click=""
+ >
+ </gr-overlay>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-reporting id="reporting"></gr-reporting>
`;
diff --git a/polygerrit-ui/app/elements/core/gr-key-binding-display/gr-key-binding-display_html.js b/polygerrit-ui/app/elements/core/gr-key-binding-display/gr-key-binding-display_html.js
index f98be3a..334a40a 100644
--- a/polygerrit-ui/app/elements/core/gr-key-binding-display/gr-key-binding-display_html.js
+++ b/polygerrit-ui/app/elements/core/gr-key-binding-display/gr-key-binding-display_html.js
@@ -17,24 +17,24 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- .key {
- background-color: var(--chip-background-color);
- border: 1px solid var(--border-color);
- border-radius: var(--border-radius);
- display: inline-block;
- font-weight: var(--font-weight-bold);
- padding: var(--spacing-xxs) var(--spacing-m);
- text-align: center;
- }
- </style>
- <template is="dom-repeat" items="[[binding]]">
- <template is="dom-if" if="[[index]]">
- or
- </template>
- <template is="dom-repeat" items="[[_computeModifiers(item)]]" as="modifier">
- <span class="key modifier">[[modifier]]</span>
- </template>
- <span class="key">[[_computeKey(item)]]</span>
+ <style include="shared-styles">
+ .key {
+ background-color: var(--chip-background-color);
+ border: 1px solid var(--border-color);
+ border-radius: var(--border-radius);
+ display: inline-block;
+ font-weight: var(--font-weight-bold);
+ padding: var(--spacing-xxs) var(--spacing-m);
+ text-align: center;
+ }
+ </style>
+ <template is="dom-repeat" items="[[binding]]">
+ <template is="dom-if" if="[[index]]">
+ or
</template>
+ <template is="dom-repeat" items="[[_computeModifiers(item)]]" as="modifier">
+ <span class="key modifier">[[modifier]]</span>
+ </template>
+ <span class="key">[[_computeKey(item)]]</span>
+ </template>
`;
diff --git a/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog_html.js b/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog_html.js
index 380228f..78b576e 100644
--- a/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog_html.js
+++ b/polygerrit-ui/app/elements/core/gr-keyboard-shortcuts-dialog/gr-keyboard-shortcuts-dialog_html.js
@@ -17,53 +17,74 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- max-height: 100vh;
- overflow-y: auto;
- }
- header{
- padding: var(--spacing-l);
- }
- main {
- display: flex;
- padding: 0 var(--spacing-xxl) var(--spacing-xxl);
- }
- header {
- align-items: center;
- border-bottom: 1px solid var(--border-color);
- display: flex;
- justify-content: space-between;
- }
- table:last-of-type {
- margin-left: var(--spacing-xxl);
- }
- td {
- padding: var(--spacing-xs) 0;
- }
- td:first-child {
- padding-right: var(--spacing-m);
- text-align: right;
- }
- .header {
- font-weight: var(--font-weight-bold);
- padding-top: var(--spacing-l);
- }
- .modifier {
- font-weight: var(--font-weight-normal);
- }
- </style>
- <header>
- <h3>Keyboard shortcuts</h3>
- <gr-button link="" on-click="_handleCloseTap">Close</gr-button>
- </header>
- <main>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ max-height: 100vh;
+ overflow-y: auto;
+ }
+ header {
+ padding: var(--spacing-l);
+ }
+ main {
+ display: flex;
+ padding: 0 var(--spacing-xxl) var(--spacing-xxl);
+ }
+ header {
+ align-items: center;
+ border-bottom: 1px solid var(--border-color);
+ display: flex;
+ justify-content: space-between;
+ }
+ table:last-of-type {
+ margin-left: var(--spacing-xxl);
+ }
+ td {
+ padding: var(--spacing-xs) 0;
+ }
+ td:first-child {
+ padding-right: var(--spacing-m);
+ text-align: right;
+ }
+ .header {
+ font-weight: var(--font-weight-bold);
+ padding-top: var(--spacing-l);
+ }
+ .modifier {
+ font-weight: var(--font-weight-normal);
+ }
+ </style>
+ <header>
+ <h3>Keyboard shortcuts</h3>
+ <gr-button link="" on-click="_handleCloseTap">Close</gr-button>
+ </header>
+ <main>
+ <table>
+ <tbody>
+ <template is="dom-repeat" items="[[_left]]">
+ <tr>
+ <td></td>
+ <td class="header">[[item.section]]</td>
+ </tr>
+ <template is="dom-repeat" items="[[item.shortcuts]]" as="shortcut">
+ <tr>
+ <td>
+ <gr-key-binding-display binding="[[shortcut.binding]]">
+ </gr-key-binding-display>
+ </td>
+ <td>[[shortcut.text]]</td>
+ </tr>
+ </template>
+ </template>
+ </tbody>
+ </table>
+ <template is="dom-if" if="[[_right]]">
<table>
<tbody>
- <template is="dom-repeat" items="[[_left]]">
+ <template is="dom-repeat" items="[[_right]]">
<tr>
- <td></td><td class="header">[[item.section]]</td>
+ <td></td>
+ <td class="header">[[item.section]]</td>
</tr>
<template is="dom-repeat" items="[[item.shortcuts]]" as="shortcut">
<tr>
@@ -77,26 +98,7 @@
</template>
</tbody>
</table>
- <template is="dom-if" if="[[_right]]">
- <table>
- <tbody>
- <template is="dom-repeat" items="[[_right]]">
- <tr>
- <td></td><td class="header">[[item.section]]</td>
- </tr>
- <template is="dom-repeat" items="[[item.shortcuts]]" as="shortcut">
- <tr>
- <td>
- <gr-key-binding-display binding="[[shortcut.binding]]">
- </gr-key-binding-display>
- </td>
- <td>[[shortcut.text]]</td>
- </tr>
- </template>
- </template>
- </tbody>
- </table>
- </template>
- </main>
- <footer></footer>
+ </template>
+ </main>
+ <footer></footer>
`;
diff --git a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_html.js b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_html.js
index 307a081..19e833c 100644
--- a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_html.js
+++ b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header_html.js
@@ -17,194 +17,217 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ nav {
+ align-items: center;
+ display: flex;
+ }
+ .bigTitle {
+ color: var(--header-text-color);
+ font-size: var(--header-title-font-size);
+ text-decoration: none;
+ }
+ .bigTitle:hover {
+ text-decoration: underline;
+ }
+ .titleText::before {
+ background-image: var(--header-icon);
+ background-size: var(--header-icon-size) var(--header-icon-size);
+ background-repeat: no-repeat;
+ content: '';
+ display: inline-block;
+ height: var(--header-icon-size);
+ margin-right: calc(var(--header-icon-size) / 4);
+ vertical-align: text-bottom;
+ width: var(--header-icon-size);
+ }
+ .titleText::after {
+ content: var(--header-title-content);
+ }
+ ul {
+ list-style: none;
+ padding-left: var(--spacing-l);
+ }
+ .links > li {
+ cursor: default;
+ display: inline-block;
+ padding: 0;
+ position: relative;
+ }
+ .linksTitle {
+ display: inline-block;
+ font-weight: var(--font-weight-bold);
+ position: relative;
+ text-transform: uppercase;
+ }
+ .linksTitle:hover {
+ opacity: 0.75;
+ }
+ .rightItems {
+ align-items: center;
+ display: flex;
+ flex: 1;
+ justify-content: flex-end;
+ }
+ .rightItems gr-endpoint-decorator:not(:empty) {
+ margin-left: var(--spacing-l);
+ }
+ gr-smart-search {
+ flex-grow: 1;
+ margin: 0 var(--spacing-m);
+ max-width: 500px;
+ }
+ gr-dropdown,
+ .browse {
+ padding: var(--spacing-m);
+ }
+ gr-dropdown {
+ --gr-dropdown-item: {
+ color: var(--primary-text-color);
}
- nav {
- align-items: center;
- display: flex;
- }
- .bigTitle {
- color: var(--header-text-color);
- font-size: var(--header-title-font-size);
- text-decoration: none;
- }
- .bigTitle:hover {
- text-decoration: underline;
- }
- .titleText::before {
- background-image: var(--header-icon);
- background-size: var(--header-icon-size) var(--header-icon-size);
- background-repeat: no-repeat;
- content: "";
- display: inline-block;
- height: var(--header-icon-size);
- margin-right: calc(var(--header-icon-size) / 4);
- vertical-align: text-bottom;
- width: var(--header-icon-size);
- }
- .titleText::after {
- content: var(--header-title-content);
- }
- ul {
- list-style: none;
- padding-left: var(--spacing-l);
- }
- .links > li {
- cursor: default;
- display: inline-block;
- padding: 0;
- position: relative;
- }
- .linksTitle {
- display: inline-block;
- font-weight: var(--font-weight-bold);
- position: relative;
- text-transform: uppercase;
- }
- .linksTitle:hover {
- opacity: .75;
- }
- .rightItems {
- align-items: center;
- display: flex;
- flex: 1;
- justify-content: flex-end;
- }
- .rightItems gr-endpoint-decorator:not(:empty) {
- margin-left: var(--spacing-l);
- }
- gr-smart-search {
- flex-grow: 1;
- margin: 0 var(--spacing-m);
- max-width: 500px;
- }
- gr-dropdown,
- .browse {
- padding: var(--spacing-m);
- }
- gr-dropdown {
- --gr-dropdown-item: {
- color: var(--primary-text-color);
- }
- }
- .settingsButton {
- margin-left: var(--spacing-m);
- }
- .browse {
- color: var(--header-text-color);
- /* Same as gr-button */
- margin: 5px 4px;
- text-decoration: none;
- }
- .invisible,
- .settingsButton,
- gr-account-dropdown {
- display: none;
- }
- :host([loading]) .accountContainer,
- :host([logged-in]) .loginButton,
- :host([logged-in]) .registerButton {
- display: none;
- }
- :host([logged-in]) .settingsButton,
- :host([logged-in]) gr-account-dropdown {
- display: inline;
- }
- .accountContainer {
- align-items: center;
- display: flex;
- margin: 0 calc(0 - var(--spacing-m)) 0 var(--spacing-m);
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .loginButton, .registerButton {
- padding: var(--spacing-m) var(--spacing-l);
- }
- .dropdown-trigger {
- text-decoration: none;
- }
- .dropdown-content {
- background-color: var(--view-background-color);
- box-shadow: var(--elevation-level-2);
- }
- /*
+ }
+ .settingsButton {
+ margin-left: var(--spacing-m);
+ }
+ .browse {
+ color: var(--header-text-color);
+ /* Same as gr-button */
+ margin: 5px 4px;
+ text-decoration: none;
+ }
+ .invisible,
+ .settingsButton,
+ gr-account-dropdown {
+ display: none;
+ }
+ :host([loading]) .accountContainer,
+ :host([logged-in]) .loginButton,
+ :host([logged-in]) .registerButton {
+ display: none;
+ }
+ :host([logged-in]) .settingsButton,
+ :host([logged-in]) gr-account-dropdown {
+ display: inline;
+ }
+ .accountContainer {
+ align-items: center;
+ display: flex;
+ margin: 0 calc(0 - var(--spacing-m)) 0 var(--spacing-m);
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ .loginButton,
+ .registerButton {
+ padding: var(--spacing-m) var(--spacing-l);
+ }
+ .dropdown-trigger {
+ text-decoration: none;
+ }
+ .dropdown-content {
+ background-color: var(--view-background-color);
+ box-shadow: var(--elevation-level-2);
+ }
+ /*
* We are not using :host to do this, because :host has a lowest css priority
* compared to others. This means that using :host to do this would break styles.
*/
- .linksTitle,
- .bigTitle,
- .loginButton,
- .registerButton,
- iron-icon,
- gr-account-dropdown {
- color: var(--header-text-color);
+ .linksTitle,
+ .bigTitle,
+ .loginButton,
+ .registerButton,
+ iron-icon,
+ gr-account-dropdown {
+ color: var(--header-text-color);
+ }
+ #mobileSearch {
+ display: none;
+ }
+ @media screen and (max-width: 50em) {
+ .bigTitle {
+ font-family: var(--header-font-family);
+ font-size: var(--font-size-h3);
+ font-weight: var(--font-weight-h3);
+ line-height: var(--line-height-h3);
}
- #mobileSearch {
+ gr-smart-search,
+ .browse,
+ .rightItems .hideOnMobile,
+ .links > li.hideOnMobile {
display: none;
}
- @media screen and (max-width: 50em) {
- .bigTitle {
- font-family: var(--header-font-family);
- font-size: var(--font-size-h3);
- font-weight: var(--font-weight-h3);
- line-height: var(--line-height-h3);
- }
- gr-smart-search,
- .browse,
- .rightItems .hideOnMobile,
- .links > li.hideOnMobile {
- display: none;
- }
- #mobileSearch {
- display: inline-flex;
- }
- .accountContainer {
- margin-left: var(--spacing-m) !important;
- }
- gr-dropdown {
- padding: var(--spacing-m) 0 var(--spacing-m) var(--spacing-m);
- }
+ #mobileSearch {
+ display: inline-flex;
}
- </style>
- <nav>
- <a href\$="[[_computeRelativeURL('/')]]" class="bigTitle">
- <gr-endpoint-decorator name="header-title">
- <span class="titleText"></span>
- </gr-endpoint-decorator>
- </a>
- <ul class="links">
- <template is="dom-repeat" items="[[_links]]" as="linkGroup">
- <li class\$="[[_computeLinkGroupClass(linkGroup)]]">
- <gr-dropdown link="" down-arrow="" items="[[linkGroup.links]]" horizontal-align="left">
- <span class="linksTitle" id="[[linkGroup.title]]">
- [[linkGroup.title]]
- </span>
- </gr-dropdown>
- </li>
- </template>
- </ul>
- <div class="rightItems">
- <gr-endpoint-decorator class="hideOnMobile" name="header-small-banner"></gr-endpoint-decorator>
- <gr-smart-search id="search" search-query="{{searchQuery}}"></gr-smart-search>
- <gr-endpoint-decorator class="hideOnMobile" name="header-browse-source"></gr-endpoint-decorator>
- <div class="accountContainer" id="accountContainer">
- <iron-icon id="mobileSearch" icon="gr-icons:search" on-tap="_onMobileSearchTap"></iron-icon>
- <div class\$="[[_computeIsInvisible(_registerURL)]]">
- <a class="registerButton" href\$="[[_registerURL]]">
- [[_registerText]]
- </a>
- </div>
- <a class="loginButton" href\$="[[loginUrl]]">Sign in</a>
- <a class="settingsButton" href\$="[[_generateSettingsLink()]]" title="Settings">
- <iron-icon icon="gr-icons:settings"></iron-icon>
+ .accountContainer {
+ margin-left: var(--spacing-m) !important;
+ }
+ gr-dropdown {
+ padding: var(--spacing-m) 0 var(--spacing-m) var(--spacing-m);
+ }
+ }
+ </style>
+ <nav>
+ <a href$="[[_computeRelativeURL('/')]]" class="bigTitle">
+ <gr-endpoint-decorator name="header-title">
+ <span class="titleText"></span>
+ </gr-endpoint-decorator>
+ </a>
+ <ul class="links">
+ <template is="dom-repeat" items="[[_links]]" as="linkGroup">
+ <li class$="[[_computeLinkGroupClass(linkGroup)]]">
+ <gr-dropdown
+ link=""
+ down-arrow=""
+ items="[[linkGroup.links]]"
+ horizontal-align="left"
+ >
+ <span class="linksTitle" id="[[linkGroup.title]]">
+ [[linkGroup.title]]
+ </span>
+ </gr-dropdown>
+ </li>
+ </template>
+ </ul>
+ <div class="rightItems">
+ <gr-endpoint-decorator
+ class="hideOnMobile"
+ name="header-small-banner"
+ ></gr-endpoint-decorator>
+ <gr-smart-search
+ id="search"
+ search-query="{{searchQuery}}"
+ ></gr-smart-search>
+ <gr-endpoint-decorator
+ class="hideOnMobile"
+ name="header-browse-source"
+ ></gr-endpoint-decorator>
+ <div class="accountContainer" id="accountContainer">
+ <iron-icon
+ id="mobileSearch"
+ icon="gr-icons:search"
+ on-tap="_onMobileSearchTap"
+ ></iron-icon>
+ <div class$="[[_computeIsInvisible(_registerURL)]]">
+ <a class="registerButton" href$="[[_registerURL]]">
+ [[_registerText]]
</a>
- <gr-account-dropdown account="[[_account]]"></gr-account-dropdown>
</div>
+ <a class="loginButton" href$="[[loginUrl]]">Sign in</a>
+ <a
+ class="settingsButton"
+ href$="[[_generateSettingsLink()]]"
+ title="Settings"
+ >
+ <iron-icon icon="gr-icons:settings"></iron-icon>
+ </a>
+ <gr-account-dropdown account="[[_account]]"></gr-account-dropdown>
</div>
- </nav>
- <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </div>
+ </nav>
+ <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/core/gr-router/gr-router_html.js b/polygerrit-ui/app/elements/core/gr-router/gr-router_html.js
index 01acaa3..07f067e 100644
--- a/polygerrit-ui/app/elements/core/gr-router/gr-router_html.js
+++ b/polygerrit-ui/app/elements/core/gr-router/gr-router_html.js
@@ -17,6 +17,6 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
- <gr-reporting id="reporting"></gr-reporting>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-reporting id="reporting"></gr-reporting>
`;
diff --git a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar_html.js b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar_html.js
index 831b080..e26f8a3 100644
--- a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar_html.js
+++ b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar_html.js
@@ -17,19 +17,30 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- form {
- display: flex;
- }
- gr-autocomplete {
- background-color: var(--view-background-color);
- border-radius: var(--border-radius);
- flex: 1;
- outline: none;
- }
- </style>
- <form>
- <gr-autocomplete show-search-icon="" id="searchInput" text="{{_inputVal}}" query="[[query]]" on-commit="_handleInputCommit" allow-non-suggested-values="" multi="" threshold="[[_threshold]]" tab-complete="" vertical-offset="30"></gr-autocomplete>
- </form>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <style include="shared-styles">
+ form {
+ display: flex;
+ }
+ gr-autocomplete {
+ background-color: var(--view-background-color);
+ border-radius: var(--border-radius);
+ flex: 1;
+ outline: none;
+ }
+ </style>
+ <form>
+ <gr-autocomplete
+ show-search-icon=""
+ id="searchInput"
+ text="{{_inputVal}}"
+ query="[[query]]"
+ on-commit="_handleInputCommit"
+ allow-non-suggested-values=""
+ multi=""
+ threshold="[[_threshold]]"
+ tab-complete=""
+ vertical-offset="30"
+ ></gr-autocomplete>
+ </form>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search_html.js b/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search_html.js
index 78906a8..bb741ce 100644
--- a/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search_html.js
+++ b/polygerrit-ui/app/elements/core/gr-smart-search/gr-smart-search_html.js
@@ -17,9 +17,14 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
-
- </style>
- <gr-search-bar id="search" value="{{searchQuery}}" on-handle-search="_handleSearch" project-suggestions="[[_projectSuggestions]]" group-suggestions="[[_groupSuggestions]]" account-suggestions="[[_accountSuggestions]]"></gr-search-bar>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <style include="shared-styles"></style>
+ <gr-search-bar
+ id="search"
+ value="{{searchQuery}}"
+ on-handle-search="_handleSearch"
+ project-suggestions="[[_projectSuggestions]]"
+ group-suggestions="[[_groupSuggestions]]"
+ account-suggestions="[[_accountSuggestions]]"
+ ></gr-search-bar>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/diff/gr-apply-fix-dialog/gr-apply-fix-dialog_html.js b/polygerrit-ui/app/elements/diff/gr-apply-fix-dialog/gr-apply-fix-dialog_html.js
index f182979..a5a6ff2 100644
--- a/polygerrit-ui/app/elements/diff/gr-apply-fix-dialog/gr-apply-fix-dialog_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-apply-fix-dialog/gr-apply-fix-dialog_html.js
@@ -17,61 +17,83 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- gr-diff {
- --content-width: 90vw;
- }
- .diffContainer {
- padding: var(--spacing-l) 0;
- border-bottom: 1px solid var(--border-color);
- }
- .file-name {
- display: block;
- padding: var(--spacing-s) var(--spacing-l);
- background-color: var(--background-color-secondary);
- border-bottom: 1px solid var(--border-color);
- }
- .fixActions {
- display: flex;
- justify-content: flex-end;
- }
- gr-button {
- margin-left: var(--spacing-m);
- }
- .fix-picker {
- display: flex;
- align-items: center;
- margin-right: var(--spacing-l);
- }
- </style>
- <gr-overlay id="applyFixOverlay" with-backdrop="">
- <gr-dialog id="applyFixDialog"
- on-confirm="_handleApplyFix"
- confirm-label="[[_getApplyFixButtonLabel(_isApplyFixLoading)]]"
- disabled="[[_disableApplyFixButton]]"
- confirm-tooltip="[[_computeTooltip(change, _patchNum)]]"
- on-cancel="onCancel">
- <div slot="header">[[_robotId]] - [[getFixDescription(_currentFix)]]</div>
- <div slot="main">
- <template is="dom-repeat" items="[[_currentPreviews]]">
- <div class="file-name">
- <span>[[item.filepath]]</span>
- </div>
- <div class="diffContainer">
- <gr-diff prefs="[[overridePartialPrefs(prefs)]]" change-num="[[changeNum]]" path="[[item.filepath]]" diff="[[item.preview]]"></gr-diff>
- </div>
- </template>
- </div>
- <div slot="footer" class="fix-picker" hidden\$="[[hasSingleFix(_fixSuggestions)]]">
- <span>Suggested fix [[addOneTo(_selectedFixIdx)]] of [[_fixSuggestions.length]]</span>
- <gr-button id="prevFix" on-click="_onPrevFixClick" disabled\$="[[_noPrevFix(_selectedFixIdx)]]">
- <iron-icon icon="gr-icons:chevron-left"></iron-icon>
- </gr-button>
- <gr-button id="nextFix" on-click="_onNextFixClick" disabled\$="[[_noNextFix(_selectedFixIdx, _fixSuggestions)]]">
- <iron-icon icon="gr-icons:chevron-right"></iron-icon>
- </gr-button>
- </div>
- </gr-dialog>
- </gr-overlay>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <style include="shared-styles">
+ gr-diff {
+ --content-width: 90vw;
+ }
+ .diffContainer {
+ padding: var(--spacing-l) 0;
+ border-bottom: 1px solid var(--border-color);
+ }
+ .file-name {
+ display: block;
+ padding: var(--spacing-s) var(--spacing-l);
+ background-color: var(--background-color-secondary);
+ border-bottom: 1px solid var(--border-color);
+ }
+ .fixActions {
+ display: flex;
+ justify-content: flex-end;
+ }
+ gr-button {
+ margin-left: var(--spacing-m);
+ }
+ .fix-picker {
+ display: flex;
+ align-items: center;
+ margin-right: var(--spacing-l);
+ }
+ </style>
+ <gr-overlay id="applyFixOverlay" with-backdrop="">
+ <gr-dialog
+ id="applyFixDialog"
+ on-confirm="_handleApplyFix"
+ confirm-label="[[_getApplyFixButtonLabel(_isApplyFixLoading)]]"
+ disabled="[[_disableApplyFixButton]]"
+ confirm-tooltip="[[_computeTooltip(change, _patchNum)]]"
+ on-cancel="onCancel"
+ >
+ <div slot="header">[[_robotId]] - [[getFixDescription(_currentFix)]]</div>
+ <div slot="main">
+ <template is="dom-repeat" items="[[_currentPreviews]]">
+ <div class="file-name">
+ <span>[[item.filepath]]</span>
+ </div>
+ <div class="diffContainer">
+ <gr-diff
+ prefs="[[overridePartialPrefs(prefs)]]"
+ change-num="[[changeNum]]"
+ path="[[item.filepath]]"
+ diff="[[item.preview]]"
+ ></gr-diff>
+ </div>
+ </template>
+ </div>
+ <div
+ slot="footer"
+ class="fix-picker"
+ hidden$="[[hasSingleFix(_fixSuggestions)]]"
+ >
+ <span
+ >Suggested fix [[addOneTo(_selectedFixIdx)]] of
+ [[_fixSuggestions.length]]</span
+ >
+ <gr-button
+ id="prevFix"
+ on-click="_onPrevFixClick"
+ disabled$="[[_noPrevFix(_selectedFixIdx)]]"
+ >
+ <iron-icon icon="gr-icons:chevron-left"></iron-icon>
+ </gr-button>
+ <gr-button
+ id="nextFix"
+ on-click="_onNextFixClick"
+ disabled$="[[_noNextFix(_selectedFixIdx, _fixSuggestions)]]"
+ >
+ <iron-icon icon="gr-icons:chevron-right"></iron-icon>
+ </gr-button>
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api_html.js b/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api_html.js
index 215bfac..8aa0835 100644
--- a/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-comment-api/gr-comment-api_html.js
@@ -17,5 +17,5 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/diff/gr-coverage-layer/gr-coverage-layer_html.js b/polygerrit-ui/app/elements/diff/gr-coverage-layer/gr-coverage-layer_html.js
index 29757e5..3ed33d1 100644
--- a/polygerrit-ui/app/elements/diff/gr-coverage-layer/gr-coverage-layer_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-coverage-layer/gr-coverage-layer_html.js
@@ -16,6 +16,4 @@
*/
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
-export const htmlTemplate = html`
-
-`;
+export const htmlTemplate = html``;
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder-element_html.js b/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder-element_html.js
index c8df78f..4d6b890 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder-element_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-builder/gr-diff-builder-element_html.js
@@ -17,11 +17,22 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <div class="contentWrapper">
- <slot></slot>
- </div>
- <gr-ranged-comment-layer id="rangeLayer" comment-ranges="[[commentRanges]]"></gr-ranged-comment-layer>
- <gr-coverage-layer id="coverageLayerLeft" coverage-ranges="[[_leftCoverageRanges]]" side="left"></gr-coverage-layer>
- <gr-coverage-layer id="coverageLayerRight" coverage-ranges="[[_rightCoverageRanges]]" side="right"></gr-coverage-layer>
- <gr-diff-processor id="processor" groups="{{_groups}}"></gr-diff-processor>
+ <div class="contentWrapper">
+ <slot></slot>
+ </div>
+ <gr-ranged-comment-layer
+ id="rangeLayer"
+ comment-ranges="[[commentRanges]]"
+ ></gr-ranged-comment-layer>
+ <gr-coverage-layer
+ id="coverageLayerLeft"
+ coverage-ranges="[[_leftCoverageRanges]]"
+ side="left"
+ ></gr-coverage-layer>
+ <gr-coverage-layer
+ id="coverageLayerRight"
+ coverage-ranges="[[_rightCoverageRanges]]"
+ side="right"
+ ></gr-coverage-layer>
+ <gr-diff-processor id="processor" groups="{{_groups}}"></gr-diff-processor>
`;
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor_html.js b/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor_html.js
index 81e0c9b..1ac47f6 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-cursor/gr-diff-cursor_html.js
@@ -17,5 +17,12 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <gr-cursor-manager id="cursorManager" scroll-behavior="[[_scrollBehavior]]" cursor-target-class="target-row" focus-on-move="[[_focusOnMove]]" target="{{diffRow}}" scroll-top-margin="[[scrollTopMargin]]"></gr-cursor-manager>
+ <gr-cursor-manager
+ id="cursorManager"
+ scroll-behavior="[[_scrollBehavior]]"
+ cursor-target-class="target-row"
+ focus-on-move="[[_focusOnMove]]"
+ target="{{diffRow}}"
+ scroll-top-margin="[[scrollTopMargin]]"
+ ></gr-cursor-manager>
`;
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight_html.js b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight_html.js
index 10b4f2d..08b21499 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-highlight/gr-diff-highlight_html.js
@@ -17,19 +17,19 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- position: relative;
- }
- gr-selection-action-box {
- /**
+ <style include="shared-styles">
+ :host {
+ position: relative;
+ }
+ gr-selection-action-box {
+ /**
* Needs z-index to apear above wrapped content, since it's inseted
* into DOM before it.
*/
- z-index: 10;
- }
- </style>
- <div class="contentWrapper">
- <slot></slot>
- </div>
+ z-index: 10;
+ }
+ </style>
+ <div class="contentWrapper">
+ <slot></slot>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_html.js b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_html.js
index d48531b..4e425dc 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-host/gr-diff-host_html.js
@@ -17,10 +17,41 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <gr-diff id="diff" change-num="[[changeNum]]" no-auto-render="[[noAutoRender]]" patch-range="[[patchRange]]" path="[[path]]" prefs="[[prefs]]" project-name="[[projectName]]" display-line="[[displayLine]]" is-image-diff="[[isImageDiff]]" commit-range="[[commitRange]]" hidden\$="[[hidden]]" no-render-on-prefs-change="[[noRenderOnPrefsChange]]" line-wrapping="[[lineWrapping]]" view-mode="[[viewMode]]" line-of-interest="[[lineOfInterest]]" logged-in="[[_loggedIn]]" loading="[[_loading]]" error-message="[[_errorMessage]]" base-image="[[_baseImage]]" revision-image="[[_revisionImage]]" coverage-ranges="[[_coverageRanges]]" blame="[[_blame]]" layers="[[_layers]]" diff="[[diff]]" show-newline-warning-left="[[_showNewlineWarningLeft(diff)]]" show-newline-warning-right="[[_showNewlineWarningRight(diff)]]">
- </gr-diff>
- <gr-syntax-layer id="syntaxLayer" enabled="[[_syntaxHighlightingEnabled]]" diff="[[diff]]"></gr-syntax-layer>
- <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
- <gr-reporting id="reporting" category="diff"></gr-reporting>
+ <gr-diff
+ id="diff"
+ change-num="[[changeNum]]"
+ no-auto-render="[[noAutoRender]]"
+ patch-range="[[patchRange]]"
+ path="[[path]]"
+ prefs="[[prefs]]"
+ project-name="[[projectName]]"
+ display-line="[[displayLine]]"
+ is-image-diff="[[isImageDiff]]"
+ commit-range="[[commitRange]]"
+ hidden$="[[hidden]]"
+ no-render-on-prefs-change="[[noRenderOnPrefsChange]]"
+ line-wrapping="[[lineWrapping]]"
+ view-mode="[[viewMode]]"
+ line-of-interest="[[lineOfInterest]]"
+ logged-in="[[_loggedIn]]"
+ loading="[[_loading]]"
+ error-message="[[_errorMessage]]"
+ base-image="[[_baseImage]]"
+ revision-image="[[_revisionImage]]"
+ coverage-ranges="[[_coverageRanges]]"
+ blame="[[_blame]]"
+ layers="[[_layers]]"
+ diff="[[diff]]"
+ show-newline-warning-left="[[_showNewlineWarningLeft(diff)]]"
+ show-newline-warning-right="[[_showNewlineWarningRight(diff)]]"
+ >
+ </gr-diff>
+ <gr-syntax-layer
+ id="syntaxLayer"
+ enabled="[[_syntaxHighlightingEnabled]]"
+ diff="[[diff]]"
+ ></gr-syntax-layer>
+ <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-reporting id="reporting" category="diff"></gr-reporting>
`;
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-mode-selector/gr-diff-mode-selector_html.js b/polygerrit-ui/app/elements/diff/gr-diff-mode-selector/gr-diff-mode-selector_html.js
index 5fe516c..b5393ea 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-mode-selector/gr-diff-mode-selector_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-mode-selector/gr-diff-mode-selector_html.js
@@ -17,24 +17,38 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- /* Used to remove horizontal whitespace between the icons. */
- display: flex;
- }
- gr-button.selected iron-icon {
- color: var(--link-color);
- }
- iron-icon {
- height: 1.3rem;
- width: 1.3rem;
- }
- </style>
- <gr-button id="sideBySideBtn" link="" has-tooltip="" class\$="[[_computeSelectedClass(mode, _VIEW_MODES.SIDE_BY_SIDE)]]" title="Side-by-side diff" on-click="_handleSideBySideTap">
- <iron-icon icon="gr-icons:side-by-side"></iron-icon>
- </gr-button>
- <gr-button id="unifiedBtn" link="" has-tooltip="" title="Unified diff" class\$="[[_computeSelectedClass(mode, _VIEW_MODES.UNIFIED)]]" on-click="_handleUnifiedTap">
- <iron-icon icon="gr-icons:unified"></iron-icon>
- </gr-button>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <style include="shared-styles">
+ :host {
+ /* Used to remove horizontal whitespace between the icons. */
+ display: flex;
+ }
+ gr-button.selected iron-icon {
+ color: var(--link-color);
+ }
+ iron-icon {
+ height: 1.3rem;
+ width: 1.3rem;
+ }
+ </style>
+ <gr-button
+ id="sideBySideBtn"
+ link=""
+ has-tooltip=""
+ class$="[[_computeSelectedClass(mode, _VIEW_MODES.SIDE_BY_SIDE)]]"
+ title="Side-by-side diff"
+ on-click="_handleSideBySideTap"
+ >
+ <iron-icon icon="gr-icons:side-by-side"></iron-icon>
+ </gr-button>
+ <gr-button
+ id="unifiedBtn"
+ link=""
+ has-tooltip=""
+ title="Unified diff"
+ class$="[[_computeSelectedClass(mode, _VIEW_MODES.UNIFIED)]]"
+ on-click="_handleUnifiedTap"
+ >
+ <iron-icon icon="gr-icons:unified"></iron-icon>
+ </gr-button>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-preferences-dialog/gr-diff-preferences-dialog_html.js b/polygerrit-ui/app/elements/diff/gr-diff-preferences-dialog/gr-diff-preferences-dialog_html.js
index cd26a0b..1d70a4a 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-preferences-dialog/gr-diff-preferences-dialog_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-preferences-dialog/gr-diff-preferences-dialog_html.js
@@ -17,46 +17,58 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- .diffHeader,
- .diffActions {
- padding: var(--spacing-l) var(--spacing-xl);
- }
- .diffHeader,
- .diffActions {
- background-color: var(--dialog-background-color);
- }
- .diffHeader {
- border-bottom: 1px solid var(--border-color);
- font-weight: var(--font-weight-bold);
- }
- .diffActions {
- border-top: 1px solid var(--border-color);
- display: flex;
- justify-content: flex-end;
- }
- .diffPrefsOverlay gr-button {
- margin-left: var(--spacing-l);
- }
- div.edited:after {
- color: var(--deemphasized-text-color);
- content: ' *';
- }
- #diffPreferences {
- display: flex;
- padding: var(--spacing-s) var(--spacing-xl);
- }
- </style>
- <gr-overlay id="diffPrefsOverlay" with-backdrop="">
- <div class\$="diffHeader [[_computeHeaderClass(_diffPrefsChanged)]]">Diff Preferences</div>
- <gr-diff-preferences id="diffPreferences" diff-prefs="{{diffPrefs}}" has-unsaved-changes="{{_diffPrefsChanged}}"></gr-diff-preferences>
- <div class="diffActions">
- <gr-button id="cancelButton" link="" on-click="_handleCancelDiff">
- Cancel
- </gr-button>
- <gr-button id="saveButton" link="" primary="" on-click="_handleSaveDiffPreferences" disabled\$="[[!_diffPrefsChanged]]">
- Save
- </gr-button>
- </div>
- </gr-overlay>
+ <style include="shared-styles">
+ .diffHeader,
+ .diffActions {
+ padding: var(--spacing-l) var(--spacing-xl);
+ }
+ .diffHeader,
+ .diffActions {
+ background-color: var(--dialog-background-color);
+ }
+ .diffHeader {
+ border-bottom: 1px solid var(--border-color);
+ font-weight: var(--font-weight-bold);
+ }
+ .diffActions {
+ border-top: 1px solid var(--border-color);
+ display: flex;
+ justify-content: flex-end;
+ }
+ .diffPrefsOverlay gr-button {
+ margin-left: var(--spacing-l);
+ }
+ div.edited:after {
+ color: var(--deemphasized-text-color);
+ content: ' *';
+ }
+ #diffPreferences {
+ display: flex;
+ padding: var(--spacing-s) var(--spacing-xl);
+ }
+ </style>
+ <gr-overlay id="diffPrefsOverlay" with-backdrop="">
+ <div class$="diffHeader [[_computeHeaderClass(_diffPrefsChanged)]]">
+ Diff Preferences
+ </div>
+ <gr-diff-preferences
+ id="diffPreferences"
+ diff-prefs="{{diffPrefs}}"
+ has-unsaved-changes="{{_diffPrefsChanged}}"
+ ></gr-diff-preferences>
+ <div class="diffActions">
+ <gr-button id="cancelButton" link="" on-click="_handleCancelDiff">
+ Cancel
+ </gr-button>
+ <gr-button
+ id="saveButton"
+ link=""
+ primary=""
+ on-click="_handleSaveDiffPreferences"
+ disabled$="[[!_diffPrefsChanged]]"
+ >
+ Save
+ </gr-button>
+ </div>
+ </gr-overlay>
`;
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection_html.js b/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection_html.js
index ce6008e..620ef02 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-selection/gr-diff-selection_html.js
@@ -17,7 +17,7 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <div class="contentWrapper">
- <slot></slot>
- </div>
+ <div class="contentWrapper">
+ <slot></slot>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_html.js b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_html.js
index cf4cf92..38078bf 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff-view/gr-diff-view_html.js
@@ -17,278 +17,408 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- background-color: var(--view-background-color);
+ <style include="shared-styles">
+ :host {
+ background-color: var(--view-background-color);
+ }
+ .hidden {
+ display: none;
+ }
+ gr-patch-range-select {
+ display: block;
+ }
+ gr-diff {
+ border: none;
+ --diff-container-styles: {
+ border-bottom: 1px solid var(--border-color);
}
- .hidden {
+ }
+ gr-fixed-panel {
+ background-color: var(--view-background-color);
+ border-bottom: 1px solid var(--border-color);
+ z-index: 1;
+ }
+ header,
+ .subHeader {
+ align-items: center;
+ display: flex;
+ justify-content: space-between;
+ }
+ header {
+ padding: var(--spacing-s) var(--spacing-xl);
+ border-bottom: 1px solid var(--border-color);
+ }
+ .changeNumberColon {
+ color: transparent;
+ }
+ .headerSubject {
+ margin-right: var(--spacing-m);
+ font-weight: var(--font-weight-bold);
+ }
+ .patchRangeLeft {
+ align-items: center;
+ display: flex;
+ }
+ .navLink:not([href]) {
+ color: var(--deemphasized-text-color);
+ }
+ .navLinks {
+ align-items: center;
+ display: flex;
+ white-space: nowrap;
+ }
+ .navLink {
+ padding: 0 var(--spacing-xs);
+ }
+ .reviewed {
+ display: inline-block;
+ margin: 0 var(--spacing-xs);
+ vertical-align: 0.15em;
+ }
+ .jumpToFileContainer {
+ display: inline-block;
+ }
+ .mobile {
+ display: none;
+ }
+ gr-button {
+ padding: var(--spacing-s) 0;
+ text-decoration: none;
+ }
+ .loading {
+ color: var(--deemphasized-text-color);
+ font-family: var(--header-font-family);
+ font-size: var(--font-size-h1);
+ font-weight: var(--font-weight-h1);
+ line-height: var(--line-height-h1);
+ height: 100%;
+ padding: var(--spacing-l);
+ text-align: center;
+ }
+ .subHeader {
+ background-color: var(--background-color-secondary);
+ flex-wrap: wrap;
+ padding: 0 var(--spacing-l);
+ }
+ .prefsButton {
+ text-align: right;
+ }
+ .noOverflow {
+ display: block;
+ overflow: auto;
+ }
+ .editMode .hideOnEdit {
+ display: none;
+ }
+ .blameLoader,
+ .fileNum {
+ display: none;
+ }
+ .blameLoader.show,
+ .fileNum.show,
+ .download,
+ .preferences,
+ .rightControls {
+ align-items: center;
+ display: flex;
+ }
+ .diffModeSelector,
+ .editButton {
+ align-items: center;
+ display: flex;
+ }
+ .diffModeSelector span,
+ .editButton span {
+ margin-right: var(--spacing-xs);
+ }
+ .diffModeSelector.hide,
+ .separator.hide {
+ display: none;
+ }
+ gr-dropdown-list {
+ --trigger-style: {
+ text-transform: none;
+ }
+ }
+ .editButtona a {
+ text-decoration: none;
+ }
+ @media screen and (max-width: 50em) {
+ header {
+ padding: var(--spacing-s) var(--spacing-l);
+ }
+ .dash {
display: none;
}
- gr-patch-range-select {
+ .desktop {
+ display: none;
+ }
+ .fileNav {
+ align-items: flex-start;
+ display: flex;
+ margin: 0 var(--spacing-xs);
+ }
+ .fullFileName {
display: block;
- }
- gr-diff {
- border: none;
- --diff-container-styles: {
- border-bottom: 1px solid var(--border-color);
- }
- }
- gr-fixed-panel {
- background-color: var(--view-background-color);
- border-bottom: 1px solid var(--border-color);
- z-index: 1;
- }
- header,
- .subHeader {
- align-items: center;
- display: flex;
- justify-content: space-between;
- }
- header {
- padding: var(--spacing-s) var(--spacing-xl);
- border-bottom: 1px solid var(--border-color);
- }
- .changeNumberColon {
- color: transparent;
- }
- .headerSubject {
- margin-right: var(--spacing-m);
- font-weight: var(--font-weight-bold);
- }
- .patchRangeLeft {
- align-items: center;
- display: flex;
- }
- .navLink:not([href]) {
- color: var(--deemphasized-text-color);
- }
- .navLinks {
- align-items: center;
- display: flex;
- white-space: nowrap;
- }
- .navLink {
- padding: 0 var(--spacing-xs);
+ font-style: italic;
+ min-width: 50%;
+ padding: 0 var(--spacing-xxs);
+ text-align: center;
+ width: 100%;
+ word-wrap: break-word;
}
.reviewed {
- display: inline-block;
- margin: 0 var(--spacing-xs);
- vertical-align: .15em;
+ vertical-align: -1px;
+ }
+ .mobileNavLink {
+ color: var(--primary-text-color);
+ font-family: var(--header-font-family);
+ font-size: var(--font-size-h2);
+ font-weight: var(--font-weight-h2);
+ line-height: var(--line-height-h2);
+ text-decoration: none;
+ }
+ .mobileNavLink:not([href]) {
+ color: var(--deemphasized-text-color);
}
.jumpToFileContainer {
- display: inline-block;
- }
- .mobile {
- display: none;
- }
- gr-button {
- padding: var(--spacing-s) 0;
- text-decoration: none;
- }
- .loading {
- color: var(--deemphasized-text-color);
- font-family: var(--header-font-family);
- font-size: var(--font-size-h1);
- font-weight: var(--font-weight-h1);
- line-height: var(--line-height-h1);
- height: 100%;
- padding: var(--spacing-l);
- text-align: center;
- }
- .subHeader {
- background-color: var(--background-color-secondary);
- flex-wrap: wrap;
- padding: 0 var(--spacing-l);
- }
- .prefsButton {
- text-align: right;
- }
- .noOverflow {
display: block;
- overflow: auto;
- }
- .editMode .hideOnEdit {
- display: none;
- }
- .blameLoader,
- .fileNum {
- display: none;
- }
- .blameLoader.show,
- .fileNum.show ,
- .download,
- .preferences,
- .rightControls {
- align-items: center;
- display: flex;
- }
- .diffModeSelector,
- .editButton {
- align-items: center;
- display: flex;
- }
- .diffModeSelector span,
- .editButton span {
- margin-right: var(--spacing-xs);
- }
- .diffModeSelector.hide,
- .separator.hide {
- display: none;
+ width: 100%;
}
gr-dropdown-list {
- --trigger-style: {
- text-transform: none;
- }
- }
- .editButtona a {
- text-decoration: none;
- }
- @media screen and (max-width: 50em) {
- header {
- padding: var(--spacing-s) var(--spacing-l);
- }
- .dash {
- display: none;
- }
- .desktop {
- display: none;
- }
- .fileNav {
- align-items: flex-start;
- display: flex;
- margin: 0 var(--spacing-xs);
- }
- .fullFileName {
- display: block;
- font-style: italic;
- min-width: 50%;
- padding: 0 var(--spacing-xxs);
- text-align: center;
- width: 100%;
- word-wrap: break-word;
- }
- .reviewed {
- vertical-align: -1px;
- }
- .mobileNavLink {
- color: var(--primary-text-color);
- font-family: var(--header-font-family);
- font-size: var(--font-size-h2);
- font-weight: var(--font-weight-h2);
- line-height: var(--line-height-h2);
- text-decoration: none;
- }
- .mobileNavLink:not([href]) {
- color: var(--deemphasized-text-color);
- }
- .jumpToFileContainer {
+ width: 100%;
+ --gr-select-style: {
display: block;
width: 100%;
}
- gr-dropdown-list {
+ --native-select-style: {
width: 100%;
- --gr-select-style: {
- display: block;
- width: 100%;
- }
- --native-select-style: {
- width: 100%;
- }
}
}
- </style>
- <gr-fixed-panel class\$="[[_computeContainerClass(_editMode)]]" floating-disabled="[[_panelFloatingDisabled]]" keep-on-scroll="" ready-for-measure="[[!_loading]]" on-floating-height-changed="_onChangeHeaderPanelHeightChanged">
- <header>
- <div>
- <a href\$="[[_computeChangePath(_change, _patchRange.*, _change.revisions)]]">[[_changeNum]]</a><!--
+ }
+ </style>
+ <gr-fixed-panel
+ class$="[[_computeContainerClass(_editMode)]]"
+ floating-disabled="[[_panelFloatingDisabled]]"
+ keep-on-scroll=""
+ ready-for-measure="[[!_loading]]"
+ on-floating-height-changed="_onChangeHeaderPanelHeightChanged"
+ >
+ <header>
+ <div>
+ <a
+ href$="[[_computeChangePath(_change, _patchRange.*, _change.revisions)]]"
+ >[[_changeNum]]</a
+ ><!--
--><span class="changeNumberColon">:</span>
- <span class="headerSubject">[[_change.subject]]</span>
- <input id="reviewed" class="reviewed hideOnEdit" type="checkbox" on-change="_handleReviewedChange" hidden\$="[[!_loggedIn]]" hidden=""><!--
- --><div class="jumpToFileContainer">
- <gr-dropdown-list id="dropdown" value="[[_path]]" on-value-change="_handleFileChange" items="[[_formattedFiles]]" initial-count="75">
- </gr-dropdown-list>
- </div>
- </div>
- <div class="navLinks desktop">
- <span class\$="fileNum [[_computeFileNumClass(_fileNum, _formattedFiles)]]">
- File [[_fileNum]] of [[_formattedFiles.length]]
- <span class="separator"></span>
- </span>
- <a class="navLink" title="[[createTitle(Shortcut.PREV_FILE,
- ShortcutSection.NAVIGATION)]]" href\$="[[_computeNavLinkURL(_change, _path, _fileList, -1, 1)]]">
- Prev</a>
- <span class="separator"></span>
- <a class="navLink" title="[[createTitle(Shortcut.UP_TO_CHANGE,
- ShortcutSection.NAVIGATION)]]" href\$="[[_computeChangePath(_change, _patchRange.*, _change.revisions)]]">
- Up</a>
- <span class="separator"></span>
- <a class="navLink" title="[[createTitle(Shortcut.NEXT_FILE,
- ShortcutSection.NAVIGATION)]]" href\$="[[_computeNavLinkURL(_change, _path, _fileList, 1, 1)]]">
- Next</a>
- </div>
- </header>
- <div class="subHeader">
- <div class="patchRangeLeft">
- <gr-patch-range-select id="rangeSelect" change-num="[[_changeNum]]" change-comments="[[_changeComments]]" patch-num="[[_patchRange.patchNum]]" base-patch-num="[[_patchRange.basePatchNum]]" files-weblinks="[[_filesWeblinks]]" available-patches="[[_allPatchSets]]" revisions="[[_change.revisions]]" revision-info="[[_revisionInfo]]" on-patch-range-change="_handlePatchChange">
- </gr-patch-range-select>
- <span class="download desktop">
- <span class="separator"></span>
- <gr-dropdown link="" down-arrow="" items="[[_computeDownloadDropdownLinks(_change.project, _changeNum, _patchRange, _path, _diff)]]" horizontal-align="left">
- <span class="downloadTitle">
- Download
- </span>
- </gr-dropdown>
- </span>
- </div>
- <div class="rightControls">
- <span class\$="blameLoader [[_computeBlameLoaderClass(_isImageDiff, _path)]]">
- <gr-button link="" id="toggleBlame" title="[[createTitle(Shortcut.TOGGLE_BLAME, ShortcutSection.DIFFS)]]" disabled="[[_isBlameLoading]]" on-click="_toggleBlame">[[_computeBlameToggleLabel(_isBlameLoaded, _isBlameLoading)]]</gr-button>
- </span>
- <template is="dom-if" if="[[_computeIsLoggedIn(_loggedIn)]]">
- <span class="separator"></span>
- <span class="editButton">
- <gr-button link="" title="Edit current file" on-click="_goToEditFile">edit</gr-button>
- </span>
- </template>
- <span class="separator"></span>
- <div class\$="diffModeSelector [[_computeModeSelectHideClass(_isImageDiff)]]">
- <span>Diff view:</span>
- <gr-diff-mode-selector id="modeSelect" save-on-change="[[!_diffPrefsDisabled]]" mode="{{changeViewState.diffMode}}"></gr-diff-mode-selector>
- </div>
- <span id="diffPrefsContainer" hidden\$="[[_computePrefsButtonHidden(_prefs, _diffPrefsDisabled)]]" hidden="">
- <span class="preferences desktop">
- <gr-button link="" class="prefsButton" has-tooltip="" title="Diff preferences" on-click="_handlePrefsTap"><iron-icon icon="gr-icons:settings"></iron-icon></gr-button>
- </span>
- </span>
- <gr-endpoint-decorator name="annotation-toggler">
- <span hidden="" id="annotation-span">
- <label for="annotation-checkbox" id="annotation-label"></label>
- <iron-input type="checkbox" disabled="">
- <input is="iron-input" type="checkbox" id="annotation-checkbox" disabled="">
- </iron-input>
- </span>
- </gr-endpoint-decorator>
+ <span class="headerSubject">[[_change.subject]]</span>
+ <input
+ id="reviewed"
+ class="reviewed hideOnEdit"
+ type="checkbox"
+ on-change="_handleReviewedChange"
+ hidden$="[[!_loggedIn]]"
+ hidden=""
+ /><!--
+ -->
+ <div class="jumpToFileContainer">
+ <gr-dropdown-list
+ id="dropdown"
+ value="[[_path]]"
+ on-value-change="_handleFileChange"
+ items="[[_formattedFiles]]"
+ initial-count="75"
+ >
+ </gr-dropdown-list>
</div>
</div>
- <div class="fileNav mobile">
- <a class="mobileNavLink" href\$="[[_computeNavLinkURL(_change, _path, _fileList, -1, 1)]]">
- <</a>
- <div class="fullFileName mobile">[[computeDisplayPath(_path)]]
- </div>
- <a class="mobileNavLink" href\$="[[_computeNavLinkURL(_change, _path, _fileList, 1, 1)]]">
- ></a>
+ <div class="navLinks desktop">
+ <span
+ class$="fileNum [[_computeFileNumClass(_fileNum, _formattedFiles)]]"
+ >
+ File [[_fileNum]] of [[_formattedFiles.length]]
+ <span class="separator"></span>
+ </span>
+ <a
+ class="navLink"
+ title="[[createTitle(Shortcut.PREV_FILE,
+ ShortcutSection.NAVIGATION)]]"
+ href$="[[_computeNavLinkURL(_change, _path, _fileList, -1, 1)]]"
+ >
+ Prev</a
+ >
+ <span class="separator"></span>
+ <a
+ class="navLink"
+ title="[[createTitle(Shortcut.UP_TO_CHANGE,
+ ShortcutSection.NAVIGATION)]]"
+ href$="[[_computeChangePath(_change, _patchRange.*, _change.revisions)]]"
+ >
+ Up</a
+ >
+ <span class="separator"></span>
+ <a
+ class="navLink"
+ title="[[createTitle(Shortcut.NEXT_FILE,
+ ShortcutSection.NAVIGATION)]]"
+ href$="[[_computeNavLinkURL(_change, _path, _fileList, 1, 1)]]"
+ >
+ Next</a
+ >
</div>
- </gr-fixed-panel>
- <div class="loading" hidden\$="[[!_loading]]">Loading...</div>
- <gr-diff-host id="diffHost" hidden="" hidden\$="[[_loading]]" class\$="[[_computeDiffClass(_panelFloatingDisabled)]]" is-image-diff="{{_isImageDiff}}" files-weblinks="{{_filesWeblinks}}" diff="{{_diff}}" change-num="[[_changeNum]]" commit-range="[[_commitRange]]" patch-range="[[_patchRange]]" path="[[_path]]" prefs="[[_prefs]]" project-name="[[_change.project]]" view-mode="[[_diffMode]]" is-blame-loaded="{{_isBlameLoaded}}" on-comment-anchor-tap="_onLineSelected" on-line-selected="_onLineSelected">
- </gr-diff-host>
- <gr-apply-fix-dialog id="applyFixDialog" prefs="[[_prefs]]" change="[[_change]]" change-num="[[_changeNum]]">
- </gr-apply-fix-dialog>
- <gr-diff-preferences-dialog id="diffPreferencesDialog" diff-prefs="{{_prefs}}" on-reload-diff-preference="_handleReloadingDiffPreference">
- </gr-diff-preferences-dialog>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
- <gr-storage id="storage"></gr-storage>
- <gr-diff-cursor id="cursor" scroll-top-margin="[[_scrollTopMargin]]"></gr-diff-cursor>
- <gr-comment-api id="commentAPI"></gr-comment-api>
- <gr-reporting id="reporting"></gr-reporting>
+ </header>
+ <div class="subHeader">
+ <div class="patchRangeLeft">
+ <gr-patch-range-select
+ id="rangeSelect"
+ change-num="[[_changeNum]]"
+ change-comments="[[_changeComments]]"
+ patch-num="[[_patchRange.patchNum]]"
+ base-patch-num="[[_patchRange.basePatchNum]]"
+ files-weblinks="[[_filesWeblinks]]"
+ available-patches="[[_allPatchSets]]"
+ revisions="[[_change.revisions]]"
+ revision-info="[[_revisionInfo]]"
+ on-patch-range-change="_handlePatchChange"
+ >
+ </gr-patch-range-select>
+ <span class="download desktop">
+ <span class="separator"></span>
+ <gr-dropdown
+ link=""
+ down-arrow=""
+ items="[[_computeDownloadDropdownLinks(_change.project, _changeNum, _patchRange, _path, _diff)]]"
+ horizontal-align="left"
+ >
+ <span class="downloadTitle">
+ Download
+ </span>
+ </gr-dropdown>
+ </span>
+ </div>
+ <div class="rightControls">
+ <span
+ class$="blameLoader [[_computeBlameLoaderClass(_isImageDiff, _path)]]"
+ >
+ <gr-button
+ link=""
+ id="toggleBlame"
+ title="[[createTitle(Shortcut.TOGGLE_BLAME, ShortcutSection.DIFFS)]]"
+ disabled="[[_isBlameLoading]]"
+ on-click="_toggleBlame"
+ >[[_computeBlameToggleLabel(_isBlameLoaded,
+ _isBlameLoading)]]</gr-button
+ >
+ </span>
+ <template is="dom-if" if="[[_computeIsLoggedIn(_loggedIn)]]">
+ <span class="separator"></span>
+ <span class="editButton">
+ <gr-button
+ link=""
+ title="Edit current file"
+ on-click="_goToEditFile"
+ >edit</gr-button
+ >
+ </span>
+ </template>
+ <span class="separator"></span>
+ <div
+ class$="diffModeSelector [[_computeModeSelectHideClass(_isImageDiff)]]"
+ >
+ <span>Diff view:</span>
+ <gr-diff-mode-selector
+ id="modeSelect"
+ save-on-change="[[!_diffPrefsDisabled]]"
+ mode="{{changeViewState.diffMode}}"
+ ></gr-diff-mode-selector>
+ </div>
+ <span
+ id="diffPrefsContainer"
+ hidden$="[[_computePrefsButtonHidden(_prefs, _diffPrefsDisabled)]]"
+ hidden=""
+ >
+ <span class="preferences desktop">
+ <gr-button
+ link=""
+ class="prefsButton"
+ has-tooltip=""
+ title="Diff preferences"
+ on-click="_handlePrefsTap"
+ ><iron-icon icon="gr-icons:settings"></iron-icon
+ ></gr-button>
+ </span>
+ </span>
+ <gr-endpoint-decorator name="annotation-toggler">
+ <span hidden="" id="annotation-span">
+ <label for="annotation-checkbox" id="annotation-label"></label>
+ <iron-input type="checkbox" disabled="">
+ <input
+ is="iron-input"
+ type="checkbox"
+ id="annotation-checkbox"
+ disabled=""
+ />
+ </iron-input>
+ </span>
+ </gr-endpoint-decorator>
+ </div>
+ </div>
+ <div class="fileNav mobile">
+ <a
+ class="mobileNavLink"
+ href$="[[_computeNavLinkURL(_change, _path, _fileList, -1, 1)]]"
+ >
+ <</a
+ >
+ <div class="fullFileName mobile">[[computeDisplayPath(_path)]]</div>
+ <a
+ class="mobileNavLink"
+ href$="[[_computeNavLinkURL(_change, _path, _fileList, 1, 1)]]"
+ >
+ ></a
+ >
+ </div>
+ </gr-fixed-panel>
+ <div class="loading" hidden$="[[!_loading]]">Loading...</div>
+ <gr-diff-host
+ id="diffHost"
+ hidden=""
+ hidden$="[[_loading]]"
+ class$="[[_computeDiffClass(_panelFloatingDisabled)]]"
+ is-image-diff="{{_isImageDiff}}"
+ files-weblinks="{{_filesWeblinks}}"
+ diff="{{_diff}}"
+ change-num="[[_changeNum]]"
+ commit-range="[[_commitRange]]"
+ patch-range="[[_patchRange]]"
+ path="[[_path]]"
+ prefs="[[_prefs]]"
+ project-name="[[_change.project]]"
+ view-mode="[[_diffMode]]"
+ is-blame-loaded="{{_isBlameLoaded}}"
+ on-comment-anchor-tap="_onLineSelected"
+ on-line-selected="_onLineSelected"
+ >
+ </gr-diff-host>
+ <gr-apply-fix-dialog
+ id="applyFixDialog"
+ prefs="[[_prefs]]"
+ change="[[_change]]"
+ change-num="[[_changeNum]]"
+ >
+ </gr-apply-fix-dialog>
+ <gr-diff-preferences-dialog
+ id="diffPreferencesDialog"
+ diff-prefs="{{_prefs}}"
+ on-reload-diff-preference="_handleReloadingDiffPreference"
+ >
+ </gr-diff-preferences-dialog>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-storage id="storage"></gr-storage>
+ <gr-diff-cursor
+ id="cursor"
+ scroll-top-margin="[[_scrollTopMargin]]"
+ ></gr-diff-cursor>
+ <gr-comment-api id="commentAPI"></gr-comment-api>
+ <gr-reporting id="reporting"></gr-reporting>
`;
diff --git a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff_html.js b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff_html.js
index 1ec8175..a8ee85c 100644
--- a/polygerrit-ui/app/elements/diff/gr-diff/gr-diff_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-diff/gr-diff_html.js
@@ -17,384 +17,438 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host(.no-left) .sideBySide .left,
- :host(.no-left) .sideBySide .left + td,
- :host(.no-left) .sideBySide .right:not([data-value]),
- :host(.no-left) .sideBySide .right:not([data-value]) + td {
- display: none;
- }
- :host {
- font-family: var(--monospace-font-family, ''), 'Roboto Mono';
- font-size: var(--font-size, var(--font-size-code, 12px));
- line-height: var(--line-height-code, 1.334);
- }
+ <style include="shared-styles">
+ :host(.no-left) .sideBySide .left,
+ :host(.no-left) .sideBySide .left + td,
+ :host(.no-left) .sideBySide .right:not([data-value]),
+ :host(.no-left) .sideBySide .right:not([data-value]) + td {
+ display: none;
+ }
+ :host {
+ font-family: var(--monospace-font-family, ''), 'Roboto Mono';
+ font-size: var(--font-size, var(--font-size-code, 12px));
+ line-height: var(--line-height-code, 1.334);
+ }
- .thread-group {
- display: block;
- max-width: var(--content-width, 80ch);
- white-space: normal;
- background-color: var(--diff-blank-background-color);
- }
- .diffContainer {
- display: flex;
- font-family: var(--monospace-font-family);
- @apply --diff-container-styles;
- }
- .diffContainer.hiddenscroll {
- margin-bottom: var(--spacing-m);
- }
- table {
- border-collapse: collapse;
- border-right: 1px solid var(--border-color);
- table-layout: fixed;
- }
- .lineNumButton {
- display: block;
- width: 100%;
- height: 100%;
- background-color: var(--diff-blank-background-color);
- }
- /*
+ .thread-group {
+ display: block;
+ max-width: var(--content-width, 80ch);
+ white-space: normal;
+ background-color: var(--diff-blank-background-color);
+ }
+ .diffContainer {
+ display: flex;
+ font-family: var(--monospace-font-family);
+ @apply --diff-container-styles;
+ }
+ .diffContainer.hiddenscroll {
+ margin-bottom: var(--spacing-m);
+ }
+ table {
+ border-collapse: collapse;
+ border-right: 1px solid var(--border-color);
+ table-layout: fixed;
+ }
+ .lineNumButton {
+ display: block;
+ width: 100%;
+ height: 100%;
+ background-color: var(--diff-blank-background-color);
+ }
+ /*
The only way to focus this (clicking) will apply our own focus styling,
so this default styling is not needed and distracting.
*/
- .lineNumButton:focus {
- outline: none;
- }
- .image-diff .gr-diff {
- text-align: center;
- }
- .image-diff img {
- box-shadow: var(--elevation-level-1);
- max-width: 50em;
- }
- .image-diff .right.lineNumButton {
- border-left: 1px solid var(--border-color);
- }
- .image-diff label,
- .binary-diff label {
- font-family: var(--font-family);
- font-style: italic;
- }
- .diff-row {
- outline: none;
- user-select: none;
- }
- .diff-row.target-row.target-side-left .lineNumButton.left,
- .diff-row.target-row.target-side-right .lineNumButton.right,
- .diff-row.target-row.unified .lineNumButton {
- background-color: var(--diff-selection-background-color);
- color: var(--primary-text-color);
- }
- .content {
- background-color: var(--diff-blank-background-color);
- }
- .contentText {
- background-color: var(--view-background-color);
- }
- .blank {
- background-color: var(--diff-blank-background-color);
- }
- .image-diff .content {
- background-color: var(--diff-blank-background-color);
- }
- .full-width {
- width: 100%;
- }
- .full-width .contentText {
- white-space: pre-wrap;
- word-wrap: break-word;
- }
- .lineNumButton,
- .content {
- vertical-align: top;
- white-space: pre;
- }
- .contextLineNum,
- .lineNumButton {
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
+ .lineNumButton:focus {
+ outline: none;
+ }
+ .image-diff .gr-diff {
+ text-align: center;
+ }
+ .image-diff img {
+ box-shadow: var(--elevation-level-1);
+ max-width: 50em;
+ }
+ .image-diff .right.lineNumButton {
+ border-left: 1px solid var(--border-color);
+ }
+ .image-diff label,
+ .binary-diff label {
+ font-family: var(--font-family);
+ font-style: italic;
+ }
+ .diff-row {
+ outline: none;
+ user-select: none;
+ }
+ .diff-row.target-row.target-side-left .lineNumButton.left,
+ .diff-row.target-row.target-side-right .lineNumButton.right,
+ .diff-row.target-row.unified .lineNumButton {
+ background-color: var(--diff-selection-background-color);
+ color: var(--primary-text-color);
+ }
+ .content {
+ background-color: var(--diff-blank-background-color);
+ }
+ .contentText {
+ background-color: var(--view-background-color);
+ }
+ .blank {
+ background-color: var(--diff-blank-background-color);
+ }
+ .image-diff .content {
+ background-color: var(--diff-blank-background-color);
+ }
+ .full-width {
+ width: 100%;
+ }
+ .full-width .contentText {
+ white-space: pre-wrap;
+ word-wrap: break-word;
+ }
+ .lineNumButton,
+ .content {
+ vertical-align: top;
+ white-space: pre;
+ }
+ .contextLineNum,
+ .lineNumButton {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
- color: var(--deemphasized-text-color);
- padding: 0 var(--spacing-m);
- text-align: right;
- }
- .canComment .lineNumButton {
- cursor: pointer;
- }
- .content {
- /* Set min width since setting width on table cells still
+ color: var(--deemphasized-text-color);
+ padding: 0 var(--spacing-m);
+ text-align: right;
+ }
+ .canComment .lineNumButton {
+ cursor: pointer;
+ }
+ .content {
+ /* Set min width since setting width on table cells still
allows them to shrink. Do not set max width because
CJK (Chinese-Japanese-Korean) glyphs have variable width */
- min-width: var(--content-width, 80ch);
- width: var(--content-width, 80ch);
- }
- .content.add .contentText .intraline,
+ min-width: var(--content-width, 80ch);
+ width: var(--content-width, 80ch);
+ }
+ .content.add .contentText .intraline,
/* If there are no intraline info, consider everything changed */
.content.add.no-intraline-info .contentText,
.delta.total .content.add .contentText {
- background-color: var(--dark-add-highlight-color);
- }
- .content.add .contentText {
- background-color: var(--light-add-highlight-color);
- }
- .content.remove .contentText .intraline,
+ background-color: var(--dark-add-highlight-color);
+ }
+ .content.add .contentText {
+ background-color: var(--light-add-highlight-color);
+ }
+ .content.remove .contentText .intraline,
/* If there are no intraline info, consider everything changed */
.content.remove.no-intraline-info .contentText,
- .delta.total .content.remove .contentText {
- background-color: var(--dark-remove-highlight-color);
- }
- .content.remove .contentText {
- background-color: var(--light-remove-highlight-color);
- }
+ .delta.total .content.remove .contentText {
+ background-color: var(--dark-remove-highlight-color);
+ }
+ .content.remove .contentText {
+ background-color: var(--light-remove-highlight-color);
+ }
- /* dueToRebase */
- .dueToRebase .content.add .contentText .intraline,
- .delta.total.dueToRebase .content.add .contentText {
- background-color: var(--dark-rebased-add-highlight-color);
- }
- .dueToRebase .content.add .contentText {
- background-color: var(--light-rebased-add-highlight-color);
- }
- .dueToRebase .content.remove .contentText .intraline,
- .delta.total.dueToRebase .content.remove .contentText {
- background-color: var(--dark-rebased-remove-highlight-color);
- }
- .dueToRebase .content.remove .contentText {
- background-color: var(--light-remove-add-highlight-color);
- }
+ /* dueToRebase */
+ .dueToRebase .content.add .contentText .intraline,
+ .delta.total.dueToRebase .content.add .contentText {
+ background-color: var(--dark-rebased-add-highlight-color);
+ }
+ .dueToRebase .content.add .contentText {
+ background-color: var(--light-rebased-add-highlight-color);
+ }
+ .dueToRebase .content.remove .contentText .intraline,
+ .delta.total.dueToRebase .content.remove .contentText {
+ background-color: var(--dark-rebased-remove-highlight-color);
+ }
+ .dueToRebase .content.remove .contentText {
+ background-color: var(--light-remove-add-highlight-color);
+ }
- /* ignoredWhitespaceOnly */
- .ignoredWhitespaceOnly .content.add .contentText .intraline,
- .delta.total.ignoredWhitespaceOnly .content.add .contentText,
- .ignoredWhitespaceOnly .content.add .contentText,
- .ignoredWhitespaceOnly .content.remove .contentText .intraline,
- .delta.total.ignoredWhitespaceOnly .content.remove .contentText,
- .ignoredWhitespaceOnly .content.remove .contentText {
- background-color: var(--view-background-color);
- }
+ /* ignoredWhitespaceOnly */
+ .ignoredWhitespaceOnly .content.add .contentText .intraline,
+ .delta.total.ignoredWhitespaceOnly .content.add .contentText,
+ .ignoredWhitespaceOnly .content.add .contentText,
+ .ignoredWhitespaceOnly .content.remove .contentText .intraline,
+ .delta.total.ignoredWhitespaceOnly .content.remove .contentText,
+ .ignoredWhitespaceOnly .content.remove .contentText {
+ background-color: var(--view-background-color);
+ }
- .content .contentText:empty:after {
- /* Newline, to ensure empty lines are one line-height tall. */
- content: '\\A';
- }
- .contextControl {
- background-color: var(--diff-context-control-background-color);
- border: 1px solid var(--diff-context-control-border-color);
+ .content .contentText:empty:after {
+ /* Newline, to ensure empty lines are one line-height tall. */
+ content: '\\A';
+ }
+ .contextControl {
+ background-color: var(--diff-context-control-background-color);
+ border: 1px solid var(--diff-context-control-border-color);
+ color: var(--diff-context-control-color);
+ }
+ .contextControl gr-button {
+ display: inline-block;
+ text-decoration: none;
+ vertical-align: top;
+ line-height: var(--line-height-mono, 18px);
+ --gr-button: {
color: var(--diff-context-control-color);
+ padding: var(--spacing-xxs) var(--spacing-l);
}
- .contextControl gr-button {
- display: inline-block;
- text-decoration: none;
- vertical-align: top;
- line-height: var(--line-height-mono, 18px);
- --gr-button: {
- color: var(--diff-context-control-color);
- padding: var(--spacing-xxs) var(--spacing-l);
- }
- }
- .contextControl gr-button iron-icon {
- /* should match line-height of gr-button */
- width: var(--line-height-mono, 18px);
- height: var(--line-height-mono, 18px);
- }
- .contextControl td:not(.lineNumButton) {
- text-align: center;
- }
- .displayLine .diff-row.target-row td {
- box-shadow: inset 0 -1px var(--border-color);
- }
- .br:after {
- /* Line feed */
- content: '\\A';
- }
- .tab {
- display: inline-block;
- }
- .tab-indicator:before {
- color: var(--diff-tab-indicator-color);
- /* >> character */
- content: '\\00BB';
- position: absolute;
- }
- /* Is defined after other background-colors, such that this
+ }
+ .contextControl gr-button iron-icon {
+ /* should match line-height of gr-button */
+ width: var(--line-height-mono, 18px);
+ height: var(--line-height-mono, 18px);
+ }
+ .contextControl td:not(.lineNumButton) {
+ text-align: center;
+ }
+ .displayLine .diff-row.target-row td {
+ box-shadow: inset 0 -1px var(--border-color);
+ }
+ .br:after {
+ /* Line feed */
+ content: '\\A';
+ }
+ .tab {
+ display: inline-block;
+ }
+ .tab-indicator:before {
+ color: var(--diff-tab-indicator-color);
+ /* >> character */
+ content: '\\00BB';
+ position: absolute;
+ }
+ /* Is defined after other background-colors, such that this
rule wins in case of same specificity. */
- .trailing-whitespace,
- .content .trailing-whitespace,
- .trailing-whitespace .intraline,
- .content .trailing-whitespace .intraline {
- border-radius: var(--border-radius, 4px);
- background-color: var(--diff-trailing-whitespace-indicator);
- }
- #diffHeader {
- background-color: var(--table-header-background-color);
- border-bottom: 1px solid var(--border-color);
- color: var(--link-color);
- padding: var(--spacing-m) 0 var(--spacing-m) 48px;
- }
- #loadingError,
- #sizeWarning {
- display: none;
- margin: var(--spacing-l) auto;
- max-width: 60em;
- text-align: center;
- }
- #loadingError {
- color: var(--error-text-color);
- }
- #sizeWarning gr-button {
- margin: var(--spacing-l);
- }
- #loadingError.showError,
- #sizeWarning.warn {
- display: block;
- }
- .target-row td.blame {
- background: var(--diff-selection-background-color);
- }
- col.blame {
- display: none;
- }
- td.blame {
- display: none;
- padding: 0 var(--spacing-m);
- white-space: pre;
- }
- :host(.showBlame) col.blame {
- display: table-column;
- }
- :host(.showBlame) td.blame {
- display: table-cell;
- }
- td.blame > span {
- opacity: 0.6;
- }
- td.blame > span.startOfRange {
- opacity: 1;
- }
- td.blame .blameDate {
- font-family: var(--monospace-font-family);
- color: var(--link-color);
- text-decoration: none;
- }
- .full-width td.blame {
- overflow: hidden;
- width: 200px;
- }
- /** Support the line length indicator **/
- .full-width td.content .contentText {
- /* Base 64 encoded 1x1px of #ddd */
- background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO8+x8AAr8B3gzOjaQAAAAASUVORK5CYII=');
- background-position: var(--line-limit) 0;
- background-repeat: repeat-y;
- }
- .newlineWarning {
- color: var(--deemphasized-text-color);
- text-align: center;
- }
- .newlineWarning.hidden {
- display: none;
- }
- .lineNumButton.COVERED {
- background-color: var(--coverage-covered, #e0f2f1);
- }
- .lineNumButton.NOT_COVERED {
- background-color: var(--coverage-not-covered, #ffd1a4);
- }
- .lineNumButton.PARTIALLY_COVERED {
- background: linear-gradient(to right bottom, var(--coverage-not-covered, #ffd1a4) 0%,
- var(--coverage-not-covered, #ffd1a4) 50%,
- var(--coverage-covered, #e0f2f1) 50%,
- var(--coverage-covered, #e0f2f1) 100%);
- }
+ .trailing-whitespace,
+ .content .trailing-whitespace,
+ .trailing-whitespace .intraline,
+ .content .trailing-whitespace .intraline {
+ border-radius: var(--border-radius, 4px);
+ background-color: var(--diff-trailing-whitespace-indicator);
+ }
+ #diffHeader {
+ background-color: var(--table-header-background-color);
+ border-bottom: 1px solid var(--border-color);
+ color: var(--link-color);
+ padding: var(--spacing-m) 0 var(--spacing-m) 48px;
+ }
+ #loadingError,
+ #sizeWarning {
+ display: none;
+ margin: var(--spacing-l) auto;
+ max-width: 60em;
+ text-align: center;
+ }
+ #loadingError {
+ color: var(--error-text-color);
+ }
+ #sizeWarning gr-button {
+ margin: var(--spacing-l);
+ }
+ #loadingError.showError,
+ #sizeWarning.warn {
+ display: block;
+ }
+ .target-row td.blame {
+ background: var(--diff-selection-background-color);
+ }
+ col.blame {
+ display: none;
+ }
+ td.blame {
+ display: none;
+ padding: 0 var(--spacing-m);
+ white-space: pre;
+ }
+ :host(.showBlame) col.blame {
+ display: table-column;
+ }
+ :host(.showBlame) td.blame {
+ display: table-cell;
+ }
+ td.blame > span {
+ opacity: 0.6;
+ }
+ td.blame > span.startOfRange {
+ opacity: 1;
+ }
+ td.blame .blameDate {
+ font-family: var(--monospace-font-family);
+ color: var(--link-color);
+ text-decoration: none;
+ }
+ .full-width td.blame {
+ overflow: hidden;
+ width: 200px;
+ }
+ /** Support the line length indicator **/
+ .full-width td.content .contentText {
+ /* Base 64 encoded 1x1px of #ddd */
+ background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mO8+x8AAr8B3gzOjaQAAAAASUVORK5CYII=');
+ background-position: var(--line-limit) 0;
+ background-repeat: repeat-y;
+ }
+ .newlineWarning {
+ color: var(--deemphasized-text-color);
+ text-align: center;
+ }
+ .newlineWarning.hidden {
+ display: none;
+ }
+ .lineNumButton.COVERED {
+ background-color: var(--coverage-covered, #e0f2f1);
+ }
+ .lineNumButton.NOT_COVERED {
+ background-color: var(--coverage-not-covered, #ffd1a4);
+ }
+ .lineNumButton.PARTIALLY_COVERED {
+ background: linear-gradient(
+ to right bottom,
+ var(--coverage-not-covered, #ffd1a4) 0%,
+ var(--coverage-not-covered, #ffd1a4) 50%,
+ var(--coverage-covered, #e0f2f1) 50%,
+ var(--coverage-covered, #e0f2f1) 100%
+ );
+ }
- /** BEGIN: Select and copy for Polymer 2 */
- /** Below was copied and modified from the original css in gr-diff-selection.html */
- .content,
- .contextControl,
- .blame {
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- }
+ /** BEGIN: Select and copy for Polymer 2 */
+ /** Below was copied and modified from the original css in gr-diff-selection.html */
+ .content,
+ .contextControl,
+ .blame {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ }
- .selected-left:not(.selected-comment) .side-by-side .left + .content .contentText,
- .selected-right:not(.selected-comment) .side-by-side .right + .content .contentText,
- .selected-left:not(.selected-comment) .unified .left.lineNumButton ~ .content:not(.both) .contentText,
- .selected-right:not(.selected-comment) .unified .right.lineNumButton ~ .content .contentText,
- .selected-left.selected-comment .side-by-side .left + .content .message,
- .selected-right.selected-comment .side-by-side .right + .content .message :not(.collapsedContent),
- .selected-comment .unified .message :not(.collapsedContent),
- .selected-blame .blame {
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- user-select: text;
- }
+ .selected-left:not(.selected-comment)
+ .side-by-side
+ .left
+ + .content
+ .contentText,
+ .selected-right:not(.selected-comment)
+ .side-by-side
+ .right
+ + .content
+ .contentText,
+ .selected-left:not(.selected-comment)
+ .unified
+ .left.lineNumButton
+ ~ .content:not(.both)
+ .contentText,
+ .selected-right:not(.selected-comment)
+ .unified
+ .right.lineNumButton
+ ~ .content
+ .contentText,
+ .selected-left.selected-comment .side-by-side .left + .content .message,
+ .selected-right.selected-comment
+ .side-by-side
+ .right
+ + .content
+ .message
+ :not(.collapsedContent),
+ .selected-comment .unified .message :not(.collapsedContent),
+ .selected-blame .blame {
+ -webkit-user-select: text;
+ -moz-user-select: text;
+ -ms-user-select: text;
+ user-select: text;
+ }
- /** Make comments selectable when selected */
- .selected-left.selected-comment ::slotted(gr-comment-thread[comment-side=left]),
- .selected-right.selected-comment ::slotted(gr-comment-thread[comment-side=right]) {
- -webkit-user-select: text;
- -moz-user-select: text;
- -ms-user-select: text;
- user-select: text;
- }
- /** END: Select and copy for Polymer 2 */
+ /** Make comments selectable when selected */
+ .selected-left.selected-comment
+ ::slotted(gr-comment-thread[comment-side='left']),
+ .selected-right.selected-comment
+ ::slotted(gr-comment-thread[comment-side='right']) {
+ -webkit-user-select: text;
+ -moz-user-select: text;
+ -ms-user-select: text;
+ user-select: text;
+ }
+ /** END: Select and copy for Polymer 2 */
- .whitespace-change-only-message {
- background-color: var(--diff-context-control-background-color);
- border: 1px solid var(--diff-context-control-border-color);
- text-align: center;
- }
- </style>
- <style include="gr-syntax-theme">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-ranged-comment-theme">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <div id="diffHeader" hidden\$="[[_computeDiffHeaderHidden(_diffHeaderItems)]]">
- <template is="dom-repeat" items="[[_diffHeaderItems]]">
- <div>[[item]]</div>
- </template>
- </div>
- <div class\$="[[_computeContainerClass(loggedIn, viewMode, displayLine)]]" on-tap="_handleTap">
- <gr-diff-selection diff="[[diff]]">
- <gr-diff-highlight id="highlights" logged-in="[[loggedIn]]" comment-ranges="{{_commentRanges}}">
- <gr-diff-builder id="diffBuilder" comment-ranges="[[_commentRanges]]" coverage-ranges="[[coverageRanges]]" project-name="[[projectName]]" diff="[[diff]]" path="[[path]]" change-num="[[changeNum]]" patch-num="[[patchRange.patchNum]]" view-mode="[[viewMode]]" is-image-diff="[[isImageDiff]]" base-image="[[baseImage]]" layers="[[layers]]" revision-image="[[revisionImage]]">
- <table id="diffTable" class\$="[[_diffTableClass]]" role="presentation"></table>
+ .whitespace-change-only-message {
+ background-color: var(--diff-context-control-background-color);
+ border: 1px solid var(--diff-context-control-border-color);
+ text-align: center;
+ }
+ </style>
+ <style include="gr-syntax-theme">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-ranged-comment-theme">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <div id="diffHeader" hidden$="[[_computeDiffHeaderHidden(_diffHeaderItems)]]">
+ <template is="dom-repeat" items="[[_diffHeaderItems]]">
+ <div>[[item]]</div>
+ </template>
+ </div>
+ <div
+ class$="[[_computeContainerClass(loggedIn, viewMode, displayLine)]]"
+ on-tap="_handleTap"
+ >
+ <gr-diff-selection diff="[[diff]]">
+ <gr-diff-highlight
+ id="highlights"
+ logged-in="[[loggedIn]]"
+ comment-ranges="{{_commentRanges}}"
+ >
+ <gr-diff-builder
+ id="diffBuilder"
+ comment-ranges="[[_commentRanges]]"
+ coverage-ranges="[[coverageRanges]]"
+ project-name="[[projectName]]"
+ diff="[[diff]]"
+ path="[[path]]"
+ change-num="[[changeNum]]"
+ patch-num="[[patchRange.patchNum]]"
+ view-mode="[[viewMode]]"
+ is-image-diff="[[isImageDiff]]"
+ base-image="[[baseImage]]"
+ layers="[[layers]]"
+ revision-image="[[revisionImage]]"
+ >
+ <table
+ id="diffTable"
+ class$="[[_diffTableClass]]"
+ role="presentation"
+ ></table>
- <template is="dom-if" if="[[showNoChangeMessage(loading, prefs, _diffLength)]]">
- <div class="whitespace-change-only-message">
- This file only contains whitespace changes.
- Modify the whitespace setting to see the changes.
- </div>
- </template>
- </gr-diff-builder>
- </gr-diff-highlight>
- </gr-diff-selection>
- </div>
- <div class\$="[[_computeNewlineWarningClass(_newlineWarning, loading)]]">
- [[_newlineWarning]]
- </div>
- <div id="loadingError" class\$="[[_computeErrorClass(errorMessage)]]">
- [[errorMessage]]
- </div>
- <div id="sizeWarning" class\$="[[_computeWarningClass(_showWarning)]]">
- <p>
- Prevented render because "Whole file" is enabled and this diff is very
- large (about [[_diffLength]] lines).
- </p>
- <gr-button on-click="_handleLimitedBypass">
- Render with limited context
- </gr-button>
- <gr-button on-click="_handleFullBypass">
- Render anyway (may be slow)
- </gr-button>
- </div>
+ <template
+ is="dom-if"
+ if="[[showNoChangeMessage(loading, prefs, _diffLength)]]"
+ >
+ <div class="whitespace-change-only-message">
+ This file only contains whitespace changes. Modify the whitespace
+ setting to see the changes.
+ </div>
+ </template>
+ </gr-diff-builder>
+ </gr-diff-highlight>
+ </gr-diff-selection>
+ </div>
+ <div class$="[[_computeNewlineWarningClass(_newlineWarning, loading)]]">
+ [[_newlineWarning]]
+ </div>
+ <div id="loadingError" class$="[[_computeErrorClass(errorMessage)]]">
+ [[errorMessage]]
+ </div>
+ <div id="sizeWarning" class$="[[_computeWarningClass(_showWarning)]]">
+ <p>
+ Prevented render because "Whole file" is enabled and this diff is very
+ large (about [[_diffLength]] lines).
+ </p>
+ <gr-button on-click="_handleLimitedBypass">
+ Render with limited context
+ </gr-button>
+ <gr-button on-click="_handleFullBypass">
+ Render anyway (may be slow)
+ </gr-button>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_html.js b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_html.js
index 5779a90..1d4b440 100644
--- a/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-patch-range-select/gr-patch-range-select_html.js
@@ -17,57 +17,69 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- align-items: center;
- display: flex;
- }
- select {
- max-width: 15em;
- }
- .arrow {
+ <style include="shared-styles">
+ :host {
+ align-items: center;
+ display: flex;
+ }
+ select {
+ max-width: 15em;
+ }
+ .arrow {
+ color: var(--deemphasized-text-color);
+ margin: 0 var(--spacing-m);
+ }
+ gr-dropdown-list {
+ --trigger-style: {
color: var(--deemphasized-text-color);
- margin: 0 var(--spacing-m);
+ text-transform: none;
+ font-family: var(--font-family);
+ }
+ --trigger-hover-color: rgba(0, 0, 0, 0.6);
+ }
+ @media screen and (max-width: 50em) {
+ .filesWeblinks {
+ display: none;
}
gr-dropdown-list {
- --trigger-style: {
- color: var(--deemphasized-text-color);
- text-transform: none;
- font-family: var(--font-family);
+ --native-select-style: {
+ max-width: 5.25em;
}
- --trigger-hover-color: rgba(0,0,0,.6);
- }
- @media screen and (max-width: 50em) {
- .filesWeblinks {
- display: none;
- }
- gr-dropdown-list {
- --native-select-style: {
- max-width: 5.25em;
- }
- --dropdown-content-stype: {
- max-width: 300px;
- }
+ --dropdown-content-stype: {
+ max-width: 300px;
}
}
- </style>
- <span class="patchRange">
- <gr-dropdown-list id="basePatchDropdown" value="[[basePatchNum]]" on-value-change="_handlePatchChange" items="[[_baseDropdownContent]]">
- </gr-dropdown-list>
- </span>
- <span is="dom-if" if="[[filesWeblinks.meta_a]]" class="filesWeblinks">
- <template is="dom-repeat" items="[[filesWeblinks.meta_a]]" as="weblink">
- <a target="_blank" rel="noopener" href\$="[[weblink.url]]">[[weblink.name]]</a>
+ }
+ </style>
+ <span class="patchRange">
+ <gr-dropdown-list
+ id="basePatchDropdown"
+ value="[[basePatchNum]]"
+ on-value-change="_handlePatchChange"
+ items="[[_baseDropdownContent]]"
+ >
+ </gr-dropdown-list>
+ </span>
+ <span is="dom-if" if="[[filesWeblinks.meta_a]]" class="filesWeblinks">
+ <template is="dom-repeat" items="[[filesWeblinks.meta_a]]" as="weblink">
+ <a target="_blank" rel="noopener" href$="[[weblink.url]]"
+ >[[weblink.name]]</a
+ >
+ </template>
+ </span>
+ <span class="arrow">→</span>
+ <span class="patchRange">
+ <gr-dropdown-list
+ id="patchNumDropdown"
+ value="[[patchNum]]"
+ on-value-change="_handlePatchChange"
+ items="[[_patchDropdownContent]]"
+ >
+ </gr-dropdown-list>
+ <span is="dom-if" if="[[filesWeblinks.meta_b]]" class="filesWeblinks">
+ <template is="dom-repeat" items="[[filesWeblinks.meta_b]]" as="weblink">
+ <a target="_blank" href$="[[weblink.url]]">[[weblink.name]]</a>
</template>
</span>
- <span class="arrow">→</span>
- <span class="patchRange">
- <gr-dropdown-list id="patchNumDropdown" value="[[patchNum]]" on-value-change="_handlePatchChange" items="[[_patchDropdownContent]]">
- </gr-dropdown-list>
- <span is="dom-if" if="[[filesWeblinks.meta_b]]" class="filesWeblinks">
- <template is="dom-repeat" items="[[filesWeblinks.meta_b]]" as="weblink">
- <a target="_blank" href\$="[[weblink.url]]">[[weblink.name]]</a>
- </template>
- </span>
- </span>
+ </span>
`;
diff --git a/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer_html.js b/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer_html.js
index 29757e5..3ed33d1 100644
--- a/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-ranged-comment-layer/gr-ranged-comment-layer_html.js
@@ -16,6 +16,4 @@
*/
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
-export const htmlTemplate = html`
-
-`;
+export const htmlTemplate = html``;
diff --git a/polygerrit-ui/app/elements/diff/gr-selection-action-box/gr-selection-action-box_html.js b/polygerrit-ui/app/elements/diff/gr-selection-action-box/gr-selection-action-box_html.js
index 670a755..e7795b9 100644
--- a/polygerrit-ui/app/elements/diff/gr-selection-action-box/gr-selection-action-box_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-selection-action-box/gr-selection-action-box_html.js
@@ -17,13 +17,17 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- cursor: pointer;
- font-family: var(--font-family);
- position: absolute;
- white-space: nowrap;
- }
- </style>
- <gr-tooltip id="tooltip" text="Press c to comment" position-below="[[positionBelow]]"></gr-tooltip>
+ <style include="shared-styles">
+ :host {
+ cursor: pointer;
+ font-family: var(--font-family);
+ position: absolute;
+ white-space: nowrap;
+ }
+ </style>
+ <gr-tooltip
+ id="tooltip"
+ text="Press c to comment"
+ position-below="[[positionBelow]]"
+ ></gr-tooltip>
`;
diff --git a/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer_html.js b/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer_html.js
index 183cbd1c..433f814 100644
--- a/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer_html.js
+++ b/polygerrit-ui/app/elements/diff/gr-syntax-layer/gr-syntax-layer_html.js
@@ -17,5 +17,5 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <gr-lib-loader id="libLoader"></gr-lib-loader>
+ <gr-lib-loader id="libLoader"></gr-lib-loader>
`;
diff --git a/polygerrit-ui/app/elements/documentation/gr-documentation-search/gr-documentation-search_html.js b/polygerrit-ui/app/elements/documentation/gr-documentation-search/gr-documentation-search_html.js
index ced351a..b637b75 100644
--- a/polygerrit-ui/app/elements/documentation/gr-documentation-search/gr-documentation-search_html.js
+++ b/polygerrit-ui/app/elements/documentation/gr-documentation-search/gr-documentation-search_html.js
@@ -17,34 +17,42 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-table-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <gr-list-view filter="[[_filter]]" items="false" offset="0" loading="[[_loading]]" path="[[_path]]">
- <table id="list" class="genericList">
- <tbody><tr class="headerRow">
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-table-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <gr-list-view
+ filter="[[_filter]]"
+ items="false"
+ offset="0"
+ loading="[[_loading]]"
+ path="[[_path]]"
+ >
+ <table id="list" class="genericList">
+ <tbody>
+ <tr class="headerRow">
<th class="name topHeader">Name</th>
<th class="name topHeader"></th>
<th class="name topHeader"></th>
</tr>
- <tr id="loading" class\$="loadingMsg [[computeLoadingClass(_loading)]]">
+ <tr id="loading" class$="loadingMsg [[computeLoadingClass(_loading)]]">
<td>Loading...</td>
</tr>
- </tbody><tbody class\$="[[computeLoadingClass(_loading)]]">
- <template is="dom-repeat" items="[[_documentationSearches]]">
- <tr class="table">
- <td class="name">
- <a href\$="[[_computeSearchUrl(item.url)]]">[[item.title]]</a>
- </td>
- <td></td>
- <td></td>
- </tr>
- </template>
- </tbody>
- </table>
- </gr-list-view>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </tbody>
+ <tbody class$="[[computeLoadingClass(_loading)]]">
+ <template is="dom-repeat" items="[[_documentationSearches]]">
+ <tr class="table">
+ <td class="name">
+ <a href$="[[_computeSearchUrl(item.url)]]">[[item.title]]</a>
+ </td>
+ <td></td>
+ <td></td>
+ </tr>
+ </template>
+ </tbody>
+ </table>
+ </gr-list-view>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/edit/gr-default-editor/gr-default-editor_html.js b/polygerrit-ui/app/elements/edit/gr-default-editor/gr-default-editor_html.js
index e7fc6fd..7368289 100644
--- a/polygerrit-ui/app/elements/edit/gr-default-editor/gr-default-editor_html.js
+++ b/polygerrit-ui/app/elements/edit/gr-default-editor/gr-default-editor_html.js
@@ -17,21 +17,25 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- textarea {
- border: none;
- box-sizing: border-box;
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-code);
- line-height: var(--line-height-code);
- min-height: 60vh;
- resize: none;
- white-space: pre;
- width: 100%;
- }
- textarea:focus {
- outline: none;
- }
- </style>
- <textarea id="textarea" value="[[fileContent]]" on-input="_handleTextareaInput"></textarea>
+ <style include="shared-styles">
+ textarea {
+ border: none;
+ box-sizing: border-box;
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-code);
+ line-height: var(--line-height-code);
+ min-height: 60vh;
+ resize: none;
+ white-space: pre;
+ width: 100%;
+ }
+ textarea:focus {
+ outline: none;
+ }
+ </style>
+ <textarea
+ id="textarea"
+ value="[[fileContent]]"
+ on-input="_handleTextareaInput"
+ ></textarea>
`;
diff --git a/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls_html.js b/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls_html.js
index f753b9d..02639c0 100644
--- a/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls_html.js
+++ b/polygerrit-ui/app/elements/edit/gr-edit-controls/gr-edit-controls_html.js
@@ -17,103 +17,167 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- align-items: center;
- display: flex;
- justify-content: flex-end;
- }
- .invisible {
- display: none;
- }
- gr-button {
- margin-left: var(--spacing-l);
- text-decoration: none;
- }
+ <style include="shared-styles">
+ :host {
+ align-items: center;
+ display: flex;
+ justify-content: flex-end;
+ }
+ .invisible {
+ display: none;
+ }
+ gr-button {
+ margin-left: var(--spacing-l);
+ text-decoration: none;
+ }
+ gr-dialog {
+ width: 50em;
+ }
+ gr-dialog .main {
+ width: 100%;
+ }
+ gr-dialog .main > iron-input {
+ width: 100%;
+ }
+ input {
+ border: 1px solid var(--border-color);
+ border-radius: var(--border-radius);
+ margin: var(--spacing-m) 0;
+ padding: var(--spacing-s);
+ width: 100%;
+ box-sizing: content-box;
+ }
+ #fileUploadBrowse {
+ margin-left: 0;
+ }
+ #dragDropArea {
+ border: 2px dashed var(--border-color);
+ border-radius: var(--border-radius);
+ margin-top: var(--spacing-l);
+ padding: var(--spacing-xxl) var(--spacing-xxl);
+ text-align: center;
+ }
+ #dragDropArea > p {
+ font-weight: var(--font-weight-bold);
+ padding: var(--spacing-s);
+ }
+ @media screen and (max-width: 50em) {
gr-dialog {
- width: 50em;
+ width: 100vw;
}
- gr-dialog .main {
- width: 100%;
- }
- gr-dialog .main > iron-input{
- width: 100%;
- }
- input {
- border: 1px solid var(--border-color);
- border-radius: var(--border-radius);
- margin: var(--spacing-m) 0;
- padding: var(--spacing-s);
- width: 100%;
- box-sizing: content-box;
- }
- #fileUploadBrowse {
- margin-left: 0;
- }
- #dragDropArea {
- border: 2px dashed var(--border-color);
- border-radius: var(--border-radius);
- margin-top: var(--spacing-l);
- padding: var(--spacing-xxl) var(--spacing-xxl);
- text-align: center;
- }
- #dragDropArea > p {
- font-weight: var(--font-weight-bold);
- padding: var(--spacing-s);
- }
- @media screen and (max-width: 50em) {
- gr-dialog {
- width: 100vw;
- }
- }
- </style>
- <template is="dom-repeat" items="[[_actions]]" as="action">
- <gr-button id\$="[[action.id]]" class\$="[[_computeIsInvisible(action.id, hiddenActions)]]" link="" on-click="_handleTap">[[action.label]]</gr-button>
- </template>
- <gr-overlay id="overlay" with-backdrop="">
- <gr-dialog id="openDialog" class="invisible dialog" disabled\$="[[!_isValidPath(_path)]]" confirm-label="Confirm" confirm-on-enter="" on-confirm="_handleOpenConfirm" on-cancel="_handleDialogCancel">
- <div class="header" slot="header">
- Add a new file or open an existing file
+ }
+ </style>
+ <template is="dom-repeat" items="[[_actions]]" as="action">
+ <gr-button
+ id$="[[action.id]]"
+ class$="[[_computeIsInvisible(action.id, hiddenActions)]]"
+ link=""
+ on-click="_handleTap"
+ >[[action.label]]</gr-button
+ >
+ </template>
+ <gr-overlay id="overlay" with-backdrop="">
+ <gr-dialog
+ id="openDialog"
+ class="invisible dialog"
+ disabled$="[[!_isValidPath(_path)]]"
+ confirm-label="Confirm"
+ confirm-on-enter=""
+ on-confirm="_handleOpenConfirm"
+ on-cancel="_handleDialogCancel"
+ >
+ <div class="header" slot="header">
+ Add a new file or open an existing file
+ </div>
+ <div class="main" slot="main">
+ <gr-autocomplete
+ placeholder="Enter an existing or new full file path."
+ query="[[_query]]"
+ text="{{_path}}"
+ ></gr-autocomplete>
+ <div id="dragDropArea" on-drop="_handleDragAndDropUpload">
+ <p>Drag and drop a file here</p>
+ <p>or</p>
+ <p>
+ <iron-input>
+ <input
+ is="iron-input"
+ id="fileUploadInput"
+ type="file"
+ on-change="_handleFileUploadChanged"
+ hidden
+ />
+ </iron-input>
+ <label for="fileUploadInput">
+ <gr-button id="fileUploadBrowse">Browse</gr-button>
+ </label>
+ </p>
</div>
- <div class="main" slot="main">
- <gr-autocomplete placeholder="Enter an existing or new full file path." query="[[_query]]" text="{{_path}}"></gr-autocomplete>
- <div id="dragDropArea" on-drop="_handleDragAndDropUpload">
- <p>Drag and drop a file here</p>
- <p>or</p>
- <p>
- <iron-input>
- <input is="iron-input" id="fileUploadInput" type="file" on-change="_handleFileUploadChanged" hidden>
- </iron-input>
- <label for="fileUploadInput">
- <gr-button id="fileUploadBrowse">Browse</gr-button>
- </label>
- </p>
- </div>
- </div>
- </gr-dialog>
- <gr-dialog id="deleteDialog" class="invisible dialog" disabled\$="[[!_isValidPath(_path)]]" confirm-label="Delete" confirm-on-enter="" on-confirm="_handleDeleteConfirm" on-cancel="_handleDialogCancel">
- <div class="header" slot="header">Delete a file from the repo</div>
- <div class="main" slot="main">
- <gr-autocomplete placeholder="Enter an existing full file path." query="[[_query]]" text="{{_path}}"></gr-autocomplete>
- </div>
- </gr-dialog>
- <gr-dialog id="renameDialog" class="invisible dialog" disabled\$="[[!_computeRenameDisabled(_path, _newPath)]]" confirm-label="Rename" confirm-on-enter="" on-confirm="_handleRenameConfirm" on-cancel="_handleDialogCancel">
- <div class="header" slot="header">Rename a file in the repo</div>
- <div class="main" slot="main">
- <gr-autocomplete placeholder="Enter an existing full file path." query="[[_query]]" text="{{_path}}"></gr-autocomplete>
- <iron-input class="newPathIronInput" bind-value="{{_newPath}}" placeholder="Enter the new path.">
- <input class="newPathInput" is="iron-input" bind-value="{{_newPath}}" placeholder="Enter the new path.">
- </iron-input>
- </div>
- </gr-dialog>
- <gr-dialog id="restoreDialog" class="invisible dialog" confirm-label="Restore" confirm-on-enter="" on-confirm="_handleRestoreConfirm" on-cancel="_handleDialogCancel">
- <div class="header" slot="header">Restore this file?</div>
- <div class="main" slot="main">
- <iron-input disabled="" bind-value="{{_path}}">
- <input is="iron-input" disabled="" bind-value="{{_path}}">
- </iron-input>
- </div>
- </gr-dialog>
- </gr-overlay>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </div>
+ </gr-dialog>
+ <gr-dialog
+ id="deleteDialog"
+ class="invisible dialog"
+ disabled$="[[!_isValidPath(_path)]]"
+ confirm-label="Delete"
+ confirm-on-enter=""
+ on-confirm="_handleDeleteConfirm"
+ on-cancel="_handleDialogCancel"
+ >
+ <div class="header" slot="header">Delete a file from the repo</div>
+ <div class="main" slot="main">
+ <gr-autocomplete
+ placeholder="Enter an existing full file path."
+ query="[[_query]]"
+ text="{{_path}}"
+ ></gr-autocomplete>
+ </div>
+ </gr-dialog>
+ <gr-dialog
+ id="renameDialog"
+ class="invisible dialog"
+ disabled$="[[!_computeRenameDisabled(_path, _newPath)]]"
+ confirm-label="Rename"
+ confirm-on-enter=""
+ on-confirm="_handleRenameConfirm"
+ on-cancel="_handleDialogCancel"
+ >
+ <div class="header" slot="header">Rename a file in the repo</div>
+ <div class="main" slot="main">
+ <gr-autocomplete
+ placeholder="Enter an existing full file path."
+ query="[[_query]]"
+ text="{{_path}}"
+ ></gr-autocomplete>
+ <iron-input
+ class="newPathIronInput"
+ bind-value="{{_newPath}}"
+ placeholder="Enter the new path."
+ >
+ <input
+ class="newPathInput"
+ is="iron-input"
+ bind-value="{{_newPath}}"
+ placeholder="Enter the new path."
+ />
+ </iron-input>
+ </div>
+ </gr-dialog>
+ <gr-dialog
+ id="restoreDialog"
+ class="invisible dialog"
+ confirm-label="Restore"
+ confirm-on-enter=""
+ on-confirm="_handleRestoreConfirm"
+ on-cancel="_handleDialogCancel"
+ >
+ <div class="header" slot="header">Restore this file?</div>
+ <div class="main" slot="main">
+ <iron-input disabled="" bind-value="{{_path}}">
+ <input is="iron-input" disabled="" bind-value="{{_path}}" />
+ </iron-input>
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/edit/gr-edit-file-controls/gr-edit-file-controls_html.js b/polygerrit-ui/app/elements/edit/gr-edit-file-controls/gr-edit-file-controls_html.js
index 7a7ba5d..ec0b8b4 100644
--- a/polygerrit-ui/app/elements/edit/gr-edit-file-controls/gr-edit-file-controls_html.js
+++ b/polygerrit-ui/app/elements/edit/gr-edit-file-controls/gr-edit-file-controls_html.js
@@ -17,29 +17,37 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- align-items: center;
- display: flex;
- justify-content: flex-end;
+ <style include="shared-styles">
+ :host {
+ align-items: center;
+ display: flex;
+ justify-content: flex-end;
+ }
+ #actions {
+ margin-right: var(--spacing-l);
+ }
+ gr-button,
+ gr-dropdown {
+ --gr-button: {
+ height: 1.8em;
}
- #actions {
- margin-right: var(--spacing-l);
+ }
+ gr-dropdown {
+ --gr-dropdown-item: {
+ background-color: transparent;
+ border: none;
+ color: var(--link-color);
+ text-transform: uppercase;
}
- gr-button,
- gr-dropdown {
- --gr-button: {
- height: 1.8em;
- }
- }
- gr-dropdown {
- --gr-dropdown-item: {
- background-color: transparent;
- border: none;
- color: var(--link-color);
- text-transform: uppercase;
- }
- }
- </style>
- <gr-dropdown id="actions" items="[[_fileActions]]" down-arrow="" vertical-offset="20" on-tap-item="_handleActionTap" link="">Actions</gr-dropdown>
+ }
+ </style>
+ <gr-dropdown
+ id="actions"
+ items="[[_fileActions]]"
+ down-arrow=""
+ vertical-offset="20"
+ on-tap-item="_handleActionTap"
+ link=""
+ >Actions</gr-dropdown
+ >
`;
diff --git a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view_html.js b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view_html.js
index 72d29dd..9dc35b2 100644
--- a/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view_html.js
+++ b/polygerrit-ui/app/elements/edit/gr-editor-view/gr-editor-view_html.js
@@ -17,87 +17,110 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- background-color: var(--view-background-color);
+ <style include="shared-styles">
+ :host {
+ background-color: var(--view-background-color);
+ }
+ gr-fixed-panel {
+ background-color: var(--edit-mode-background-color);
+ border-bottom: 1px var(--border-color) solid;
+ z-index: 1;
+ }
+ header,
+ .subHeader {
+ align-items: center;
+ display: flex;
+ justify-content: space-between;
+ padding: var(--spacing-m) var(--spacing-l);
+ }
+ header gr-editable-label {
+ font-family: var(--header-font-family);
+ font-size: var(--font-size-h3);
+ font-weight: var(--font-weight-h3);
+ line-height: var(--line-height-h3);
+ --label-style: {
+ text-overflow: initial;
+ white-space: initial;
+ word-break: break-all;
}
- gr-fixed-panel {
- background-color: var(--edit-mode-background-color);
- border-bottom: 1px var(--border-color) solid;
- z-index: 1;
+ --input-style: {
+ margin-top: var(--spacing-l);
}
+ }
+ .textareaWrapper {
+ border: 1px solid var(--border-color);
+ border-radius: var(--border-radius);
+ margin: var(--spacing-l);
+ }
+ .textareaWrapper .editButtons {
+ display: none;
+ }
+ .controlGroup {
+ align-items: center;
+ display: flex;
+ font-family: var(--header-font-family);
+ font-size: var(--font-size-h3);
+ font-weight: var(--font-weight-h3);
+ line-height: var(--line-height-h3);
+ }
+ .rightControls {
+ justify-content: flex-end;
+ }
+ @media screen and (max-width: 50em) {
header,
.subHeader {
- align-items: center;
- display: flex;
- justify-content: space-between;
- padding: var(--spacing-m) var(--spacing-l);
- }
- header gr-editable-label {
- font-family: var(--header-font-family);
- font-size: var(--font-size-h3);
- font-weight: var(--font-weight-h3);
- line-height: var(--line-height-h3);
- --label-style: {
- text-overflow: initial;
- white-space: initial;
- word-break: break-all;
- }
- --input-style: {
- margin-top: var(--spacing-l);
- }
- }
- .textareaWrapper {
- border: 1px solid var(--border-color);
- border-radius: var(--border-radius);
- margin: var(--spacing-l);
- }
- .textareaWrapper .editButtons {
- display: none;
- }
- .controlGroup {
- align-items: center;
- display: flex;
- font-family: var(--header-font-family);
- font-size: var(--font-size-h3);
- font-weight: var(--font-weight-h3);
- line-height: var(--line-height-h3);
+ display: block;
}
.rightControls {
- justify-content: flex-end;
+ float: right;
}
- @media screen and (max-width: 50em) {
- header,
- .subHeader {
- display: block;
- }
- .rightControls {
- float: right;
- }
- }
- </style>
- <gr-fixed-panel keep-on-scroll="">
- <header>
- <span class="controlGroup">
- <span>Edit mode</span>
- <span class="separator"></span>
- <gr-editable-label label-text="File path" value="[[_path]]" placeholder="File path..." on-changed="_handlePathChanged"></gr-editable-label>
- </span>
- <span class="controlGroup rightControls">
- <gr-button id="close" link="" on-click="_handleCloseTap">Close</gr-button>
- <gr-button id="save" disabled\$="[[_saveDisabled]]" primary="" link="" on-click="_saveEdit">Save</gr-button>
- </span>
- </header>
- </gr-fixed-panel>
- <div class="textareaWrapper">
- <gr-endpoint-decorator id="editorEndpoint" name="editor">
- <gr-endpoint-param name="fileContent" value="[[_newContent]]"></gr-endpoint-param>
- <gr-endpoint-param name="prefs" value="[[_prefs]]"></gr-endpoint-param>
- <gr-endpoint-param name="fileType" value="[[_type]]"></gr-endpoint-param>
- <gr-endpoint-param name="lineNum" value="[[_lineNum]]"></gr-endpoint-param>
- <gr-default-editor id="file" file-content="[[_newContent]]"></gr-default-editor>
- </gr-endpoint-decorator>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
- <gr-storage id="storage"></gr-storage>
+ }
+ </style>
+ <gr-fixed-panel keep-on-scroll="">
+ <header>
+ <span class="controlGroup">
+ <span>Edit mode</span>
+ <span class="separator"></span>
+ <gr-editable-label
+ label-text="File path"
+ value="[[_path]]"
+ placeholder="File path..."
+ on-changed="_handlePathChanged"
+ ></gr-editable-label>
+ </span>
+ <span class="controlGroup rightControls">
+ <gr-button id="close" link="" on-click="_handleCloseTap"
+ >Close</gr-button
+ >
+ <gr-button
+ id="save"
+ disabled$="[[_saveDisabled]]"
+ primary=""
+ link=""
+ on-click="_saveEdit"
+ >Save</gr-button
+ >
+ </span>
+ </header>
+ </gr-fixed-panel>
+ <div class="textareaWrapper">
+ <gr-endpoint-decorator id="editorEndpoint" name="editor">
+ <gr-endpoint-param
+ name="fileContent"
+ value="[[_newContent]]"
+ ></gr-endpoint-param>
+ <gr-endpoint-param name="prefs" value="[[_prefs]]"></gr-endpoint-param>
+ <gr-endpoint-param name="fileType" value="[[_type]]"></gr-endpoint-param>
+ <gr-endpoint-param
+ name="lineNum"
+ value="[[_lineNum]]"
+ ></gr-endpoint-param>
+ <gr-default-editor
+ id="file"
+ file-content="[[_newContent]]"
+ ></gr-default-editor>
+ </gr-endpoint-decorator>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-storage id="storage"></gr-storage>
`;
diff --git a/polygerrit-ui/app/elements/gr-app-element_html.js b/polygerrit-ui/app/elements/gr-app-element_html.js
index 3951d9d..2ee48c1 100644
--- a/polygerrit-ui/app/elements/gr-app-element_html.js
+++ b/polygerrit-ui/app/elements/gr-app-element_html.js
@@ -17,158 +17,218 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- background-color: var(--background-color-tertiary);
- display: flex;
- flex-direction: column;
- min-height: 100%;
- }
- gr-fixed-panel {
- /**
+ <style include="shared-styles">
+ :host {
+ background-color: var(--background-color-tertiary);
+ display: flex;
+ flex-direction: column;
+ min-height: 100%;
+ }
+ gr-fixed-panel {
+ /**
* This one should be greater that the z-index in gr-diff-view
* because gr-main-header contains overlay.
*/
- z-index: 10;
- }
- gr-main-header,
- footer {
- color: var(--primary-text-color);
- }
- gr-main-header {
- background: var(--header-background, var(--header-background-color, #eee));
- padding: var(--header-padding);
- border-bottom: var(--header-border-bottom);
- border-image: var(--header-border-image);
- border-right: 0;
- border-left: 0;
- border-top: 0;
- box-shadow: var(--header-box-shadow);
- }
- footer {
- background: var(--footer-background, var(--footer-background-color, #eee));
- border-top: var(--footer-border-top);
- display: flex;
- justify-content: space-between;
- padding: var(--spacing-m) var(--spacing-l);
- z-index: 100;
- }
- main {
- flex: 1;
- padding-bottom: var(--spacing-xxl);
- position: relative;
- }
- .errorView {
- align-items: center;
- display: none;
- flex-direction: column;
- justify-content: center;
- position: absolute;
- top: 0;
- right: 0;
- bottom: 0;
- left: 0;
- }
- .errorView.show {
- display: flex;
- }
- .errorEmoji {
- font-size: 2.6rem;
- }
- .errorText,
- .errorMoreInfo {
- margin-top: var(--spacing-m);
- }
- .errorText {
- font-family: var(--header-font-family);
- font-size: var(--font-size-h3);
- font-weight: var(--font-weight-h3);
- line-height: var(--line-height-h3);
- }
- .errorMoreInfo {
- color: var(--deemphasized-text-color);
- }
- .feedback {
- color: var(--error-text-color);
- }
- </style>
- <gr-endpoint-decorator name="banner"></gr-endpoint-decorator>
- <gr-fixed-panel id="header">
- <gr-main-header id="mainHeader" search-query="{{params.query}}" on-mobile-search="_mobileSearchToggle" login-url="[[_loginUrl]]">
- </gr-main-header>
- </gr-fixed-panel>
- <main>
- <gr-smart-search id="search" search-query="{{params.query}}" hidden="[[!mobileSearch]]">
- </gr-smart-search>
- <template is="dom-if" if="[[_showChangeListView]]" restamp="true">
- <gr-change-list-view params="[[params]]" account="[[_account]]" view-state="{{_viewState.changeListView}}"></gr-change-list-view>
+ z-index: 10;
+ }
+ gr-main-header,
+ footer {
+ color: var(--primary-text-color);
+ }
+ gr-main-header {
+ background: var(
+ --header-background,
+ var(--header-background-color, #eee)
+ );
+ padding: var(--header-padding);
+ border-bottom: var(--header-border-bottom);
+ border-image: var(--header-border-image);
+ border-right: 0;
+ border-left: 0;
+ border-top: 0;
+ box-shadow: var(--header-box-shadow);
+ }
+ footer {
+ background: var(
+ --footer-background,
+ var(--footer-background-color, #eee)
+ );
+ border-top: var(--footer-border-top);
+ display: flex;
+ justify-content: space-between;
+ padding: var(--spacing-m) var(--spacing-l);
+ z-index: 100;
+ }
+ main {
+ flex: 1;
+ padding-bottom: var(--spacing-xxl);
+ position: relative;
+ }
+ .errorView {
+ align-items: center;
+ display: none;
+ flex-direction: column;
+ justify-content: center;
+ position: absolute;
+ top: 0;
+ right: 0;
+ bottom: 0;
+ left: 0;
+ }
+ .errorView.show {
+ display: flex;
+ }
+ .errorEmoji {
+ font-size: 2.6rem;
+ }
+ .errorText,
+ .errorMoreInfo {
+ margin-top: var(--spacing-m);
+ }
+ .errorText {
+ font-family: var(--header-font-family);
+ font-size: var(--font-size-h3);
+ font-weight: var(--font-weight-h3);
+ line-height: var(--line-height-h3);
+ }
+ .errorMoreInfo {
+ color: var(--deemphasized-text-color);
+ }
+ .feedback {
+ color: var(--error-text-color);
+ }
+ </style>
+ <gr-endpoint-decorator name="banner"></gr-endpoint-decorator>
+ <gr-fixed-panel id="header">
+ <gr-main-header
+ id="mainHeader"
+ search-query="{{params.query}}"
+ on-mobile-search="_mobileSearchToggle"
+ login-url="[[_loginUrl]]"
+ >
+ </gr-main-header>
+ </gr-fixed-panel>
+ <main>
+ <gr-smart-search
+ id="search"
+ search-query="{{params.query}}"
+ hidden="[[!mobileSearch]]"
+ >
+ </gr-smart-search>
+ <template is="dom-if" if="[[_showChangeListView]]" restamp="true">
+ <gr-change-list-view
+ params="[[params]]"
+ account="[[_account]]"
+ view-state="{{_viewState.changeListView}}"
+ ></gr-change-list-view>
+ </template>
+ <template is="dom-if" if="[[_showDashboardView]]" restamp="true">
+ <gr-dashboard-view
+ account="[[_account]]"
+ params="[[params]]"
+ view-state="{{_viewState.dashboardView}}"
+ ></gr-dashboard-view>
+ </template>
+ <template is="dom-if" if="[[_showChangeView]]" restamp="true">
+ <gr-change-view
+ params="[[params]]"
+ view-state="{{_viewState.changeView}}"
+ back-page="[[_lastSearchPage]]"
+ ></gr-change-view>
+ </template>
+ <template is="dom-if" if="[[_showEditorView]]" restamp="true">
+ <gr-editor-view params="[[params]]"></gr-editor-view>
+ </template>
+ <template is="dom-if" if="[[_showDiffView]]" restamp="true">
+ <gr-diff-view
+ params="[[params]]"
+ change-view-state="{{_viewState.changeView}}"
+ ></gr-diff-view>
+ </template>
+ <template is="dom-if" if="[[_showSettingsView]]" restamp="true">
+ <gr-settings-view
+ params="[[params]]"
+ on-account-detail-update="_handleAccountDetailUpdate"
+ >
+ </gr-settings-view>
+ </template>
+ <template is="dom-if" if="[[_showAdminView]]" restamp="true">
+ <gr-admin-view path="[[_path]]" params="[[params]]"></gr-admin-view>
+ </template>
+ <template is="dom-if" if="[[_showPluginScreen]]" restamp="true">
+ <gr-endpoint-decorator name="[[_pluginScreenName]]">
+ <gr-endpoint-param
+ name="token"
+ value="[[params.screen]]"
+ ></gr-endpoint-param>
+ </gr-endpoint-decorator>
+ </template>
+ <template is="dom-if" if="[[_showCLAView]]" restamp="true">
+ <gr-cla-view></gr-cla-view>
+ </template>
+ <template is="dom-if" if="[[_showDocumentationSearch]]" restamp="true">
+ <gr-documentation-search params="[[params]]"> </gr-documentation-search>
+ </template>
+ <div id="errorView" class="errorView">
+ <div class="errorEmoji">[[_lastError.emoji]]</div>
+ <div class="errorText">[[_lastError.text]]</div>
+ <div class="errorMoreInfo">[[_lastError.moreInfo]]</div>
+ </div>
+ </main>
+ <footer r="contentinfo">
+ <div>
+ Powered by
+ <a href="https://www.gerritcodereview.com/" rel="noopener" target="_blank"
+ >Gerrit Code Review</a
+ >
+ ([[_version]])
+ <gr-endpoint-decorator name="footer-left"></gr-endpoint-decorator>
+ </div>
+ <div>
+ <template is="dom-if" if="[[_feedbackUrl]]">
+ <a
+ class="feedback"
+ href$="[[_feedbackUrl]]"
+ rel="noopener"
+ target="_blank"
+ >Report bug</a
+ >
+ |
</template>
- <template is="dom-if" if="[[_showDashboardView]]" restamp="true">
- <gr-dashboard-view account="[[_account]]" params="[[params]]" view-state="{{_viewState.dashboardView}}"></gr-dashboard-view>
- </template>
- <template is="dom-if" if="[[_showChangeView]]" restamp="true">
- <gr-change-view params="[[params]]" view-state="{{_viewState.changeView}}" back-page="[[_lastSearchPage]]"></gr-change-view>
- </template>
- <template is="dom-if" if="[[_showEditorView]]" restamp="true">
- <gr-editor-view params="[[params]]"></gr-editor-view>
- </template>
- <template is="dom-if" if="[[_showDiffView]]" restamp="true">
- <gr-diff-view params="[[params]]" change-view-state="{{_viewState.changeView}}"></gr-diff-view>
- </template>
- <template is="dom-if" if="[[_showSettingsView]]" restamp="true">
- <gr-settings-view params="[[params]]" on-account-detail-update="_handleAccountDetailUpdate">
- </gr-settings-view>
- </template>
- <template is="dom-if" if="[[_showAdminView]]" restamp="true">
- <gr-admin-view path="[[_path]]" params="[[params]]"></gr-admin-view>
- </template>
- <template is="dom-if" if="[[_showPluginScreen]]" restamp="true">
- <gr-endpoint-decorator name="[[_pluginScreenName]]">
- <gr-endpoint-param name="token" value="[[params.screen]]"></gr-endpoint-param>
- </gr-endpoint-decorator>
- </template>
- <template is="dom-if" if="[[_showCLAView]]" restamp="true">
- <gr-cla-view></gr-cla-view>
- </template>
- <template is="dom-if" if="[[_showDocumentationSearch]]" restamp="true">
- <gr-documentation-search params="[[params]]">
- </gr-documentation-search>
- </template>
- <div id="errorView" class="errorView">
- <div class="errorEmoji">[[_lastError.emoji]]</div>
- <div class="errorText">[[_lastError.text]]</div>
- <div class="errorMoreInfo">[[_lastError.moreInfo]]</div>
- </div>
- </main>
- <footer r="contentinfo">
- <div>
- Powered by <a href="https://www.gerritcodereview.com/" rel="noopener" target="_blank">Gerrit Code Review</a>
- ([[_version]])
- <gr-endpoint-decorator name="footer-left"></gr-endpoint-decorator>
- </div>
- <div>
- <template is="dom-if" if="[[_feedbackUrl]]">
- <a class="feedback" href\$="[[_feedbackUrl]]" rel="noopener" target="_blank">Report bug</a> |
- </template>
- Press “?” for keyboard shortcuts
- <gr-endpoint-decorator name="footer-right"></gr-endpoint-decorator>
- </div>
- </footer>
- <gr-overlay id="keyboardShortcuts" with-backdrop="">
- <gr-keyboard-shortcuts-dialog on-close="_handleKeyboardShortcutDialogClose"></gr-keyboard-shortcuts-dialog>
- </gr-overlay>
- <gr-overlay id="registrationOverlay" with-backdrop="">
- <gr-registration-dialog id="registrationDialog" settings-url="[[_settingsUrl]]" on-account-detail-update="_handleAccountDetailUpdate" on-close="_handleRegistrationDialogClose">
- </gr-registration-dialog>
- </gr-overlay>
- <gr-endpoint-decorator name="plugin-overlay"></gr-endpoint-decorator>
- <gr-error-manager id="errorManager" login-url="[[_loginUrl]]"></gr-error-manager>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
- <gr-reporting id="reporting"></gr-reporting>
- <gr-router id="router"></gr-router>
- <gr-plugin-host id="plugins" config="[[_serverConfig]]">
- </gr-plugin-host>
- <gr-lib-loader id="libLoader"></gr-lib-loader>
- <gr-external-style id="externalStyleForAll" name="app-theme"></gr-external-style>
- <gr-external-style id="externalStyleForTheme" name="[[getThemeEndpoint()]]"></gr-external-style>
+ Press “?” for keyboard shortcuts
+ <gr-endpoint-decorator name="footer-right"></gr-endpoint-decorator>
+ </div>
+ </footer>
+ <gr-overlay id="keyboardShortcuts" with-backdrop="">
+ <gr-keyboard-shortcuts-dialog
+ on-close="_handleKeyboardShortcutDialogClose"
+ ></gr-keyboard-shortcuts-dialog>
+ </gr-overlay>
+ <gr-overlay id="registrationOverlay" with-backdrop="">
+ <gr-registration-dialog
+ id="registrationDialog"
+ settings-url="[[_settingsUrl]]"
+ on-account-detail-update="_handleAccountDetailUpdate"
+ on-close="_handleRegistrationDialogClose"
+ >
+ </gr-registration-dialog>
+ </gr-overlay>
+ <gr-endpoint-decorator name="plugin-overlay"></gr-endpoint-decorator>
+ <gr-error-manager
+ id="errorManager"
+ login-url="[[_loginUrl]]"
+ ></gr-error-manager>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-reporting id="reporting"></gr-reporting>
+ <gr-router id="router"></gr-router>
+ <gr-plugin-host id="plugins" config="[[_serverConfig]]"> </gr-plugin-host>
+ <gr-lib-loader id="libLoader"></gr-lib-loader>
+ <gr-external-style
+ id="externalStyleForAll"
+ name="app-theme"
+ ></gr-external-style>
+ <gr-external-style
+ id="externalStyleForTheme"
+ name="[[getThemeEndpoint()]]"
+ ></gr-external-style>
`;
diff --git a/polygerrit-ui/app/elements/gr-app_html.js b/polygerrit-ui/app/elements/gr-app_html.js
index fcf773f..3da1b69 100644
--- a/polygerrit-ui/app/elements/gr-app_html.js
+++ b/polygerrit-ui/app/elements/gr-app_html.js
@@ -17,5 +17,5 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <gr-app-element id="app-element"></gr-app-element>
+ <gr-app-element id="app-element"></gr-app-element>
`;
diff --git a/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator_html.js b/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator_html.js
index 1644c07..c4310fc 100644
--- a/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator_html.js
+++ b/polygerrit-ui/app/elements/plugins/gr-endpoint-decorator/gr-endpoint-decorator_html.js
@@ -16,6 +16,4 @@
*/
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
-export const htmlTemplate = html`
- <slot></slot>
-`;
+export const htmlTemplate = html` <slot></slot> `;
diff --git a/polygerrit-ui/app/elements/plugins/gr-external-style/gr-external-style_html.js b/polygerrit-ui/app/elements/plugins/gr-external-style/gr-external-style_html.js
index 1644c07..c4310fc 100644
--- a/polygerrit-ui/app/elements/plugins/gr-external-style/gr-external-style_html.js
+++ b/polygerrit-ui/app/elements/plugins/gr-external-style/gr-external-style_html.js
@@ -16,6 +16,4 @@
*/
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
-export const htmlTemplate = html`
- <slot></slot>
-`;
+export const htmlTemplate = html` <slot></slot> `;
diff --git a/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-plugin-popup_html.js b/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-plugin-popup_html.js
index 779cbad..5d2cae7 100644
--- a/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-plugin-popup_html.js
+++ b/polygerrit-ui/app/elements/plugins/gr-popup-interface/gr-plugin-popup_html.js
@@ -17,10 +17,10 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <gr-overlay id="overlay" with-backdrop="">
- <slot></slot>
- </gr-overlay>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <gr-overlay id="overlay" with-backdrop="">
+ <slot></slot>
+ </gr-overlay>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info_html.js b/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info_html.js
index f6ae4b8..fd94821 100644
--- a/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-account-info/gr-account-info_html.js
@@ -17,83 +17,116 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- gr-avatar {
- height: 120px;
- width: 120px;
- margin-right: var(--spacing-xs);
- vertical-align: -.25em;
- }
- div section.hide {
- display: none;
- }
- </style>
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <div class="gr-form-styles">
- <section>
- <span class="title"></span>
- <span class="value">
- <gr-avatar account="[[_account]]" image-size="120"></gr-avatar>
- </span>
- </section>
- <section class\$="[[_hideAvatarChangeUrl(_avatarChangeUrl)]]">
- <span class="title"></span>
- <span class="value">
- <a href\$="[[_avatarChangeUrl]]">
- Change avatar
- </a>
- </span>
- </section>
- <section>
- <span class="title">ID</span>
- <span class="value">[[_account._account_id]]</span>
- </section>
- <section>
- <span class="title">Email</span>
- <span class="value">[[_account.email]]</span>
- </section>
- <section>
- <span class="title">Registered</span>
- <span class="value">
- <gr-date-formatter has-tooltip="" date-str="[[_account.registered_on]]"></gr-date-formatter>
- </span>
- </section>
- <section id="usernameSection">
- <span class="title">Username</span>
- <span hidden\$="[[usernameMutable]]" class="value">[[_username]]</span>
- <span hidden\$="[[!usernameMutable]]" class="value">
- <iron-input on-keydown="_handleKeydown" bind-value="{{_username}}">
- <input is="iron-input" id="usernameInput" disabled="[[_saving]]" on-keydown="_handleKeydown" bind-value="{{_username}}">
- </iron-input>
- </span>
- </section>
- <section id="nameSection">
- <span class="title">Full name</span>
- <span hidden\$="[[nameMutable]]" class="value">[[_account.name]]</span>
- <span hidden\$="[[!nameMutable]]" class="value">
- <iron-input on-keydown="_handleKeydown" bind-value="{{_account.name}}">
- <input is="iron-input" id="nameInput" disabled="[[_saving]]" on-keydown="_handleKeydown" bind-value="{{_account.name}}">
- </iron-input>
- </span>
- </section>
- <section>
- <span class="title">Display name</span>
- <span class="value">
- <iron-input on-keydown="_handleKeydown" bind-value="{{_account.display_name}}">
- <input is="iron-input" id="displayNameInput" disabled="[[_saving]]" on-keydown="_handleKeydown" bind-value="{{_account.display_name}}">
- </iron-input>
- </span>
- </section>
- <section>
- <span class="title">Status (e.g. "Vacation")</span>
- <span class="value">
- <iron-input on-keydown="_handleKeydown" bind-value="{{_account.status}}">
- <input is="iron-input" id="statusInput" disabled="[[_saving]]" on-keydown="_handleKeydown" bind-value="{{_account.status}}">
- </iron-input>
- </span>
- </section>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <style include="shared-styles">
+ gr-avatar {
+ height: 120px;
+ width: 120px;
+ margin-right: var(--spacing-xs);
+ vertical-align: -0.25em;
+ }
+ div section.hide {
+ display: none;
+ }
+ </style>
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <div class="gr-form-styles">
+ <section>
+ <span class="title"></span>
+ <span class="value">
+ <gr-avatar account="[[_account]]" image-size="120"></gr-avatar>
+ </span>
+ </section>
+ <section class$="[[_hideAvatarChangeUrl(_avatarChangeUrl)]]">
+ <span class="title"></span>
+ <span class="value">
+ <a href$="[[_avatarChangeUrl]]">
+ Change avatar
+ </a>
+ </span>
+ </section>
+ <section>
+ <span class="title">ID</span>
+ <span class="value">[[_account._account_id]]</span>
+ </section>
+ <section>
+ <span class="title">Email</span>
+ <span class="value">[[_account.email]]</span>
+ </section>
+ <section>
+ <span class="title">Registered</span>
+ <span class="value">
+ <gr-date-formatter
+ has-tooltip=""
+ date-str="[[_account.registered_on]]"
+ ></gr-date-formatter>
+ </span>
+ </section>
+ <section id="usernameSection">
+ <span class="title">Username</span>
+ <span hidden$="[[usernameMutable]]" class="value">[[_username]]</span>
+ <span hidden$="[[!usernameMutable]]" class="value">
+ <iron-input on-keydown="_handleKeydown" bind-value="{{_username}}">
+ <input
+ is="iron-input"
+ id="usernameInput"
+ disabled="[[_saving]]"
+ on-keydown="_handleKeydown"
+ bind-value="{{_username}}"
+ />
+ </iron-input>
+ </span>
+ </section>
+ <section id="nameSection">
+ <span class="title">Full name</span>
+ <span hidden$="[[nameMutable]]" class="value">[[_account.name]]</span>
+ <span hidden$="[[!nameMutable]]" class="value">
+ <iron-input on-keydown="_handleKeydown" bind-value="{{_account.name}}">
+ <input
+ is="iron-input"
+ id="nameInput"
+ disabled="[[_saving]]"
+ on-keydown="_handleKeydown"
+ bind-value="{{_account.name}}"
+ />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <span class="title">Display name</span>
+ <span class="value">
+ <iron-input
+ on-keydown="_handleKeydown"
+ bind-value="{{_account.display_name}}"
+ >
+ <input
+ is="iron-input"
+ id="displayNameInput"
+ disabled="[[_saving]]"
+ on-keydown="_handleKeydown"
+ bind-value="{{_account.display_name}}"
+ />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <span class="title">Status (e.g. "Vacation")</span>
+ <span class="value">
+ <iron-input
+ on-keydown="_handleKeydown"
+ bind-value="{{_account.status}}"
+ >
+ <input
+ is="iron-input"
+ id="statusInput"
+ disabled="[[_saving]]"
+ on-keydown="_handleKeydown"
+ bind-value="{{_account.status}}"
+ />
+ </iron-input>
+ </span>
+ </section>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list_html.js b/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list_html.js
index 4bd9365..1cd9ce2 100644
--- a/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-agreements-list/gr-agreements-list_html.js
@@ -17,40 +17,40 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- #agreements .nameColumn {
- min-width: 15em;
- width: auto;
- }
- #agreements .descriptionColumn {
- width: auto;
- }
- </style>
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <div class="gr-form-styles">
- <table id="agreements">
- <thead>
+ <style include="shared-styles">
+ #agreements .nameColumn {
+ min-width: 15em;
+ width: auto;
+ }
+ #agreements .descriptionColumn {
+ width: auto;
+ }
+ </style>
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <div class="gr-form-styles">
+ <table id="agreements">
+ <thead>
+ <tr>
+ <th class="nameColumn">Name</th>
+ <th class="descriptionColumn">Description</th>
+ </tr>
+ </thead>
+ <tbody>
+ <template is="dom-repeat" items="[[_agreements]]">
<tr>
- <th class="nameColumn">Name</th>
- <th class="descriptionColumn">Description</th>
+ <td class="nameColumn">
+ <a href$="[[getUrlBase(item.url)]]" rel="external">
+ [[item.name]]
+ </a>
+ </td>
+ <td class="descriptionColumn">[[item.description]]</td>
</tr>
- </thead>
- <tbody>
- <template is="dom-repeat" items="[[_agreements]]">
- <tr>
- <td class="nameColumn">
- <a href\$="[[getUrlBase(item.url)]]" rel="external">
- [[item.name]]
- </a>
- </td>
- <td class="descriptionColumn">[[item.description]]</td>
- </tr>
- </template>
- </tbody>
- </table>
- <a href\$="[[getUrl()]]">New Contributor Agreement</a>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </template>
+ </tbody>
+ </table>
+ <a href$="[[getUrl()]]">New Contributor Agreement</a>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor_html.js b/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor_html.js
index 7aa785c..d63e627 100644
--- a/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-change-table-editor/gr-change-table-editor_html.js
@@ -17,51 +17,67 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- #changeCols {
- width: auto;
- }
- #changeCols .visibleHeader {
- text-align: center;
- }
- .checkboxContainer {
- cursor: pointer;
- text-align: center;
- }
- .checkboxContainer input {
- cursor: pointer;
- }
- .checkboxContainer:hover {
- outline: 1px solid var(--border-color);
- }
- </style>
- <div class="gr-form-styles">
- <table id="changeCols">
- <thead>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ #changeCols {
+ width: auto;
+ }
+ #changeCols .visibleHeader {
+ text-align: center;
+ }
+ .checkboxContainer {
+ cursor: pointer;
+ text-align: center;
+ }
+ .checkboxContainer input {
+ cursor: pointer;
+ }
+ .checkboxContainer:hover {
+ outline: 1px solid var(--border-color);
+ }
+ </style>
+ <div class="gr-form-styles">
+ <table id="changeCols">
+ <thead>
+ <tr>
+ <th class="nameHeader">Column</th>
+ <th class="visibleHeader">Visible</th>
+ </tr>
+ </thead>
+ <tbody>
+ <tr>
+ <td>Number</td>
+ <td
+ class="checkboxContainer"
+ on-click="_handleCheckboxContainerClick"
+ >
+ <input
+ type="checkbox"
+ name="number"
+ on-click="_handleNumberCheckboxClick"
+ checked$="[[showNumber]]"
+ />
+ </td>
+ </tr>
+ <template is="dom-repeat" items="[[columnNames]]">
<tr>
- <th class="nameHeader">Column</th>
- <th class="visibleHeader">Visible</th>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td>Number</td>
- <td class="checkboxContainer" on-click="_handleCheckboxContainerClick">
- <input type="checkbox" name="number" on-click="_handleNumberCheckboxClick" checked\$="[[showNumber]]">
+ <td>[[item]]</td>
+ <td
+ class="checkboxContainer"
+ on-click="_handleCheckboxContainerClick"
+ >
+ <input
+ type="checkbox"
+ name="[[item]]"
+ on-click="_handleTargetClick"
+ checked$="[[!isColumnHidden(item, displayedColumns)]]"
+ />
</td>
</tr>
- <template is="dom-repeat" items="[[columnNames]]">
- <tr>
- <td>[[item]]</td>
- <td class="checkboxContainer" on-click="_handleCheckboxContainerClick">
- <input type="checkbox" name="[[item]]" on-click="_handleTargetClick" checked\$="[[!isColumnHidden(item, displayedColumns)]]">
- </td>
- </tr>
- </template>
- </tbody>
- </table>
- </div>
+ </template>
+ </tbody>
+ </table>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view_html.js b/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view_html.js
index 2c2fca0..2d371e2 100644
--- a/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-cla-view/gr-cla-view_html.js
@@ -17,80 +17,110 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- h1 {
- margin-bottom: var(--spacing-m);
- }
- h3 {
- margin-bottom: var(--spacing-m);
- }
- .agreementsUrl {
- border: 1px solid #b0bdcc;
- margin-bottom: var(--spacing-xl);
- margin-left: var(--spacing-xl);
- margin-right: var(--spacing-xl);
- padding: var(--spacing-s);
- }
- #claNewAgreementsLabel {
- font-weight: var(--font-weight-bold);
- }
- #claNewAgreement {
- display: none;
- }
- #claNewAgreement.show {
- display: block;
- }
- .contributorAgreementButton {
- font-weight: var(--font-weight-bold);
- }
- .alreadySubmittedText {
- color: var(--error-text-color);
- margin: 0 var(--spacing-xxl);
- padding: var(--spacing-m);
- }
- .alreadySubmittedText.hide,
- .hideAgreementsTextBox {
- display: none;
- }
- main {
- margin: var(--spacing-xxl) auto;
- max-width: 50em;
- }
- </style>
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <main>
- <h1>New Contributor Agreement</h1>
- <h3>Select an agreement type:</h3>
- <template is="dom-repeat" items="[[_serverConfig.auth.contributor_agreements]]">
- <span class="contributorAgreementButton">
- <input id\$="claNewAgreementsInput[[item.name]]" name="claNewAgreementsRadio" type="radio" data-name\$="[[item.name]]" data-url\$="[[item.url]]" on-click="_handleShowAgreement" disabled\$="[[_disableAgreements(item, _groups, _signedAgreements)]]">
- <label id="claNewAgreementsLabel">[[item.name]]</label>
- </span>
- <div class\$="alreadySubmittedText [[_hideAgreements(item, _groups, _signedAgreements)]]">
- Agreement already submitted.
- </div>
- <div class="agreementsUrl">
- [[item.description]]
- </div>
- </template>
- <div id="claNewAgreement" class\$="[[_computeShowAgreementsClass(_showAgreements)]]">
- <h3 class="smallHeading">Review the agreement:</h3>
- <div id="agreementsUrl" class="agreementsUrl">
- <a href\$="[[_agreementsUrl]]" target="blank" rel="noopener">
- Please review the agreement.</a>
- </div>
- <div class\$="agreementsTextBox [[_computeHideAgreementClass(_agreementName, _serverConfig.auth.contributor_agreements)]]">
- <h3 class="smallHeading">Complete the agreement:</h3>
- <iron-input bind-value="{{_agreementsText}}" placeholder="Enter 'I agree' here">
- <input id="input-agreements" is="iron-input" bind-value="{{_agreementsText}}" placeholder="Enter 'I agree' here">
- </iron-input>
- <gr-button on-click="_handleSaveAgreements" disabled="[[_disableAgreementsText(_agreementsText)]]">
- Submit
- </gr-button>
- </div>
+ <style include="shared-styles">
+ h1 {
+ margin-bottom: var(--spacing-m);
+ }
+ h3 {
+ margin-bottom: var(--spacing-m);
+ }
+ .agreementsUrl {
+ border: 1px solid #b0bdcc;
+ margin-bottom: var(--spacing-xl);
+ margin-left: var(--spacing-xl);
+ margin-right: var(--spacing-xl);
+ padding: var(--spacing-s);
+ }
+ #claNewAgreementsLabel {
+ font-weight: var(--font-weight-bold);
+ }
+ #claNewAgreement {
+ display: none;
+ }
+ #claNewAgreement.show {
+ display: block;
+ }
+ .contributorAgreementButton {
+ font-weight: var(--font-weight-bold);
+ }
+ .alreadySubmittedText {
+ color: var(--error-text-color);
+ margin: 0 var(--spacing-xxl);
+ padding: var(--spacing-m);
+ }
+ .alreadySubmittedText.hide,
+ .hideAgreementsTextBox {
+ display: none;
+ }
+ main {
+ margin: var(--spacing-xxl) auto;
+ max-width: 50em;
+ }
+ </style>
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <main>
+ <h1>New Contributor Agreement</h1>
+ <h3>Select an agreement type:</h3>
+ <template
+ is="dom-repeat"
+ items="[[_serverConfig.auth.contributor_agreements]]"
+ >
+ <span class="contributorAgreementButton">
+ <input
+ id$="claNewAgreementsInput[[item.name]]"
+ name="claNewAgreementsRadio"
+ type="radio"
+ data-name$="[[item.name]]"
+ data-url$="[[item.url]]"
+ on-click="_handleShowAgreement"
+ disabled$="[[_disableAgreements(item, _groups, _signedAgreements)]]"
+ />
+ <label id="claNewAgreementsLabel">[[item.name]]</label>
+ </span>
+ <div
+ class$="alreadySubmittedText [[_hideAgreements(item, _groups, _signedAgreements)]]"
+ >
+ Agreement already submitted.
</div>
- </main>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <div class="agreementsUrl">
+ [[item.description]]
+ </div>
+ </template>
+ <div
+ id="claNewAgreement"
+ class$="[[_computeShowAgreementsClass(_showAgreements)]]"
+ >
+ <h3 class="smallHeading">Review the agreement:</h3>
+ <div id="agreementsUrl" class="agreementsUrl">
+ <a href$="[[_agreementsUrl]]" target="blank" rel="noopener">
+ Please review the agreement.</a
+ >
+ </div>
+ <div
+ class$="agreementsTextBox [[_computeHideAgreementClass(_agreementName, _serverConfig.auth.contributor_agreements)]]"
+ >
+ <h3 class="smallHeading">Complete the agreement:</h3>
+ <iron-input
+ bind-value="{{_agreementsText}}"
+ placeholder="Enter 'I agree' here"
+ >
+ <input
+ id="input-agreements"
+ is="iron-input"
+ bind-value="{{_agreementsText}}"
+ placeholder="Enter 'I agree' here"
+ />
+ </iron-input>
+ <gr-button
+ on-click="_handleSaveAgreements"
+ disabled="[[_disableAgreementsText(_agreementsText)]]"
+ >
+ Submit
+ </gr-button>
+ </div>
+ </div>
+ </main>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences_html.js b/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences_html.js
index de22dbb..f2c476a 100644
--- a/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-edit-preferences/gr-edit-preferences_html.js
@@ -17,73 +17,148 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <div id="editPreferences" class="gr-form-styles">
- <section>
- <span class="title">Tab width</span>
- <span class="value">
- <iron-input type="number" prevent-invalid-input="" allowed-pattern="[0-9]" bind-value="{{editPrefs.tab_size}}" on-keypress="_handleEditPrefsChanged" on-change="_handleEditPrefsChanged">
- <input is="iron-input" type="number" prevent-invalid-input="" allowed-pattern="[0-9]" bind-value="{{editPrefs.tab_size}}" on-keypress="_handleEditPrefsChanged" on-change="_handleEditPrefsChanged">
- </iron-input>
- </span>
- </section>
- <section>
- <span class="title">Columns</span>
- <span class="value">
- <iron-input type="number" prevent-invalid-input="" allowed-pattern="[0-9]" bind-value="{{editPrefs.line_length}}" on-keypress="_handleEditPrefsChanged" on-change="_handleEditPrefsChanged">
- <input is="iron-input" type="number" prevent-invalid-input="" allowed-pattern="[0-9]" bind-value="{{editPrefs.line_length}}" on-keypress="_handleEditPrefsChanged" on-change="_handleEditPrefsChanged">
- </iron-input>
- </span>
- </section>
- <section>
- <span class="title">Indent unit</span>
- <span class="value">
- <iron-input type="number" prevent-invalid-input="" allowed-pattern="[0-9]" bind-value="{{editPrefs.indent_unit}}" on-keypress="_handleEditPrefsChanged" on-change="_handleEditPrefsChanged">
- <input is="iron-input" type="number" prevent-invalid-input="" allowed-pattern="[0-9]" bind-value="{{editPrefs.indent_unit}}" on-keypress="_handleEditPrefsChanged" on-change="_handleEditPrefsChanged">
- </iron-input>
- </span>
- </section>
- <section>
- <span class="title">Syntax highlighting</span>
- <span class="value">
- <input id="editSyntaxHighlighting" type="checkbox" checked\$="[[editPrefs.syntax_highlighting]]" on-change="_handleEditSyntaxHighlightingChanged">
- </span>
- </section>
- <section>
- <span class="title">Show tabs</span>
- <span class="value">
- <input id="editShowTabs" type="checkbox" checked\$="[[editPrefs.show_tabs]]" on-change="_handleEditShowTabsChanged">
- </span>
- </section>
- <section>
- <span class="title">Match brackets</span>
- <span class="value">
- <input id="showMatchBrackets" type="checkbox" checked\$="[[editPrefs.match_brackets]]" on-change="_handleMatchBracketsChanged">
- </span>
- </section>
- <section>
- <span class="title">Line wrapping</span>
- <span class="value">
- <input id="editShowLineWrapping" type="checkbox" checked\$="[[editPrefs.line_wrapping]]" on-change="_handleEditLineWrappingChanged">
- </span>
- </section>
- <section>
- <span class="title">Indent with tabs</span>
- <span class="value">
- <input id="showIndentWithTabs" type="checkbox" checked\$="[[editPrefs.indent_with_tabs]]" on-change="_handleIndentWithTabsChanged">
- </span>
- </section>
- <section>
- <span class="title">Auto close brackets</span>
- <span class="value">
- <input id="showAutoCloseBrackets" type="checkbox" checked\$="[[editPrefs.auto_close_brackets]]" on-change="_handleAutoCloseBracketsChanged">
- </span>
- </section>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <div id="editPreferences" class="gr-form-styles">
+ <section>
+ <span class="title">Tab width</span>
+ <span class="value">
+ <iron-input
+ type="number"
+ prevent-invalid-input=""
+ allowed-pattern="[0-9]"
+ bind-value="{{editPrefs.tab_size}}"
+ on-keypress="_handleEditPrefsChanged"
+ on-change="_handleEditPrefsChanged"
+ >
+ <input
+ is="iron-input"
+ type="number"
+ prevent-invalid-input=""
+ allowed-pattern="[0-9]"
+ bind-value="{{editPrefs.tab_size}}"
+ on-keypress="_handleEditPrefsChanged"
+ on-change="_handleEditPrefsChanged"
+ />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <span class="title">Columns</span>
+ <span class="value">
+ <iron-input
+ type="number"
+ prevent-invalid-input=""
+ allowed-pattern="[0-9]"
+ bind-value="{{editPrefs.line_length}}"
+ on-keypress="_handleEditPrefsChanged"
+ on-change="_handleEditPrefsChanged"
+ >
+ <input
+ is="iron-input"
+ type="number"
+ prevent-invalid-input=""
+ allowed-pattern="[0-9]"
+ bind-value="{{editPrefs.line_length}}"
+ on-keypress="_handleEditPrefsChanged"
+ on-change="_handleEditPrefsChanged"
+ />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <span class="title">Indent unit</span>
+ <span class="value">
+ <iron-input
+ type="number"
+ prevent-invalid-input=""
+ allowed-pattern="[0-9]"
+ bind-value="{{editPrefs.indent_unit}}"
+ on-keypress="_handleEditPrefsChanged"
+ on-change="_handleEditPrefsChanged"
+ >
+ <input
+ is="iron-input"
+ type="number"
+ prevent-invalid-input=""
+ allowed-pattern="[0-9]"
+ bind-value="{{editPrefs.indent_unit}}"
+ on-keypress="_handleEditPrefsChanged"
+ on-change="_handleEditPrefsChanged"
+ />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <span class="title">Syntax highlighting</span>
+ <span class="value">
+ <input
+ id="editSyntaxHighlighting"
+ type="checkbox"
+ checked$="[[editPrefs.syntax_highlighting]]"
+ on-change="_handleEditSyntaxHighlightingChanged"
+ />
+ </span>
+ </section>
+ <section>
+ <span class="title">Show tabs</span>
+ <span class="value">
+ <input
+ id="editShowTabs"
+ type="checkbox"
+ checked$="[[editPrefs.show_tabs]]"
+ on-change="_handleEditShowTabsChanged"
+ />
+ </span>
+ </section>
+ <section>
+ <span class="title">Match brackets</span>
+ <span class="value">
+ <input
+ id="showMatchBrackets"
+ type="checkbox"
+ checked$="[[editPrefs.match_brackets]]"
+ on-change="_handleMatchBracketsChanged"
+ />
+ </span>
+ </section>
+ <section>
+ <span class="title">Line wrapping</span>
+ <span class="value">
+ <input
+ id="editShowLineWrapping"
+ type="checkbox"
+ checked$="[[editPrefs.line_wrapping]]"
+ on-change="_handleEditLineWrappingChanged"
+ />
+ </span>
+ </section>
+ <section>
+ <span class="title">Indent with tabs</span>
+ <span class="value">
+ <input
+ id="showIndentWithTabs"
+ type="checkbox"
+ checked$="[[editPrefs.indent_with_tabs]]"
+ on-change="_handleIndentWithTabsChanged"
+ />
+ </span>
+ </section>
+ <section>
+ <span class="title">Auto close brackets</span>
+ <span class="value">
+ <input
+ id="showAutoCloseBrackets"
+ type="checkbox"
+ checked$="[[editPrefs.auto_close_brackets]]"
+ on-change="_handleAutoCloseBracketsChanged"
+ />
+ </span>
+ </section>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-email-editor/gr-email-editor_html.js b/polygerrit-ui/app/elements/settings/gr-email-editor/gr-email-editor_html.js
index b02df3c..977e95d 100644
--- a/polygerrit-ui/app/elements/settings/gr-email-editor/gr-email-editor_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-email-editor/gr-email-editor_html.js
@@ -17,59 +17,83 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- th {
- color: var(--deemphasized-text-color);
- text-align: left;
- }
- #emailTable .emailColumn {
- min-width: 32.5em;
- width: auto;
- }
- #emailTable .preferredHeader {
- text-align: center;
- width: 6em;
- }
- #emailTable .preferredControl {
- cursor: pointer;
- height: auto;
- text-align: center;
- }
- #emailTable .preferredControl .preferredRadio {
- height: auto;
- }
- .preferredControl:hover {
- outline: 1px solid var(--border-color);
- }
- </style>
- <div class="gr-form-styles">
- <table id="emailTable">
- <thead>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ th {
+ color: var(--deemphasized-text-color);
+ text-align: left;
+ }
+ #emailTable .emailColumn {
+ min-width: 32.5em;
+ width: auto;
+ }
+ #emailTable .preferredHeader {
+ text-align: center;
+ width: 6em;
+ }
+ #emailTable .preferredControl {
+ cursor: pointer;
+ height: auto;
+ text-align: center;
+ }
+ #emailTable .preferredControl .preferredRadio {
+ height: auto;
+ }
+ .preferredControl:hover {
+ outline: 1px solid var(--border-color);
+ }
+ </style>
+ <div class="gr-form-styles">
+ <table id="emailTable">
+ <thead>
+ <tr>
+ <th class="emailColumn">Email</th>
+ <th class="preferredHeader">Preferred</th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <template is="dom-repeat" items="[[_emails]]">
<tr>
- <th class="emailColumn">Email</th>
- <th class="preferredHeader">Preferred</th>
- <th></th>
+ <td class="emailColumn">[[item.email]]</td>
+ <td
+ class="preferredControl"
+ on-click="_handlePreferredControlClick"
+ >
+ <iron-input
+ class="preferredRadio"
+ type="radio"
+ on-change="_handlePreferredChange"
+ name="preferred"
+ bind-value="[[item.email]]"
+ checked$="[[item.preferred]]"
+ >
+ <input
+ is="iron-input"
+ class="preferredRadio"
+ type="radio"
+ on-change="_handlePreferredChange"
+ name="preferred"
+ value="[[item.email]]"
+ checked$="[[item.preferred]]"
+ />
+ </iron-input>
+ </td>
+ <td>
+ <gr-button
+ data-index$="[[index]]"
+ on-click="_handleDeleteButton"
+ disabled="[[item.preferred]]"
+ class="remove-button"
+ >Delete</gr-button
+ >
+ </td>
</tr>
- </thead>
- <tbody>
- <template is="dom-repeat" items="[[_emails]]">
- <tr>
- <td class="emailColumn">[[item.email]]</td>
- <td class="preferredControl" on-click="_handlePreferredControlClick">
- <iron-input class="preferredRadio" type="radio" on-change="_handlePreferredChange" name="preferred" bind-value="[[item.email]]" checked\$="[[item.preferred]]">
- <input is="iron-input" class="preferredRadio" type="radio" on-change="_handlePreferredChange" name="preferred" value="[[item.email]]" checked\$="[[item.preferred]]">
- </iron-input>
- </td>
- <td>
- <gr-button data-index\$="[[index]]" on-click="_handleDeleteButton" disabled="[[item.preferred]]" class="remove-button">Delete</gr-button>
- </td>
- </tr>
- </template>
- </tbody>
- </table>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </template>
+ </tbody>
+ </table>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor_html.js b/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor_html.js
index 3ec4642..19b8d0c 100644
--- a/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-gpg-editor/gr-gpg-editor_html.js
@@ -17,98 +17,121 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- .keyHeader {
- width: 9em;
- }
- .userIdHeader {
- width: 15em;
- }
- #viewKeyOverlay {
- padding: var(--spacing-xxl);
- width: 50em;
- }
- .publicKey {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-mono);
- line-height: var(--line-height-mono);
- overflow-x: scroll;
- overflow-wrap: break-word;
- width: 30em;
- }
- .closeButton {
- bottom: 2em;
- position: absolute;
- right: 2em;
- }
- #existing {
- margin-bottom: var(--spacing-l);
- }
- </style>
- <div class="gr-form-styles">
- <fieldset id="existing">
- <table>
- <thead>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ .keyHeader {
+ width: 9em;
+ }
+ .userIdHeader {
+ width: 15em;
+ }
+ #viewKeyOverlay {
+ padding: var(--spacing-xxl);
+ width: 50em;
+ }
+ .publicKey {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-mono);
+ line-height: var(--line-height-mono);
+ overflow-x: scroll;
+ overflow-wrap: break-word;
+ width: 30em;
+ }
+ .closeButton {
+ bottom: 2em;
+ position: absolute;
+ right: 2em;
+ }
+ #existing {
+ margin-bottom: var(--spacing-l);
+ }
+ </style>
+ <div class="gr-form-styles">
+ <fieldset id="existing">
+ <table>
+ <thead>
+ <tr>
+ <th class="idColumn">ID</th>
+ <th class="fingerPrintColumn">Fingerprint</th>
+ <th class="userIdHeader">User IDs</th>
+ <th class="keyHeader">Public Key</th>
+ <th></th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <template is="dom-repeat" items="[[_keys]]" as="key">
<tr>
- <th class="idColumn">ID</th>
- <th class="fingerPrintColumn">Fingerprint</th>
- <th class="userIdHeader">User IDs</th>
- <th class="keyHeader">Public Key</th>
- <th></th>
- <th></th>
+ <td class="idColumn">[[key.id]]</td>
+ <td class="fingerPrintColumn">[[key.fingerprint]]</td>
+ <td class="userIdHeader">
+ <template is="dom-repeat" items="[[key.user_ids]]">
+ [[item]]
+ </template>
+ </td>
+ <td class="keyHeader">
+ <gr-button on-click="_showKey" data-index$="[[index]]" link=""
+ >Click to View</gr-button
+ >
+ </td>
+ <td>
+ <gr-copy-clipboard
+ has-tooltip=""
+ button-title="Copy GPG public key to clipboard"
+ hide-input=""
+ text="[[key.key]]"
+ >
+ </gr-copy-clipboard>
+ </td>
+ <td>
+ <gr-button data-index$="[[index]]" on-click="_handleDeleteKey"
+ >Delete</gr-button
+ >
+ </td>
</tr>
- </thead>
- <tbody>
- <template is="dom-repeat" items="[[_keys]]" as="key">
- <tr>
- <td class="idColumn">[[key.id]]</td>
- <td class="fingerPrintColumn">[[key.fingerprint]]</td>
- <td class="userIdHeader">
- <template is="dom-repeat" items="[[key.user_ids]]">
- [[item]]
- </template>
- </td>
- <td class="keyHeader">
- <gr-button on-click="_showKey" data-index\$="[[index]]" link="">Click to View</gr-button>
- </td>
- <td>
- <gr-copy-clipboard has-tooltip="" button-title="Copy GPG public key to clipboard" hide-input="" text="[[key.key]]">
- </gr-copy-clipboard>
- </td>
- <td>
- <gr-button data-index\$="[[index]]" on-click="_handleDeleteKey">Delete</gr-button>
- </td>
- </tr>
- </template>
- </tbody>
- </table>
- <gr-overlay id="viewKeyOverlay" with-backdrop="">
- <fieldset>
- <section>
- <span class="title">Status</span>
- <span class="value">[[_keyToView.status]]</span>
- </section>
- <section>
- <span class="title">Key</span>
- <span class="value">[[_keyToView.key]]</span>
- </section>
- </fieldset>
- <gr-button class="closeButton" on-click="_closeOverlay">Close</gr-button>
- </gr-overlay>
- <gr-button on-click="save" disabled\$="[[!hasUnsavedChanges]]">Save changes</gr-button>
- </fieldset>
- <fieldset>
- <section>
- <span class="title">New GPG key</span>
- <span class="value">
- <iron-autogrow-textarea id="newKey" autocomplete="on" bind-value="{{_newKey}}" placeholder="New GPG Key"></iron-autogrow-textarea>
- </span>
- </section>
- <gr-button id="addButton" disabled\$="[[_computeAddButtonDisabled(_newKey)]]" on-click="_handleAddKey">Add new GPG key</gr-button>
- </fieldset>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </template>
+ </tbody>
+ </table>
+ <gr-overlay id="viewKeyOverlay" with-backdrop="">
+ <fieldset>
+ <section>
+ <span class="title">Status</span>
+ <span class="value">[[_keyToView.status]]</span>
+ </section>
+ <section>
+ <span class="title">Key</span>
+ <span class="value">[[_keyToView.key]]</span>
+ </section>
+ </fieldset>
+ <gr-button class="closeButton" on-click="_closeOverlay"
+ >Close</gr-button
+ >
+ </gr-overlay>
+ <gr-button on-click="save" disabled$="[[!hasUnsavedChanges]]"
+ >Save changes</gr-button
+ >
+ </fieldset>
+ <fieldset>
+ <section>
+ <span class="title">New GPG key</span>
+ <span class="value">
+ <iron-autogrow-textarea
+ id="newKey"
+ autocomplete="on"
+ bind-value="{{_newKey}}"
+ placeholder="New GPG Key"
+ ></iron-autogrow-textarea>
+ </span>
+ </section>
+ <gr-button
+ id="addButton"
+ disabled$="[[_computeAddButtonDisabled(_newKey)]]"
+ on-click="_handleAddKey"
+ >Add new GPG key</gr-button
+ >
+ </fieldset>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-group-list/gr-group-list_html.js b/polygerrit-ui/app/elements/settings/gr-group-list/gr-group-list_html.js
index ddacd31..d5350aa 100644
--- a/polygerrit-ui/app/elements/settings/gr-group-list/gr-group-list_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-group-list/gr-group-list_html.js
@@ -17,45 +17,45 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- #groups .nameColumn {
- min-width: 11em;
- width: auto;
- }
- .descriptionHeader {
- min-width: 21.5em;
- }
- .visibleCell {
- text-align: center;
- width: 6em;
- }
- </style>
- <div class="gr-form-styles">
- <table id="groups">
- <thead>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ #groups .nameColumn {
+ min-width: 11em;
+ width: auto;
+ }
+ .descriptionHeader {
+ min-width: 21.5em;
+ }
+ .visibleCell {
+ text-align: center;
+ width: 6em;
+ }
+ </style>
+ <div class="gr-form-styles">
+ <table id="groups">
+ <thead>
+ <tr>
+ <th class="nameHeader">Name</th>
+ <th class="descriptionHeader">Description</th>
+ <th class="visibleCell">Visible to all</th>
+ </tr>
+ </thead>
+ <tbody>
+ <template is="dom-repeat" items="[[_groups]]">
<tr>
- <th class="nameHeader">Name</th>
- <th class="descriptionHeader">Description</th>
- <th class="visibleCell">Visible to all</th>
+ <td class="nameColumn">
+ <a href$="[[_computeGroupPath(item)]]">
+ [[item.name]]
+ </a>
+ </td>
+ <td>[[item.description]]</td>
+ <td class="visibleCell">[[_computeVisibleToAll(item)]]</td>
</tr>
- </thead>
- <tbody>
- <template is="dom-repeat" items="[[_groups]]">
- <tr>
- <td class="nameColumn">
- <a href\$="[[_computeGroupPath(item)]]">
- [[item.name]]
- </a>
- </td>
- <td>[[item.description]]</td>
- <td class="visibleCell">[[_computeVisibleToAll(item)]]</td>
- </tr>
- </template>
- </tbody>
- </table>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </template>
+ </tbody>
+ </table>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-http-password/gr-http-password_html.js b/polygerrit-ui/app/elements/settings/gr-http-password/gr-http-password_html.js
index b75f56e..0474b99 100644
--- a/polygerrit-ui/app/elements/settings/gr-http-password/gr-http-password_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-http-password/gr-http-password_html.js
@@ -17,68 +17,82 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- .password {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-mono);
- line-height: var(--line-height-mono);
- }
- #generatedPasswordOverlay {
- padding: var(--spacing-xxl);
- width: 50em;
- }
- #generatedPasswordDisplay {
- margin: var(--spacing-l) 0;
- }
- #generatedPasswordDisplay .title {
- width: unset;
- }
- #generatedPasswordDisplay .value {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-mono);
- line-height: var(--line-height-mono);
- }
- #passwordWarning {
- font-style: italic;
- text-align: center;
- }
- .closeButton {
- bottom: 2em;
- position: absolute;
- right: 2em;
- }
- </style>
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <div class="gr-form-styles">
- <div hidden\$="[[_passwordUrl]]">
- <section>
- <span class="title">Username</span>
- <span class="value">[[_username]]</span>
- </section>
- <gr-button id="generateButton" on-click="_handleGenerateTap">Generate new password</gr-button>
- </div>
- <span hidden\$="[[!_passwordUrl]]">
- <a href\$="[[_passwordUrl]]" target="_blank" rel="noopener">
- Obtain password</a>
- (opens in a new tab)
- </span>
+ <style include="shared-styles">
+ .password {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-mono);
+ line-height: var(--line-height-mono);
+ }
+ #generatedPasswordOverlay {
+ padding: var(--spacing-xxl);
+ width: 50em;
+ }
+ #generatedPasswordDisplay {
+ margin: var(--spacing-l) 0;
+ }
+ #generatedPasswordDisplay .title {
+ width: unset;
+ }
+ #generatedPasswordDisplay .value {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-mono);
+ line-height: var(--line-height-mono);
+ }
+ #passwordWarning {
+ font-style: italic;
+ text-align: center;
+ }
+ .closeButton {
+ bottom: 2em;
+ position: absolute;
+ right: 2em;
+ }
+ </style>
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <div class="gr-form-styles">
+ <div hidden$="[[_passwordUrl]]">
+ <section>
+ <span class="title">Username</span>
+ <span class="value">[[_username]]</span>
+ </section>
+ <gr-button id="generateButton" on-click="_handleGenerateTap"
+ >Generate new password</gr-button
+ >
</div>
- <gr-overlay id="generatedPasswordOverlay" on-iron-overlay-closed="_generatedPasswordOverlayClosed" with-backdrop="">
- <div class="gr-form-styles">
- <section id="generatedPasswordDisplay">
- <span class="title">New Password:</span>
- <span class="value">[[_generatedPassword]]</span>
- <gr-copy-clipboard has-tooltip="" button-title="Copy password to clipboard" hide-input="" text="[[_generatedPassword]]">
- </gr-copy-clipboard>
- </section>
- <section id="passwordWarning">
- This password will not be displayed again.<br>
- If you lose it, you will need to generate a new one.
- </section>
- <gr-button link="" class="closeButton" on-click="_closeOverlay">Close</gr-button>
- </div>
- </gr-overlay>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <span hidden$="[[!_passwordUrl]]">
+ <a href$="[[_passwordUrl]]" target="_blank" rel="noopener">
+ Obtain password</a
+ >
+ (opens in a new tab)
+ </span>
+ </div>
+ <gr-overlay
+ id="generatedPasswordOverlay"
+ on-iron-overlay-closed="_generatedPasswordOverlayClosed"
+ with-backdrop=""
+ >
+ <div class="gr-form-styles">
+ <section id="generatedPasswordDisplay">
+ <span class="title">New Password:</span>
+ <span class="value">[[_generatedPassword]]</span>
+ <gr-copy-clipboard
+ has-tooltip=""
+ button-title="Copy password to clipboard"
+ hide-input=""
+ text="[[_generatedPassword]]"
+ >
+ </gr-copy-clipboard>
+ </section>
+ <section id="passwordWarning">
+ This password will not be displayed again.<br />
+ If you lose it, you will need to generate a new one.
+ </section>
+ <gr-button link="" class="closeButton" on-click="_closeOverlay"
+ >Close</gr-button
+ >
+ </div>
+ </gr-overlay>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_html.js b/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_html.js
index f1424cc..bf50124 100644
--- a/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_html.js
@@ -17,74 +17,91 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- tr th.emailAddressHeader,
- tr th.identityHeader {
- width: 15em;
- padding: 0 10px;
- }
- tr td.statusColumn,
- tr td.emailAddressColumn,
- tr td.identityColumn {
- word-break: break-word;
- }
- tr td.emailAddressColumn,
- tr td.identityColumn {
- padding: 4px 10px;
- width: 15em;
- }
- .deleteButton {
- float: right;
- }
- .deleteButton:not(.show) {
- display: none;
- }
- .space {
- margin-bottom: var(--spacing-l);
- }
- </style>
- <div class="gr-form-styles">
- <fieldset class="space">
- <table>
- <thead>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ tr th.emailAddressHeader,
+ tr th.identityHeader {
+ width: 15em;
+ padding: 0 10px;
+ }
+ tr td.statusColumn,
+ tr td.emailAddressColumn,
+ tr td.identityColumn {
+ word-break: break-word;
+ }
+ tr td.emailAddressColumn,
+ tr td.identityColumn {
+ padding: 4px 10px;
+ width: 15em;
+ }
+ .deleteButton {
+ float: right;
+ }
+ .deleteButton:not(.show) {
+ display: none;
+ }
+ .space {
+ margin-bottom: var(--spacing-l);
+ }
+ </style>
+ <div class="gr-form-styles">
+ <fieldset class="space">
+ <table>
+ <thead>
+ <tr>
+ <th class="statusHeader">Status</th>
+ <th class="emailAddressHeader">Email Address</th>
+ <th class="identityHeader">Identity</th>
+ <th class="deleteHeader"></th>
+ </tr>
+ </thead>
+ <tbody>
+ <template
+ is="dom-repeat"
+ items="[[_identities]]"
+ filter="filterIdentities"
+ >
<tr>
- <th class="statusHeader">Status</th>
- <th class="emailAddressHeader">Email Address</th>
- <th class="identityHeader">Identity</th>
- <th class="deleteHeader"></th>
+ <td class="statusColumn">
+ [[_computeIsTrusted(item.trusted)]]
+ </td>
+ <td class="emailAddressColumn">[[item.email_address]]</td>
+ <td class="identityColumn">
+ [[_computeIdentity(item.identity)]]
+ </td>
+ <td class="deleteColumn">
+ <gr-button
+ class$="deleteButton [[_computeHideDeleteClass(item.can_delete)]]"
+ on-click="_handleDeleteItem"
+ >
+ Delete
+ </gr-button>
+ </td>
</tr>
- </thead>
- <tbody>
- <template is="dom-repeat" items="[[_identities]]" filter="filterIdentities">
- <tr>
- <td class="statusColumn">
- [[_computeIsTrusted(item.trusted)]]
- </td>
- <td class="emailAddressColumn">[[item.email_address]]</td>
- <td class="identityColumn">[[_computeIdentity(item.identity)]]</td>
- <td class="deleteColumn">
- <gr-button class\$="deleteButton [[_computeHideDeleteClass(item.can_delete)]]" on-click="_handleDeleteItem">
- Delete
- </gr-button>
- </td>
- </tr>
- </template>
- </tbody>
- </table>
+ </template>
+ </tbody>
+ </table>
+ </fieldset>
+ <template is="dom-if" if="[[_showLinkAnotherIdentity]]">
+ <fieldset>
+ <a href$="[[_computeLinkAnotherIdentity()]]">
+ <gr-button id="linkAnotherIdentity" link=""
+ >Link Another Identity</gr-button
+ >
+ </a>
</fieldset>
- <template is="dom-if" if="[[_showLinkAnotherIdentity]]">
- <fieldset>
- <a href\$="[[_computeLinkAnotherIdentity()]]">
- <gr-button id="linkAnotherIdentity" link="">Link Another Identity</gr-button>
- </a>
- </fieldset>
- </template>
- </div>
- <gr-overlay id="overlay" with-backdrop="">
- <gr-confirm-delete-item-dialog class="confirmDialog" on-confirm="_handleDeleteItemConfirm" on-cancel="_handleConfirmDialogCancel" item="[[_idName]]" item-type="id"></gr-confirm-delete-item-dialog>
- </gr-overlay>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </template>
+ </div>
+ <gr-overlay id="overlay" with-backdrop="">
+ <gr-confirm-delete-item-dialog
+ class="confirmDialog"
+ on-confirm="_handleDeleteItemConfirm"
+ on-cancel="_handleConfirmDialogCancel"
+ item="[[_idName]]"
+ item-type="id"
+ ></gr-confirm-delete-item-dialog>
+ </gr-overlay>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_test.html b/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_test.html
index 5c40b47..576f072 100644
--- a/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_test.html
+++ b/polygerrit-ui/app/elements/settings/gr-identities/gr-identities_test.html
@@ -79,8 +79,8 @@
row.querySelectorAll('td')[2].textContent
);
- assert.equal(nameCells[0], 'gerrit:gerrit');
- assert.equal(nameCells[1], '');
+ assert.equal(nameCells[0].trim(), 'gerrit:gerrit');
+ assert.equal(nameCells[1].trim(), '');
});
test('renders email', () => {
diff --git a/polygerrit-ui/app/elements/settings/gr-menu-editor/gr-menu-editor_html.js b/polygerrit-ui/app/elements/settings/gr-menu-editor/gr-menu-editor_html.js
index 58b654f..ceb8958 100644
--- a/polygerrit-ui/app/elements/settings/gr-menu-editor/gr-menu-editor_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-menu-editor/gr-menu-editor_html.js
@@ -17,72 +17,115 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- .buttonColumn {
- width: 2em;
- }
- .moveUpButton,
- .moveDownButton {
- width: 100%
- }
- tbody tr:first-of-type td .moveUpButton,
- tbody tr:last-of-type td .moveDownButton {
- display: none;
- }
- td.urlCell {
- word-break: break-word;
- }
- .newUrlInput {
- min-width: 23em;
- }
- </style>
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <div class="gr-form-styles">
- <table>
- <thead>
+ <style include="shared-styles">
+ .buttonColumn {
+ width: 2em;
+ }
+ .moveUpButton,
+ .moveDownButton {
+ width: 100%;
+ }
+ tbody tr:first-of-type td .moveUpButton,
+ tbody tr:last-of-type td .moveDownButton {
+ display: none;
+ }
+ td.urlCell {
+ word-break: break-word;
+ }
+ .newUrlInput {
+ min-width: 23em;
+ }
+ </style>
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <div class="gr-form-styles">
+ <table>
+ <thead>
+ <tr>
+ <th class="nameHeader">Name</th>
+ <th class="url-header">URL</th>
+ </tr>
+ </thead>
+ <tbody>
+ <template is="dom-repeat" items="[[menuItems]]">
<tr>
- <th class="nameHeader">Name</th>
- <th class="url-header">URL</th>
+ <td>[[item.name]]</td>
+ <td class="urlCell">[[item.url]]</td>
+ <td class="buttonColumn">
+ <gr-button
+ link=""
+ data-index$="[[index]]"
+ on-click="_handleMoveUpButton"
+ class="moveUpButton"
+ >↑</gr-button
+ >
+ </td>
+ <td class="buttonColumn">
+ <gr-button
+ link=""
+ data-index$="[[index]]"
+ on-click="_handleMoveDownButton"
+ class="moveDownButton"
+ >↓</gr-button
+ >
+ </td>
+ <td>
+ <gr-button
+ link=""
+ data-index$="[[index]]"
+ on-click="_handleDeleteButton"
+ class="remove-button"
+ >Delete</gr-button
+ >
+ </td>
</tr>
- </thead>
- <tbody>
- <template is="dom-repeat" items="[[menuItems]]">
- <tr>
- <td>[[item.name]]</td>
- <td class="urlCell">[[item.url]]</td>
- <td class="buttonColumn">
- <gr-button link="" data-index\$="[[index]]" on-click="_handleMoveUpButton" class="moveUpButton">↑</gr-button>
- </td>
- <td class="buttonColumn">
- <gr-button link="" data-index\$="[[index]]" on-click="_handleMoveDownButton" class="moveDownButton">↓</gr-button>
- </td>
- <td>
- <gr-button link="" data-index\$="[[index]]" on-click="_handleDeleteButton" class="remove-button">Delete</gr-button>
- </td>
- </tr>
- </template>
- </tbody>
- <tfoot>
- <tr>
- <th>
- <iron-input placeholder="New Title" on-keydown="_handleInputKeydown" bind-value="{{_newName}}">
- <input is="iron-input" placeholder="New Title" on-keydown="_handleInputKeydown" bind-value="{{_newName}}">
- </iron-input>
- </th>
- <th>
- <iron-input class="newUrlInput" placeholder="New URL" on-keydown="_handleInputKeydown" bind-value="{{_newUrl}}">
- <input class="newUrlInput" is="iron-input" placeholder="New URL" on-keydown="_handleInputKeydown" bind-value="{{_newUrl}}">
- </iron-input>
- </th>
- <th></th>
- <th></th>
- <th>
- <gr-button link="" disabled\$="[[_computeAddDisabled(_newName, _newUrl)]]" on-click="_handleAddButton">Add</gr-button>
- </th>
- </tr>
- </tfoot>
- </table>
- </div>
+ </template>
+ </tbody>
+ <tfoot>
+ <tr>
+ <th>
+ <iron-input
+ placeholder="New Title"
+ on-keydown="_handleInputKeydown"
+ bind-value="{{_newName}}"
+ >
+ <input
+ is="iron-input"
+ placeholder="New Title"
+ on-keydown="_handleInputKeydown"
+ bind-value="{{_newName}}"
+ />
+ </iron-input>
+ </th>
+ <th>
+ <iron-input
+ class="newUrlInput"
+ placeholder="New URL"
+ on-keydown="_handleInputKeydown"
+ bind-value="{{_newUrl}}"
+ >
+ <input
+ class="newUrlInput"
+ is="iron-input"
+ placeholder="New URL"
+ on-keydown="_handleInputKeydown"
+ bind-value="{{_newUrl}}"
+ />
+ </iron-input>
+ </th>
+ <th></th>
+ <th></th>
+ <th>
+ <gr-button
+ link=""
+ disabled$="[[_computeAddDisabled(_newName, _newUrl)]]"
+ on-click="_handleAddButton"
+ >Add</gr-button
+ >
+ </th>
+ </tr>
+ </tfoot>
+ </table>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog_html.js b/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog_html.js
index 737e6d5..3559ba6 100644
--- a/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-registration-dialog/gr-registration-dialog_html.js
@@ -17,94 +17,117 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="shared-styles">
- :host {
- display: block;
- }
- main {
- max-width: 46em;
- }
- :host(.loading) main {
- display: none;
- }
- .loadingMessage {
- display: none;
- font-style: italic;
- }
- :host(.loading) .loadingMessage {
- display: block;
- }
- hr {
- margin-top: var(--spacing-l);
- margin-bottom: var(--spacing-l);
- }
- header {
- border-bottom: 1px solid var(--border-color);
- font-weight: var(--font-weight-bold);
- margin-bottom: var(--spacing-l);
- }
- .container {
- padding: var(--spacing-m) var(--spacing-xl);
- }
- footer {
- display: flex;
- justify-content: flex-end;
- }
- footer gr-button {
- margin-left: var(--spacing-l);
- }
- input {
- width: 20em;
- }
- section.hide {
- display: none;
- }
- </style>
- <div class="container gr-form-styles">
- <header>Please confirm your contact information</header>
- <div class="loadingMessage">Loading...</div>
- <main>
- <p>
- The following contact information was automatically obtained when you
- signed in to the site. This information is used to display who you are
- to others, and to send updates to code reviews you have either started
- or subscribed to.
- </p>
- <hr>
- <section>
- <div class="title">Full Name</div>
- <iron-input bind-value="{{_account.name}}">
- <input is="iron-input" id="name" bind-value="{{_account.name}}" disabled="[[_saving]]">
- </iron-input>
- </section>
- <section class\$="[[_computeUsernameClass(_usernameMutable)]]">
- <div class="title">Username</div>
- <iron-input bind-value="{{_account.username}}">
- <input is="iron-input" id="username" bind-value="{{_account.username}}" disabled="[[_saving]]">
- </iron-input>
- </section>
- <section>
- <div class="title">Preferred Email</div>
- <select id="email" disabled="[[_saving]]">
- <option value="[[_account.email]]">[[_account.email]]</option>
- <template is="dom-repeat" items="[[_account.secondary_emails]]">
- <option value="[[item]]">[[item]]</option>
- </template>
- </select>
- </section>
- <hr>
- <p>
- More configuration options for Gerrit may be found in the
- <a on-click="close" href\$="[[settingsUrl]]">settings</a>.
- </p>
- </main>
- <footer>
- <gr-button id="closeButton" link="" disabled="[[_saving]]" on-click="_handleClose">Close</gr-button>
- <gr-button id="saveButton" primary="" link="" disabled="[[_computeSaveDisabled(_account.name, _account.email, _saving)]]" on-click="_handleSave">Save</gr-button>
- </footer>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ main {
+ max-width: 46em;
+ }
+ :host(.loading) main {
+ display: none;
+ }
+ .loadingMessage {
+ display: none;
+ font-style: italic;
+ }
+ :host(.loading) .loadingMessage {
+ display: block;
+ }
+ hr {
+ margin-top: var(--spacing-l);
+ margin-bottom: var(--spacing-l);
+ }
+ header {
+ border-bottom: 1px solid var(--border-color);
+ font-weight: var(--font-weight-bold);
+ margin-bottom: var(--spacing-l);
+ }
+ .container {
+ padding: var(--spacing-m) var(--spacing-xl);
+ }
+ footer {
+ display: flex;
+ justify-content: flex-end;
+ }
+ footer gr-button {
+ margin-left: var(--spacing-l);
+ }
+ input {
+ width: 20em;
+ }
+ section.hide {
+ display: none;
+ }
+ </style>
+ <div class="container gr-form-styles">
+ <header>Please confirm your contact information</header>
+ <div class="loadingMessage">Loading...</div>
+ <main>
+ <p>
+ The following contact information was automatically obtained when you
+ signed in to the site. This information is used to display who you are
+ to others, and to send updates to code reviews you have either started
+ or subscribed to.
+ </p>
+ <hr />
+ <section>
+ <div class="title">Full Name</div>
+ <iron-input bind-value="{{_account.name}}">
+ <input
+ is="iron-input"
+ id="name"
+ bind-value="{{_account.name}}"
+ disabled="[[_saving]]"
+ />
+ </iron-input>
+ </section>
+ <section class$="[[_computeUsernameClass(_usernameMutable)]]">
+ <div class="title">Username</div>
+ <iron-input bind-value="{{_account.username}}">
+ <input
+ is="iron-input"
+ id="username"
+ bind-value="{{_account.username}}"
+ disabled="[[_saving]]"
+ />
+ </iron-input>
+ </section>
+ <section>
+ <div class="title">Preferred Email</div>
+ <select id="email" disabled="[[_saving]]">
+ <option value="[[_account.email]]">[[_account.email]]</option>
+ <template is="dom-repeat" items="[[_account.secondary_emails]]">
+ <option value="[[item]]">[[item]]</option>
+ </template>
+ </select>
+ </section>
+ <hr />
+ <p>
+ More configuration options for Gerrit may be found in the
+ <a on-click="close" href$="[[settingsUrl]]">settings</a>.
+ </p>
+ </main>
+ <footer>
+ <gr-button
+ id="closeButton"
+ link=""
+ disabled="[[_saving]]"
+ on-click="_handleClose"
+ >Close</gr-button
+ >
+ <gr-button
+ id="saveButton"
+ primary=""
+ link=""
+ disabled="[[_computeSaveDisabled(_account.name, _account.email, _saving)]]"
+ on-click="_handleSave"
+ >Save</gr-button
+ >
+ </footer>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-item_html.js b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-item_html.js
index accb8c8..e26faab 100644
--- a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-item_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-item_html.js
@@ -17,12 +17,12 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style>
- :host {
- display: block;
- margin-bottom: var(--spacing-xxl);
- }
- </style>
- <h2 id="[[anchor]]">[[title]]</h2>
- <slot></slot>
+ <style>
+ :host {
+ display: block;
+ margin-bottom: var(--spacing-xxl);
+ }
+ </style>
+ <h2 id="[[anchor]]">[[title]]</h2>
+ <slot></slot>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-menu-item_html.js b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-menu-item_html.js
index 5cb129f..95433ac 100644
--- a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-menu-item_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-menu-item_html.js
@@ -17,13 +17,13 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-page-nav-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <div class="navStyles">
- <li><a href\$="[[href]]">[[title]]</a></li>
- </div>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-page-nav-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <div class="navStyles">
+ <li><a href$="[[href]]">[[title]]</a></li>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view_html.js b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view_html.js
index 0f03ec1..7e04b29 100644
--- a/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-settings-view/gr-settings-view_html.js
@@ -17,367 +17,520 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- color: var(--primary-text-color);
- }
- .newEmailInput {
- width: 20em;
- }
- #email {
- margin-bottom: var(--spacing-l);
- }
- main section.darkToggle {
- display: block;
- }
- .filters p,
- .darkToggle p {
- margin-bottom: var(--spacing-l);
- }
- .queryExample em {
- color: violet;
- }
- .toggle {
- align-items: center;
- display: flex;
- margin-bottom: var(--spacing-l);
- margin-right: var(--spacing-l);
- }
- </style>
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-menu-page-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-page-nav-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <div class="loading" hidden\$="[[!_loading]]">Loading...</div>
- <div hidden\$="[[_loading]]" hidden="">
- <gr-page-nav class="navStyles">
- <ul>
- <li><a href="#Profile">Profile</a></li>
- <li><a href="#Preferences">Preferences</a></li>
- <li><a href="#DiffPreferences">Diff Preferences</a></li>
- <li><a href="#EditPreferences">Edit Preferences</a></li>
- <li><a href="#Menu">Menu</a></li>
- <li><a href="#ChangeTableColumns">Change Table Columns</a></li>
- <li><a href="#Notifications">Notifications</a></li>
- <li><a href="#EmailAddresses">Email Addresses</a></li>
- <template is="dom-if" if="[[_showHttpAuth(_serverConfig)]]">
- <li><a href="#HTTPCredentials">HTTP Credentials</a></li>
- </template>
- <li hidden\$="[[!_serverConfig.sshd]]"><a href="#SSHKeys">
+ <style include="shared-styles">
+ :host {
+ color: var(--primary-text-color);
+ }
+ .newEmailInput {
+ width: 20em;
+ }
+ #email {
+ margin-bottom: var(--spacing-l);
+ }
+ main section.darkToggle {
+ display: block;
+ }
+ .filters p,
+ .darkToggle p {
+ margin-bottom: var(--spacing-l);
+ }
+ .queryExample em {
+ color: violet;
+ }
+ .toggle {
+ align-items: center;
+ display: flex;
+ margin-bottom: var(--spacing-l);
+ margin-right: var(--spacing-l);
+ }
+ </style>
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-menu-page-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-page-nav-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <div class="loading" hidden$="[[!_loading]]">Loading...</div>
+ <div hidden$="[[_loading]]" hidden="">
+ <gr-page-nav class="navStyles">
+ <ul>
+ <li><a href="#Profile">Profile</a></li>
+ <li><a href="#Preferences">Preferences</a></li>
+ <li><a href="#DiffPreferences">Diff Preferences</a></li>
+ <li><a href="#EditPreferences">Edit Preferences</a></li>
+ <li><a href="#Menu">Menu</a></li>
+ <li><a href="#ChangeTableColumns">Change Table Columns</a></li>
+ <li><a href="#Notifications">Notifications</a></li>
+ <li><a href="#EmailAddresses">Email Addresses</a></li>
+ <template is="dom-if" if="[[_showHttpAuth(_serverConfig)]]">
+ <li><a href="#HTTPCredentials">HTTP Credentials</a></li>
+ </template>
+ <li hidden$="[[!_serverConfig.sshd]]">
+ <a href="#SSHKeys">
SSH Keys
- </a></li>
- <li hidden\$="[[!_serverConfig.receive.enable_signed_push]]"><a href="#GPGKeys">
+ </a>
+ </li>
+ <li hidden$="[[!_serverConfig.receive.enable_signed_push]]">
+ <a href="#GPGKeys">
GPG Keys
- </a></li>
- <li><a href="#Groups">Groups</a></li>
- <li><a href="#Identities">Identities</a></li>
- <template is="dom-if" if="[[_serverConfig.auth.use_contributor_agreements]]">
- <li>
- <a href="#Agreements">Agreements</a>
- </li>
- </template>
- <li><a href="#MailFilters">Mail Filters</a></li>
- <gr-endpoint-decorator name="settings-menu-item">
- </gr-endpoint-decorator>
- </ul>
- </gr-page-nav>
- <main class="gr-form-styles">
- <h1>User Settings</h1>
- <section class="darkToggle">
- <div class="toggle">
- <paper-toggle-button checked="[[_isDark]]" on-change="_handleToggleDark"></paper-toggle-button>
- <div>Dark theme (alpha)</div>
- </div>
+ </a>
+ </li>
+ <li><a href="#Groups">Groups</a></li>
+ <li><a href="#Identities">Identities</a></li>
+ <template
+ is="dom-if"
+ if="[[_serverConfig.auth.use_contributor_agreements]]"
+ >
+ <li>
+ <a href="#Agreements">Agreements</a>
+ </li>
+ </template>
+ <li><a href="#MailFilters">Mail Filters</a></li>
+ <gr-endpoint-decorator name="settings-menu-item">
+ </gr-endpoint-decorator>
+ </ul>
+ </gr-page-nav>
+ <main class="gr-form-styles">
+ <h1>User Settings</h1>
+ <section class="darkToggle">
+ <div class="toggle">
+ <paper-toggle-button
+ checked="[[_isDark]]"
+ on-change="_handleToggleDark"
+ ></paper-toggle-button>
+ <div>Dark theme (alpha)</div>
+ </div>
+ <p>
+ Gerrit's dark theme is in early alpha, and almost definitely will not
+ play nicely with themes set by specific Gerrit hosts. Filing feedback
+ via the link in the app footer is strongly encouraged!
+ </p>
+ </section>
+ <h2 id="Profile" class$="[[_computeHeaderClass(_accountInfoChanged)]]">
+ Profile
+ </h2>
+ <fieldset id="profile">
+ <gr-account-info
+ id="accountInfo"
+ has-unsaved-changes="{{_accountInfoChanged}}"
+ ></gr-account-info>
+ <gr-button
+ on-click="_handleSaveAccountInfo"
+ disabled="[[!_accountInfoChanged]]"
+ >Save changes</gr-button
+ >
+ </fieldset>
+ <h2 id="Preferences" class$="[[_computeHeaderClass(_prefsChanged)]]">
+ Preferences
+ </h2>
+ <fieldset id="preferences">
+ <section>
+ <span class="title">Changes per page</span>
+ <span class="value">
+ <gr-select bind-value="{{_localPrefs.changes_per_page}}">
+ <select>
+ <option value="10">10 rows per page</option>
+ <option value="25">25 rows per page</option>
+ <option value="50">50 rows per page</option>
+ <option value="100">100 rows per page</option>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">Date/time format</span>
+ <span class="value">
+ <gr-select bind-value="{{_localPrefs.date_format}}">
+ <select>
+ <option value="STD">Jun 3 ; Jun 3, 2016</option>
+ <option value="US">06/03 ; 06/03/16</option>
+ <option value="ISO">06-03 ; 2016-06-03</option>
+ <option value="EURO">3. Jun ; 03.06.2016</option>
+ <option value="UK">03/06 ; 03/06/2016</option>
+ </select>
+ </gr-select>
+ <gr-select bind-value="{{_localPrefs.time_format}}">
+ <select>
+ <option value="HHMM_12">4:10 PM</option>
+ <option value="HHMM_24">16:10</option>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">Email notifications</span>
+ <span class="value">
+ <gr-select bind-value="{{_localPrefs.email_strategy}}">
+ <select>
+ <option value="CC_ON_OWN_COMMENTS">Every comment</option>
+ <option value="ENABLED">Only comments left by others</option>
+ <option value="DISABLED">None</option>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section hidden$="[[!_localPrefs.email_format]]">
+ <span class="title">Email format</span>
+ <span class="value">
+ <gr-select bind-value="{{_localPrefs.email_format}}">
+ <select>
+ <option value="HTML_PLAINTEXT">HTML and plaintext</option>
+ <option value="PLAINTEXT">Plaintext only</option>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section hidden$="[[!_localPrefs.default_base_for_merges]]">
+ <span class="title">Default Base For Merges</span>
+ <span class="value">
+ <gr-select bind-value="{{_localPrefs.default_base_for_merges}}">
+ <select>
+ <option value="AUTO_MERGE">Auto Merge</option>
+ <option value="FIRST_PARENT">First Parent</option>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">Show Relative Dates In Changes Table</span>
+ <span class="value">
+ <input
+ id="relativeDateInChangeTable"
+ type="checkbox"
+ checked$="[[_localPrefs.relative_date_in_change_table]]"
+ on-change="_handleRelativeDateInChangeTable"
+ />
+ </span>
+ </section>
+ <section>
+ <span class="title">Diff view</span>
+ <span class="value">
+ <gr-select bind-value="{{_localPrefs.diff_view}}">
+ <select>
+ <option value="SIDE_BY_SIDE">Side by side</option>
+ <option value="UNIFIED_DIFF">Unified diff</option>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">Show size bars in file list</span>
+ <span class="value">
+ <input
+ id="showSizeBarsInFileList"
+ type="checkbox"
+ checked$="[[_localPrefs.size_bar_in_change_table]]"
+ on-change="_handleShowSizeBarsInFileListChanged"
+ />
+ </span>
+ </section>
+ <section>
+ <span class="title">Publish comments on push</span>
+ <span class="value">
+ <input
+ id="publishCommentsOnPush"
+ type="checkbox"
+ checked$="[[_localPrefs.publish_comments_on_push]]"
+ on-change="_handlePublishCommentsOnPushChanged"
+ />
+ </span>
+ </section>
+ <section>
+ <span class="title"
+ >Set new changes to "work in progress" by default</span
+ >
+ <span class="value">
+ <input
+ id="workInProgressByDefault"
+ type="checkbox"
+ checked$="[[_localPrefs.work_in_progress_by_default]]"
+ on-change="_handleWorkInProgressByDefault"
+ />
+ </span>
+ </section>
+ <section>
+ <span class="title">
+ Insert Signed-off-by Footer For Inline Edit Changes
+ </span>
+ <span class="value">
+ <input
+ id="insertSignedOff"
+ type="checkbox"
+ checked$="[[_localPrefs.signed_off_by]]"
+ on-change="_handleInsertSignedOff"
+ />
+ </span>
+ </section>
+ <gr-button
+ id="savePrefs"
+ on-click="_handleSavePreferences"
+ disabled="[[!_prefsChanged]]"
+ >Save changes</gr-button
+ >
+ </fieldset>
+ <h2
+ id="DiffPreferences"
+ class$="[[_computeHeaderClass(_diffPrefsChanged)]]"
+ >
+ Diff Preferences
+ </h2>
+ <fieldset id="diffPreferences">
+ <gr-diff-preferences
+ id="diffPrefs"
+ has-unsaved-changes="{{_diffPrefsChanged}}"
+ ></gr-diff-preferences>
+ <gr-button
+ id="saveDiffPrefs"
+ on-click="_handleSaveDiffPreferences"
+ disabled$="[[!_diffPrefsChanged]]"
+ >Save changes</gr-button
+ >
+ </fieldset>
+ <h2
+ id="EditPreferences"
+ class$="[[_computeHeaderClass(_editPrefsChanged)]]"
+ >
+ Edit Preferences
+ </h2>
+ <fieldset id="editPreferences">
+ <gr-edit-preferences
+ id="editPrefs"
+ has-unsaved-changes="{{_editPrefsChanged}}"
+ ></gr-edit-preferences>
+ <gr-button
+ id="saveEditPrefs"
+ on-click="_handleSaveEditPreferences"
+ disabled$="[[!_editPrefsChanged]]"
+ >Save changes</gr-button
+ >
+ </fieldset>
+ <h2 id="Menu" class$="[[_computeHeaderClass(_menuChanged)]]">Menu</h2>
+ <fieldset id="menu">
+ <gr-menu-editor menu-items="{{_localMenu}}"></gr-menu-editor>
+ <gr-button
+ id="saveMenu"
+ on-click="_handleSaveMenu"
+ disabled="[[!_menuChanged]]"
+ >Save changes</gr-button
+ >
+ <gr-button id="resetMenu" link="" on-click="_handleResetMenuButton"
+ >Reset</gr-button
+ >
+ </fieldset>
+ <h2
+ id="ChangeTableColumns"
+ class$="[[_computeHeaderClass(_changeTableChanged)]]"
+ >
+ Change Table Columns
+ </h2>
+ <fieldset id="changeTableColumns">
+ <gr-change-table-editor
+ show-number="{{_showNumber}}"
+ displayed-columns="{{_localChangeTableColumns}}"
+ >
+ </gr-change-table-editor>
+ <gr-button
+ id="saveChangeTable"
+ on-click="_handleSaveChangeTable"
+ disabled="[[!_changeTableChanged]]"
+ >Save changes</gr-button
+ >
+ </fieldset>
+ <h2
+ id="Notifications"
+ class$="[[_computeHeaderClass(_watchedProjectsChanged)]]"
+ >
+ Notifications
+ </h2>
+ <fieldset id="watchedProjects">
+ <gr-watched-projects-editor
+ has-unsaved-changes="{{_watchedProjectsChanged}}"
+ id="watchedProjectsEditor"
+ ></gr-watched-projects-editor>
+ <gr-button
+ on-click="_handleSaveWatchedProjects"
+ disabled$="[[!_watchedProjectsChanged]]"
+ id="_handleSaveWatchedProjects"
+ >Save changes</gr-button
+ >
+ </fieldset>
+ <h2 id="EmailAddresses" class$="[[_computeHeaderClass(_emailsChanged)]]">
+ Email Addresses
+ </h2>
+ <fieldset id="email">
+ <gr-email-editor
+ id="emailEditor"
+ has-unsaved-changes="{{_emailsChanged}}"
+ ></gr-email-editor>
+ <gr-button on-click="_handleSaveEmails" disabled$="[[!_emailsChanged]]"
+ >Save changes</gr-button
+ >
+ </fieldset>
+ <fieldset id="newEmail">
+ <section>
+ <span class="title">New email address</span>
+ <span class="value">
+ <iron-input
+ class="newEmailInput"
+ bind-value="{{_newEmail}}"
+ type="text"
+ on-keydown="_handleNewEmailKeydown"
+ placeholder="email@example.com"
+ >
+ <input
+ class="newEmailInput"
+ bind-value="{{_newEmail}}"
+ is="iron-input"
+ type="text"
+ disabled="[[_addingEmail]]"
+ on-keydown="_handleNewEmailKeydown"
+ placeholder="email@example.com"
+ />
+ </iron-input>
+ </span>
+ </section>
+ <section
+ id="verificationSentMessage"
+ hidden$="[[!_lastSentVerificationEmail]]"
+ >
<p>
- Gerrit's dark theme is in early alpha, and almost definitely will
- not play nicely with themes set by specific Gerrit hosts. Filing
- feedback via the link in the app footer is strongly encouraged!
+ A verification email was sent to
+ <em>[[_lastSentVerificationEmail]]</em>. Please check your inbox.
</p>
</section>
- <h2 id="Profile" class\$="[[_computeHeaderClass(_accountInfoChanged)]]">Profile</h2>
- <fieldset id="profile">
- <gr-account-info id="accountInfo" has-unsaved-changes="{{_accountInfoChanged}}"></gr-account-info>
- <gr-button on-click="_handleSaveAccountInfo" disabled="[[!_accountInfoChanged]]">Save changes</gr-button>
- </fieldset>
- <h2 id="Preferences" class\$="[[_computeHeaderClass(_prefsChanged)]]">Preferences</h2>
- <fieldset id="preferences">
- <section>
- <span class="title">Changes per page</span>
- <span class="value">
- <gr-select bind-value="{{_localPrefs.changes_per_page}}">
- <select>
- <option value="10">10 rows per page</option>
- <option value="25">25 rows per page</option>
- <option value="50">50 rows per page</option>
- <option value="100">100 rows per page</option>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">Date/time format</span>
- <span class="value">
- <gr-select bind-value="{{_localPrefs.date_format}}">
- <select>
- <option value="STD">Jun 3 ; Jun 3, 2016</option>
- <option value="US">06/03 ; 06/03/16</option>
- <option value="ISO">06-03 ; 2016-06-03</option>
- <option value="EURO">3. Jun ; 03.06.2016</option>
- <option value="UK">03/06 ; 03/06/2016</option>
- </select>
- </gr-select>
- <gr-select bind-value="{{_localPrefs.time_format}}">
- <select>
- <option value="HHMM_12">4:10 PM</option>
- <option value="HHMM_24">16:10</option>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">Email notifications</span>
- <span class="value">
- <gr-select bind-value="{{_localPrefs.email_strategy}}">
- <select>
- <option value="CC_ON_OWN_COMMENTS">Every comment</option>
- <option value="ENABLED">Only comments left by others</option>
- <option value="DISABLED">None</option>
- </select>
- </gr-select>
- </span>
- </section>
- <section hidden\$="[[!_localPrefs.email_format]]">
- <span class="title">Email format</span>
- <span class="value">
- <gr-select bind-value="{{_localPrefs.email_format}}">
- <select>
- <option value="HTML_PLAINTEXT">HTML and plaintext</option>
- <option value="PLAINTEXT">Plaintext only</option>
- </select>
- </gr-select>
- </span>
- </section>
- <section hidden\$="[[!_localPrefs.default_base_for_merges]]">
- <span class="title">Default Base For Merges</span>
- <span class="value">
- <gr-select bind-value="{{_localPrefs.default_base_for_merges}}">
- <select>
- <option value="AUTO_MERGE">Auto Merge</option>
- <option value="FIRST_PARENT">First Parent</option>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">Show Relative Dates In Changes Table</span>
- <span class="value">
- <input id="relativeDateInChangeTable" type="checkbox" checked\$="[[_localPrefs.relative_date_in_change_table]]" on-change="_handleRelativeDateInChangeTable">
- </span>
- </section>
- <section>
- <span class="title">Diff view</span>
- <span class="value">
- <gr-select bind-value="{{_localPrefs.diff_view}}">
- <select>
- <option value="SIDE_BY_SIDE">Side by side</option>
- <option value="UNIFIED_DIFF">Unified diff</option>
- </select>
- </gr-select>
- </span>
- </section>
- <section>
- <span class="title">Show size bars in file list</span>
- <span class="value">
- <input id="showSizeBarsInFileList" type="checkbox" checked\$="[[_localPrefs.size_bar_in_change_table]]" on-change="_handleShowSizeBarsInFileListChanged">
- </span>
- </section>
- <section>
- <span class="title">Publish comments on push</span>
- <span class="value">
- <input id="publishCommentsOnPush" type="checkbox" checked\$="[[_localPrefs.publish_comments_on_push]]" on-change="_handlePublishCommentsOnPushChanged">
- </span>
- </section>
- <section>
- <span class="title">Set new changes to "work in progress" by default</span>
- <span class="value">
- <input id="workInProgressByDefault" type="checkbox" checked\$="[[_localPrefs.work_in_progress_by_default]]" on-change="_handleWorkInProgressByDefault">
- </span>
- </section>
- <section>
- <span class="title">
- Insert Signed-off-by Footer For Inline Edit Changes
- </span>
- <span class="value">
- <input id="insertSignedOff" type="checkbox" checked\$="[[_localPrefs.signed_off_by]]" on-change="_handleInsertSignedOff">
- </span>
- </section>
- <gr-button id="savePrefs" on-click="_handleSavePreferences" disabled="[[!_prefsChanged]]">Save changes</gr-button>
- </fieldset>
- <h2 id="DiffPreferences" class\$="[[_computeHeaderClass(_diffPrefsChanged)]]">
- Diff Preferences
- </h2>
- <fieldset id="diffPreferences">
- <gr-diff-preferences id="diffPrefs" has-unsaved-changes="{{_diffPrefsChanged}}"></gr-diff-preferences>
- <gr-button id="saveDiffPrefs" on-click="_handleSaveDiffPreferences" disabled\$="[[!_diffPrefsChanged]]">Save changes</gr-button>
- </fieldset>
- <h2 id="EditPreferences" class\$="[[_computeHeaderClass(_editPrefsChanged)]]">
- Edit Preferences
- </h2>
- <fieldset id="editPreferences">
- <gr-edit-preferences id="editPrefs" has-unsaved-changes="{{_editPrefsChanged}}"></gr-edit-preferences>
- <gr-button id="saveEditPrefs" on-click="_handleSaveEditPreferences" disabled\$="[[!_editPrefsChanged]]">Save changes</gr-button>
- </fieldset>
- <h2 id="Menu" class\$="[[_computeHeaderClass(_menuChanged)]]">Menu</h2>
- <fieldset id="menu">
- <gr-menu-editor menu-items="{{_localMenu}}"></gr-menu-editor>
- <gr-button id="saveMenu" on-click="_handleSaveMenu" disabled="[[!_menuChanged]]">Save changes</gr-button>
- <gr-button id="resetMenu" link="" on-click="_handleResetMenuButton">Reset</gr-button>
- </fieldset>
- <h2 id="ChangeTableColumns" class\$="[[_computeHeaderClass(_changeTableChanged)]]">
- Change Table Columns
- </h2>
- <fieldset id="changeTableColumns">
- <gr-change-table-editor show-number="{{_showNumber}}" displayed-columns="{{_localChangeTableColumns}}">
- </gr-change-table-editor>
- <gr-button id="saveChangeTable" on-click="_handleSaveChangeTable" disabled="[[!_changeTableChanged]]">Save changes</gr-button>
- </fieldset>
- <h2 id="Notifications" class\$="[[_computeHeaderClass(_watchedProjectsChanged)]]">
- Notifications
- </h2>
- <fieldset id="watchedProjects">
- <gr-watched-projects-editor has-unsaved-changes="{{_watchedProjectsChanged}}" id="watchedProjectsEditor"></gr-watched-projects-editor>
- <gr-button on-click="_handleSaveWatchedProjects" disabled\$="[[!_watchedProjectsChanged]]" id="_handleSaveWatchedProjects">Save changes</gr-button>
- </fieldset>
- <h2 id="EmailAddresses" class\$="[[_computeHeaderClass(_emailsChanged)]]">
- Email Addresses
- </h2>
- <fieldset id="email">
- <gr-email-editor id="emailEditor" has-unsaved-changes="{{_emailsChanged}}"></gr-email-editor>
- <gr-button on-click="_handleSaveEmails" disabled\$="[[!_emailsChanged]]">Save changes</gr-button>
- </fieldset>
- <fieldset id="newEmail">
- <section>
- <span class="title">New email address</span>
- <span class="value">
- <iron-input class="newEmailInput" bind-value="{{_newEmail}}" type="text" on-keydown="_handleNewEmailKeydown" placeholder="email@example.com">
- <input class="newEmailInput" bind-value="{{_newEmail}}" is="iron-input" type="text" disabled="[[_addingEmail]]" on-keydown="_handleNewEmailKeydown" placeholder="email@example.com">
- </iron-input>
- </span>
- </section>
- <section id="verificationSentMessage" hidden\$="[[!_lastSentVerificationEmail]]">
- <p>
- A verification email was sent to
- <em>[[_lastSentVerificationEmail]]</em>. Please check your inbox.
- </p>
- </section>
- <gr-button disabled="[[!_computeAddEmailButtonEnabled(_newEmail, _addingEmail)]]" on-click="_handleAddEmailButton">Send verification</gr-button>
- </fieldset>
- <template is="dom-if" if="[[_showHttpAuth(_serverConfig)]]">
- <div>
- <h2 id="HTTPCredentials">HTTP Credentials</h2>
- <fieldset>
- <gr-http-password id="httpPass"></gr-http-password>
- </fieldset>
- </div>
- </template>
- <div hidden\$="[[!_serverConfig.sshd]]">
- <h2 id="SSHKeys" class\$="[[_computeHeaderClass(_keysChanged)]]">SSH keys</h2>
- <gr-ssh-editor id="sshEditor" has-unsaved-changes="{{_keysChanged}}"></gr-ssh-editor>
- </div>
- <div hidden\$="[[!_serverConfig.receive.enable_signed_push]]">
- <h2 id="GPGKeys" class\$="[[_computeHeaderClass(_gpgKeysChanged)]]">GPG keys</h2>
- <gr-gpg-editor id="gpgEditor" has-unsaved-changes="{{_gpgKeysChanged}}"></gr-gpg-editor>
- </div>
- <h2 id="Groups">Groups</h2>
- <fieldset>
- <gr-group-list id="groupList"></gr-group-list>
- </fieldset>
- <h2 id="Identities">Identities</h2>
- <fieldset>
- <gr-identities id="identities" server-config="[[_serverConfig]]"></gr-identities>
- </fieldset>
- <template is="dom-if" if="[[_serverConfig.auth.use_contributor_agreements]]">
- <h2 id="Agreements">Agreements</h2>
+ <gr-button
+ disabled="[[!_computeAddEmailButtonEnabled(_newEmail, _addingEmail)]]"
+ on-click="_handleAddEmailButton"
+ >Send verification</gr-button
+ >
+ </fieldset>
+ <template is="dom-if" if="[[_showHttpAuth(_serverConfig)]]">
+ <div>
+ <h2 id="HTTPCredentials">HTTP Credentials</h2>
<fieldset>
- <gr-agreements-list id="agreementsList"></gr-agreements-list>
+ <gr-http-password id="httpPass"></gr-http-password>
</fieldset>
- </template>
- <h2 id="MailFilters">Mail Filters</h2>
- <fieldset class="filters">
- <p>
- Gerrit emails include metadata about the change to support
- writing mail filters.
- </p>
- <p>
- Here are some example Gmail queries that can be used for filters or
- for searching through archived messages. View the
- <a href\$="[[_getFilterDocsLink(_docsBaseUrl)]]" target="_blank" rel="nofollow">Gerrit documentation</a>
- for the complete set of footers.
- </p>
- <table>
- <tbody>
- <tr><th>Name</th><th>Query</th></tr>
- <tr>
- <td>Changes requesting my review</td>
- <td>
- <code class="queryExample">
- "Gerrit-Reviewer: <em>Your Name</em>
- <<em>your.email@example.com</em>>"
- </code>
- </td>
- </tr>
- <tr>
- <td>Changes from a specific owner</td>
- <td>
- <code class="queryExample">
- "Gerrit-Owner: <em>Owner name</em>
- <<em>owner.email@example.com</em>>"
- </code>
- </td>
- </tr>
- <tr>
- <td>Changes targeting a specific branch</td>
- <td>
- <code class="queryExample">
- "Gerrit-Branch: <em>branch-name</em>"
- </code>
- </td>
- </tr>
- <tr>
- <td>Changes in a specific project</td>
- <td>
- <code class="queryExample">
- "Gerrit-Project: <em>project-name</em>"
- </code>
- </td>
- </tr>
- <tr>
- <td>Messages related to a specific Change ID</td>
- <td>
- <code class="queryExample">
- "Gerrit-Change-Id: <em>Change ID</em>"
- </code>
- </td>
- </tr>
- <tr>
- <td>Messages related to a specific change number</td>
- <td>
- <code class="queryExample">
- "Gerrit-Change-Number: <em>change number</em>"
- </code>
- </td>
- </tr>
- </tbody>
- </table>
+ </div>
+ </template>
+ <div hidden$="[[!_serverConfig.sshd]]">
+ <h2 id="SSHKeys" class$="[[_computeHeaderClass(_keysChanged)]]">
+ SSH keys
+ </h2>
+ <gr-ssh-editor
+ id="sshEditor"
+ has-unsaved-changes="{{_keysChanged}}"
+ ></gr-ssh-editor>
+ </div>
+ <div hidden$="[[!_serverConfig.receive.enable_signed_push]]">
+ <h2 id="GPGKeys" class$="[[_computeHeaderClass(_gpgKeysChanged)]]">
+ GPG keys
+ </h2>
+ <gr-gpg-editor
+ id="gpgEditor"
+ has-unsaved-changes="{{_gpgKeysChanged}}"
+ ></gr-gpg-editor>
+ </div>
+ <h2 id="Groups">Groups</h2>
+ <fieldset>
+ <gr-group-list id="groupList"></gr-group-list>
+ </fieldset>
+ <h2 id="Identities">Identities</h2>
+ <fieldset>
+ <gr-identities
+ id="identities"
+ server-config="[[_serverConfig]]"
+ ></gr-identities>
+ </fieldset>
+ <template
+ is="dom-if"
+ if="[[_serverConfig.auth.use_contributor_agreements]]"
+ >
+ <h2 id="Agreements">Agreements</h2>
+ <fieldset>
+ <gr-agreements-list id="agreementsList"></gr-agreements-list>
</fieldset>
- <gr-endpoint-decorator name="settings-screen">
- </gr-endpoint-decorator>
- </main>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </template>
+ <h2 id="MailFilters">Mail Filters</h2>
+ <fieldset class="filters">
+ <p>
+ Gerrit emails include metadata about the change to support writing
+ mail filters.
+ </p>
+ <p>
+ Here are some example Gmail queries that can be used for filters or
+ for searching through archived messages. View the
+ <a
+ href$="[[_getFilterDocsLink(_docsBaseUrl)]]"
+ target="_blank"
+ rel="nofollow"
+ >Gerrit documentation</a
+ >
+ for the complete set of footers.
+ </p>
+ <table>
+ <tbody>
+ <tr>
+ <th>Name</th>
+ <th>Query</th>
+ </tr>
+ <tr>
+ <td>Changes requesting my review</td>
+ <td>
+ <code class="queryExample">
+ "Gerrit-Reviewer: <em>Your Name</em>
+ <<em>your.email@example.com</em>>"
+ </code>
+ </td>
+ </tr>
+ <tr>
+ <td>Changes from a specific owner</td>
+ <td>
+ <code class="queryExample">
+ "Gerrit-Owner: <em>Owner name</em>
+ <<em>owner.email@example.com</em>>"
+ </code>
+ </td>
+ </tr>
+ <tr>
+ <td>Changes targeting a specific branch</td>
+ <td>
+ <code class="queryExample">
+ "Gerrit-Branch: <em>branch-name</em>"
+ </code>
+ </td>
+ </tr>
+ <tr>
+ <td>Changes in a specific project</td>
+ <td>
+ <code class="queryExample">
+ "Gerrit-Project: <em>project-name</em>"
+ </code>
+ </td>
+ </tr>
+ <tr>
+ <td>Messages related to a specific Change ID</td>
+ <td>
+ <code class="queryExample">
+ "Gerrit-Change-Id: <em>Change ID</em>"
+ </code>
+ </td>
+ </tr>
+ <tr>
+ <td>Messages related to a specific change number</td>
+ <td>
+ <code class="queryExample">
+ "Gerrit-Change-Number: <em>change number</em>"
+ </code>
+ </td>
+ </tr>
+ </tbody>
+ </table>
+ </fieldset>
+ <gr-endpoint-decorator name="settings-screen"> </gr-endpoint-decorator>
+ </main>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor_html.js b/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor_html.js
index 3cefb90e..1f3c793 100644
--- a/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-ssh-editor/gr-ssh-editor_html.js
@@ -17,100 +17,127 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- .statusHeader {
- width: 4em;
- }
- .keyHeader {
- width: 7.5em;
- }
- #viewKeyOverlay {
- padding: var(--spacing-xxl);
- width: 50em;
- }
- .publicKey {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-mono);
- line-height: var(--line-height-mono);
- overflow-x: scroll;
- overflow-wrap: break-word;
- width: 30em;
- }
- .closeButton {
- bottom: 2em;
- position: absolute;
- right: 2em;
- }
- #existing {
- margin-bottom: var(--spacing-l);
- }
- #existing .commentColumn {
- min-width: 27em;
- width: auto;
- }
- </style>
- <div class="gr-form-styles">
- <fieldset id="existing">
- <table>
- <thead>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ .statusHeader {
+ width: 4em;
+ }
+ .keyHeader {
+ width: 7.5em;
+ }
+ #viewKeyOverlay {
+ padding: var(--spacing-xxl);
+ width: 50em;
+ }
+ .publicKey {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-mono);
+ line-height: var(--line-height-mono);
+ overflow-x: scroll;
+ overflow-wrap: break-word;
+ width: 30em;
+ }
+ .closeButton {
+ bottom: 2em;
+ position: absolute;
+ right: 2em;
+ }
+ #existing {
+ margin-bottom: var(--spacing-l);
+ }
+ #existing .commentColumn {
+ min-width: 27em;
+ width: auto;
+ }
+ </style>
+ <div class="gr-form-styles">
+ <fieldset id="existing">
+ <table>
+ <thead>
+ <tr>
+ <th class="commentColumn">Comment</th>
+ <th class="statusHeader">Status</th>
+ <th class="keyHeader">Public key</th>
+ <th></th>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <template is="dom-repeat" items="[[_keys]]" as="key">
<tr>
- <th class="commentColumn">Comment</th>
- <th class="statusHeader">Status</th>
- <th class="keyHeader">Public key</th>
- <th></th>
- <th></th>
+ <td class="commentColumn">[[key.comment]]</td>
+ <td>[[_getStatusLabel(key.valid)]]</td>
+ <td>
+ <gr-button link="" on-click="_showKey" data-index$="[[index]]"
+ >Click to View</gr-button
+ >
+ </td>
+ <td>
+ <gr-copy-clipboard
+ has-tooltip=""
+ button-title="Copy SSH public key to clipboard"
+ hide-input=""
+ text="[[key.ssh_public_key]]"
+ >
+ </gr-copy-clipboard>
+ </td>
+ <td>
+ <gr-button
+ link=""
+ data-index$="[[index]]"
+ on-click="_handleDeleteKey"
+ >Delete</gr-button
+ >
+ </td>
</tr>
- </thead>
- <tbody>
- <template is="dom-repeat" items="[[_keys]]" as="key">
- <tr>
- <td class="commentColumn">[[key.comment]]</td>
- <td>[[_getStatusLabel(key.valid)]]</td>
- <td>
- <gr-button link="" on-click="_showKey" data-index\$="[[index]]">Click to View</gr-button>
- </td>
- <td>
- <gr-copy-clipboard has-tooltip="" button-title="Copy SSH public key to clipboard" hide-input="" text="[[key.ssh_public_key]]">
- </gr-copy-clipboard>
- </td>
- <td>
- <gr-button link="" data-index\$="[[index]]" on-click="_handleDeleteKey">Delete</gr-button>
- </td>
- </tr>
- </template>
- </tbody>
- </table>
- <gr-overlay id="viewKeyOverlay" with-backdrop="">
- <fieldset>
- <section>
- <span class="title">Algorithm</span>
- <span class="value">[[_keyToView.algorithm]]</span>
- </section>
- <section>
- <span class="title">Public key</span>
- <span class="value publicKey">[[_keyToView.encoded_key]]</span>
- </section>
- <section>
- <span class="title">Comment</span>
- <span class="value">[[_keyToView.comment]]</span>
- </section>
- </fieldset>
- <gr-button class="closeButton" on-click="_closeOverlay">Close</gr-button>
- </gr-overlay>
- <gr-button on-click="save" disabled\$="[[!hasUnsavedChanges]]">Save changes</gr-button>
- </fieldset>
- <fieldset>
- <section>
- <span class="title">New SSH key</span>
- <span class="value">
- <iron-autogrow-textarea id="newKey" autocomplete="on" bind-value="{{_newKey}}" placeholder="New SSH Key"></iron-autogrow-textarea>
- </span>
- </section>
- <gr-button id="addButton" link="" disabled\$="[[_computeAddButtonDisabled(_newKey)]]" on-click="_handleAddKey">Add new SSH key</gr-button>
- </fieldset>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </template>
+ </tbody>
+ </table>
+ <gr-overlay id="viewKeyOverlay" with-backdrop="">
+ <fieldset>
+ <section>
+ <span class="title">Algorithm</span>
+ <span class="value">[[_keyToView.algorithm]]</span>
+ </section>
+ <section>
+ <span class="title">Public key</span>
+ <span class="value publicKey">[[_keyToView.encoded_key]]</span>
+ </section>
+ <section>
+ <span class="title">Comment</span>
+ <span class="value">[[_keyToView.comment]]</span>
+ </section>
+ </fieldset>
+ <gr-button class="closeButton" on-click="_closeOverlay"
+ >Close</gr-button
+ >
+ </gr-overlay>
+ <gr-button on-click="save" disabled$="[[!hasUnsavedChanges]]"
+ >Save changes</gr-button
+ >
+ </fieldset>
+ <fieldset>
+ <section>
+ <span class="title">New SSH key</span>
+ <span class="value">
+ <iron-autogrow-textarea
+ id="newKey"
+ autocomplete="on"
+ bind-value="{{_newKey}}"
+ placeholder="New SSH Key"
+ ></iron-autogrow-textarea>
+ </span>
+ </section>
+ <gr-button
+ id="addButton"
+ link=""
+ disabled$="[[_computeAddButtonDisabled(_newKey)]]"
+ on-click="_handleAddKey"
+ >Add new SSH key</gr-button
+ >
+ </fieldset>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor_html.js b/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor_html.js
index bc381e0..b1ca653 100644
--- a/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor_html.js
+++ b/polygerrit-ui/app/elements/settings/gr-watched-projects-editor/gr-watched-projects-editor_html.js
@@ -17,77 +17,108 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- #watchedProjects .notifType {
- text-align: center;
- padding: 0 var(--spacing-s);
- }
- .notifControl {
- cursor: pointer;
- text-align: center;
- }
- .notifControl:hover {
- outline: 1px solid var(--border-color);
- }
- .projectFilter {
- color: var(--deemphasized-text-color);
- font-style: italic;
- margin-left: var(--spacing-l);
- }
- .newFilterInput {
- width: 100%;
- }
- </style>
- <div class="gr-form-styles">
- <table id="watchedProjects">
- <thead>
- <tr>
- <th>Repo</th>
- <template is="dom-repeat" items="[[_getTypes()]]">
- <th class="notifType">[[item.name]]</th>
- </template>
- <th></th>
- </tr>
- </thead>
- <tbody>
- <template is="dom-repeat" items="[[_projects]]" as="project" index-as="projectIndex">
- <tr>
- <td>
- [[project.project]]
- <template is="dom-if" if="[[project.filter]]">
- <div class="projectFilter">[[project.filter]]</div>
- </template>
- </td>
- <template is="dom-repeat" items="[[_getTypes()]]" as="type">
- <td class="notifControl" on-click="_handleNotifCellClick">
- <input type="checkbox" data-index\$="[[projectIndex]]" data-key\$="[[type.key]]" on-change="_handleCheckboxChange" checked\$="[[_computeCheckboxChecked(project, type.key)]]">
- </td>
- </template>
- <td>
- <gr-button link="" data-index\$="[[projectIndex]]" on-click="_handleRemoveProject">Delete</gr-button>
- </td>
- </tr>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ #watchedProjects .notifType {
+ text-align: center;
+ padding: 0 var(--spacing-s);
+ }
+ .notifControl {
+ cursor: pointer;
+ text-align: center;
+ }
+ .notifControl:hover {
+ outline: 1px solid var(--border-color);
+ }
+ .projectFilter {
+ color: var(--deemphasized-text-color);
+ font-style: italic;
+ margin-left: var(--spacing-l);
+ }
+ .newFilterInput {
+ width: 100%;
+ }
+ </style>
+ <div class="gr-form-styles">
+ <table id="watchedProjects">
+ <thead>
+ <tr>
+ <th>Repo</th>
+ <template is="dom-repeat" items="[[_getTypes()]]">
+ <th class="notifType">[[item.name]]</th>
</template>
- </tbody>
- <tfoot>
+ <th></th>
+ </tr>
+ </thead>
+ <tbody>
+ <template
+ is="dom-repeat"
+ items="[[_projects]]"
+ as="project"
+ index-as="projectIndex"
+ >
<tr>
- <th>
- <gr-autocomplete id="newProject" query="[[_query]]" threshold="1" allow-non-suggested-values="" tab-complete="" placeholder="Repo"></gr-autocomplete>
- </th>
- <th colspan\$="[[_getTypeCount()]]">
- <iron-input class="newFilterInput" placeholder="branch:name, or other search expression">
- <input id="newFilter" class="newFilterInput" is="iron-input" placeholder="branch:name, or other search expression">
- </iron-input>
- </th>
- <th>
- <gr-button link="" on-click="_handleAddProject">Add</gr-button>
- </th>
+ <td>
+ [[project.project]]
+ <template is="dom-if" if="[[project.filter]]">
+ <div class="projectFilter">[[project.filter]]</div>
+ </template>
+ </td>
+ <template is="dom-repeat" items="[[_getTypes()]]" as="type">
+ <td class="notifControl" on-click="_handleNotifCellClick">
+ <input
+ type="checkbox"
+ data-index$="[[projectIndex]]"
+ data-key$="[[type.key]]"
+ on-change="_handleCheckboxChange"
+ checked$="[[_computeCheckboxChecked(project, type.key)]]"
+ />
+ </td>
+ </template>
+ <td>
+ <gr-button
+ link=""
+ data-index$="[[projectIndex]]"
+ on-click="_handleRemoveProject"
+ >Delete</gr-button
+ >
+ </td>
</tr>
- </tfoot>
- </table>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </template>
+ </tbody>
+ <tfoot>
+ <tr>
+ <th>
+ <gr-autocomplete
+ id="newProject"
+ query="[[_query]]"
+ threshold="1"
+ allow-non-suggested-values=""
+ tab-complete=""
+ placeholder="Repo"
+ ></gr-autocomplete>
+ </th>
+ <th colspan$="[[_getTypeCount()]]">
+ <iron-input
+ class="newFilterInput"
+ placeholder="branch:name, or other search expression"
+ >
+ <input
+ id="newFilter"
+ class="newFilterInput"
+ is="iron-input"
+ placeholder="branch:name, or other search expression"
+ />
+ </iron-input>
+ </th>
+ <th>
+ <gr-button link="" on-click="_handleAddProject">Add</gr-button>
+ </th>
+ </tr>
+ </tfoot>
+ </table>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip_html.js b/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip_html.js
index cfa0243..96e0160 100644
--- a/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-account-chip/gr-account-chip_html.js
@@ -17,77 +17,88 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- overflow: hidden;
- }
- .container {
- align-items: center;
- background: var(--chip-background-color);
- border-radius: .75em;
- display: inline-flex;
- padding: 0 var(--spacing-m);
- }
- :host([show-avatar]) .container {
- padding-left: 0;
- }
- gr-button.remove {
- --gr-remove-button-style: {
- border: 0;
- color: var(--deemphasized-text-color);
- font-weight: var(--font-weight-normal);
- height: .6em;
- line-height: 10px;
- margin-left: var(--spacing-xs);
- padding: 0;
- text-decoration: none;
- }
- }
-
- gr-button.remove:hover,
- gr-button.remove:focus {
- --gr-button: {
- @apply --gr-remove-button-style;
- color: #333;
- }
- }
- gr-button.remove {
- --gr-button: {
- @apply --gr-remove-button-style;
- }
- }
- :host:focus {
- border-color: transparent;
- box-shadow: none;
- outline: none;
- }
- :host:focus .container,
- :host:focus gr-button {
- background: #ccc;
- }
- .transparentBackground,
- gr-button.transparentBackground {
- background-color: transparent;
+ <style include="shared-styles">
+ :host {
+ display: block;
+ overflow: hidden;
+ }
+ .container {
+ align-items: center;
+ background: var(--chip-background-color);
+ border-radius: 0.75em;
+ display: inline-flex;
+ padding: 0 var(--spacing-m);
+ }
+ :host([show-avatar]) .container {
+ padding-left: 0;
+ }
+ gr-button.remove {
+ --gr-remove-button-style: {
+ border: 0;
+ color: var(--deemphasized-text-color);
+ font-weight: var(--font-weight-normal);
+ height: 0.6em;
+ line-height: 10px;
+ margin-left: var(--spacing-xs);
padding: 0;
+ text-decoration: none;
}
- :host([disabled]) {
- opacity: .6;
- pointer-events: none;
+ }
+
+ gr-button.remove:hover,
+ gr-button.remove:focus {
+ --gr-button: {
+ @apply --gr-remove-button-style;
+ color: #333;
}
- iron-icon {
- height: 1.2rem;
- width: 1.2rem;
+ }
+ gr-button.remove {
+ --gr-button: {
+ @apply --gr-remove-button-style;
}
- </style>
- <div class\$="container [[_getBackgroundClass(transparentBackground)]]">
- <gr-account-link account="[[account]]"
- show-attention="[[showAttention]]"
- voteable-text="[[voteableText]]">
- </gr-account-link>
- <gr-button id="remove" link="" hidden\$="[[!removable]]" hidden="" tabindex="-1" aria-label="Remove" class\$="remove [[_getBackgroundClass(transparentBackground)]]" on-click="_handleRemoveTap">
- <iron-icon icon="gr-icons:close"></iron-icon>
- </gr-button>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ }
+ :host:focus {
+ border-color: transparent;
+ box-shadow: none;
+ outline: none;
+ }
+ :host:focus .container,
+ :host:focus gr-button {
+ background: #ccc;
+ }
+ .transparentBackground,
+ gr-button.transparentBackground {
+ background-color: transparent;
+ padding: 0;
+ }
+ :host([disabled]) {
+ opacity: 0.6;
+ pointer-events: none;
+ }
+ iron-icon {
+ height: 1.2rem;
+ width: 1.2rem;
+ }
+ </style>
+ <div class$="container [[_getBackgroundClass(transparentBackground)]]">
+ <gr-account-link
+ account="[[account]]"
+ show-attention="[[showAttention]]"
+ voteable-text="[[voteableText]]"
+ >
+ </gr-account-link>
+ <gr-button
+ id="remove"
+ link=""
+ hidden$="[[!removable]]"
+ hidden=""
+ tabindex="-1"
+ aria-label="Remove"
+ class$="remove [[_getBackgroundClass(transparentBackground)]]"
+ on-click="_handleRemoveTap"
+ >
+ <iron-icon icon="gr-icons:close"></iron-icon>
+ </gr-button>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-account-entry/gr-account-entry_html.js b/polygerrit-ui/app/elements/shared/gr-account-entry/gr-account-entry_html.js
index 281526d..afd427a 100644
--- a/polygerrit-ui/app/elements/shared/gr-account-entry/gr-account-entry_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-account-entry/gr-account-entry_html.js
@@ -17,13 +17,25 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- gr-autocomplete {
- display: inline-block;
- flex: 1;
- overflow: hidden;
- }
- </style>
- <gr-autocomplete id="input" borderless="[[borderless]]" placeholder="[[placeholder]]" threshold="[[suggestFrom]]" query="[[querySuggestions]]" allow-non-suggested-values="[[allowAnyInput]]" on-commit="_handleInputCommit" clear-on-commit="" warn-uncommitted="" text="{{_inputText}}" vertical-offset="24">
- </gr-autocomplete>
+ <style include="shared-styles">
+ gr-autocomplete {
+ display: inline-block;
+ flex: 1;
+ overflow: hidden;
+ }
+ </style>
+ <gr-autocomplete
+ id="input"
+ borderless="[[borderless]]"
+ placeholder="[[placeholder]]"
+ threshold="[[suggestFrom]]"
+ query="[[querySuggestions]]"
+ allow-non-suggested-values="[[allowAnyInput]]"
+ on-commit="_handleInputCommit"
+ clear-on-commit=""
+ warn-uncommitted=""
+ text="{{_inputText}}"
+ vertical-offset="24"
+ >
+ </gr-autocomplete>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label_html.js b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label_html.js
index f642af3..ba2d9cb 100644
--- a/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-account-label/gr-account-label_html.js
@@ -17,69 +17,73 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: inline;
- position: relative;
- }
- :host::after {
- content: var(--account-label-suffix);
- }
- :host(:not([blurred])) .overlay {
- display: none;
- }
- .overlay {
- position: absolute;
- pointer-events: none;
- height: var(--line-height-normal);
- right: 0;
- left: 0;
- background-color: var(--background-color-primary);
- opacity: 0.5;
- }
- gr-avatar {
- height: var(--line-height-normal);
- width: var(--line-height-normal);
- vertical-align: top;
- }
- .text {
- @apply --gr-account-label-text-style;
- }
- .text:hover {
- @apply --gr-account-label-text-hover-style;
- }
- iron-icon.attention {
- vertical-align: top;
- }
- iron-icon.status {
- width: 14px;
- height: 14px;
- vertical-align: top;
- position: relative;
- top: 2px;
- }
- </style>
- <div class="overlay"></div>
- <span>
- <gr-hovercard-account attention="[[showAttention]]"
- account="[[account]]"
- voteable-text="[[voteableText]]">
- </gr-hovercard-account>
- <template is="dom-if" if="[[showAttention]]">
- <iron-icon class="attention" icon="gr-icons:attention"></iron-icon><!--
- --></template><!--
- --><template is="dom-if" if="[[!hideAvatar]]"><!--
+ <style include="shared-styles">
+ :host {
+ display: inline;
+ position: relative;
+ }
+ :host::after {
+ content: var(--account-label-suffix);
+ }
+ :host(:not([blurred])) .overlay {
+ display: none;
+ }
+ .overlay {
+ position: absolute;
+ pointer-events: none;
+ height: var(--line-height-normal);
+ right: 0;
+ left: 0;
+ background-color: var(--background-color-primary);
+ opacity: 0.5;
+ }
+ gr-avatar {
+ height: var(--line-height-normal);
+ width: var(--line-height-normal);
+ vertical-align: top;
+ }
+ .text {
+ @apply --gr-account-label-text-style;
+ }
+ .text:hover {
+ @apply --gr-account-label-text-hover-style;
+ }
+ iron-icon.attention {
+ vertical-align: top;
+ }
+ iron-icon.status {
+ width: 14px;
+ height: 14px;
+ vertical-align: top;
+ position: relative;
+ top: 2px;
+ }
+ </style>
+ <div class="overlay"></div>
+ <span>
+ <gr-hovercard-account
+ attention="[[showAttention]]"
+ account="[[account]]"
+ voteable-text="[[voteableText]]"
+ >
+ </gr-hovercard-account>
+ <template is="dom-if" if="[[showAttention]]">
+ <iron-icon class="attention" icon="gr-icons:attention"></iron-icon
+ ><!--
+ --></template
+ ><!--
+ --><template is="dom-if" if="[[!hideAvatar]]"
+ ><!--
--><gr-avatar account="[[account]]" image-size="32"></gr-avatar>
- </template>
- <span class="text">
- <span class="name">
- [[_computeName(account, _serverConfig)]]</span>
- <template is="dom-if" if="[[!hideStatus]]">
- <template is="dom-if" if="[[account.status]]">
- <iron-icon class="status" icon="gr-icons:calendar"></iron-icon>
- </template>
+ </template>
+ <span class="text">
+ <span class="name"> [[_computeName(account, _serverConfig)]]</span>
+ <template is="dom-if" if="[[!hideStatus]]">
+ <template is="dom-if" if="[[account.status]]">
+ <iron-icon class="status" icon="gr-icons:calendar"></iron-icon>
</template>
- </span>
+ </template>
</span>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </span>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-account-link/gr-account-link_html.js b/polygerrit-ui/app/elements/shared/gr-account-link/gr-account-link_html.js
index 422d004..17e7f49 100644
--- a/polygerrit-ui/app/elements/shared/gr-account-link/gr-account-link_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-account-link/gr-account-link_html.js
@@ -17,36 +17,38 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: inline-block;
- /* Setting this really high, so all the following rules don't change
+ <style include="shared-styles">
+ :host {
+ display: inline-block;
+ /* Setting this really high, so all the following rules don't change
anything, only if --account-max-length is actually set to something
smaller like 20ch. */
- max-width: var(--account-max-length, 500px);
- overflow: hidden;
- text-overflow: ellipsis;
- vertical-align: top;
- white-space: nowrap;
+ max-width: var(--account-max-length, 500px);
+ overflow: hidden;
+ text-overflow: ellipsis;
+ vertical-align: top;
+ white-space: nowrap;
+ }
+ a {
+ color: var(--primary-text-color);
+ text-decoration: none;
+ }
+ gr-account-label {
+ --gr-account-label-text-hover-style: {
+ text-decoration: underline;
}
- a {
- color: var(--primary-text-color);
- text-decoration: none;
- }
- gr-account-label {
- --gr-account-label-text-hover-style: {
- text-decoration: underline;
- };
- }
- </style>
- <span>
- <a href\$="[[_computeOwnerLink(account)]]" tabindex="-1">
- <gr-account-label show-attention="[[showAttention]]"
- hide-avatar="[[hideAvatar]]"
- hide-status="[[hideStatus]]"
- account="[[account]]"
- voteable-text="[[voteableText]]">
- </gr-account-label>
- </a>
- </span>
+ }
+ </style>
+ <span>
+ <a href$="[[_computeOwnerLink(account)]]" tabindex="-1">
+ <gr-account-label
+ show-attention="[[showAttention]]"
+ hide-avatar="[[hideAvatar]]"
+ hide-status="[[hideStatus]]"
+ account="[[account]]"
+ voteable-text="[[voteableText]]"
+ >
+ </gr-account-label>
+ </a>
+ </span>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list_html.js b/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list_html.js
index 2438bc1..6fee9f3 100644
--- a/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-account-list/gr-account-list_html.js
@@ -17,41 +17,57 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- gr-account-chip {
- display: inline-block;
- margin: var(--spacing-xs) var(--spacing-xs) var(--spacing-xs) 0;
- }
- gr-account-entry {
- display: flex;
- flex: 1;
- min-width: 10em;
- margin: var(--spacing-xs) var(--spacing-xs) var(--spacing-xs) 0;
- }
- .group {
- --account-label-suffix: ' (group)';
- }
- .pending-add {
- font-style: italic;
- }
- .list {
- align-items: center;
- display: flex;
- flex-wrap: wrap;
- @apply --account-list-style;
- }
- </style>
- <!--
+ <style include="shared-styles">
+ gr-account-chip {
+ display: inline-block;
+ margin: var(--spacing-xs) var(--spacing-xs) var(--spacing-xs) 0;
+ }
+ gr-account-entry {
+ display: flex;
+ flex: 1;
+ min-width: 10em;
+ margin: var(--spacing-xs) var(--spacing-xs) var(--spacing-xs) 0;
+ }
+ .group {
+ --account-label-suffix: ' (group)';
+ }
+ .pending-add {
+ font-style: italic;
+ }
+ .list {
+ align-items: center;
+ display: flex;
+ flex-wrap: wrap;
+ @apply --account-list-style;
+ }
+ </style>
+ <!--
NOTE(Issue 6419): Nest the inner dom-repeat template in a div rather than
as a direct child of the dom-module's template.
-->
- <div class="list">
- <template id="chips" is="dom-repeat" items="[[accounts]]" as="account">
- <gr-account-chip account="[[account]]" class\$="[[_computeChipClass(account)]]" data-account-id\$="[[account._account_id]]" removable="[[_computeRemovable(account, readonly)]]" on-keydown="_handleChipKeydown" tabindex="-1">
- </gr-account-chip>
- </template>
- </div>
- <gr-account-entry borderless="" hidden\$="[[_computeEntryHidden(maxCount, accounts.*, readonly)]]" id="entry" placeholder="[[placeholder]]" on-add="_handleAdd" on-input-keydown="_handleInputKeydown" allow-any-input="[[allowAnyInput]]" query-suggestions="[[_querySuggestions]]">
- </gr-account-entry>
- <slot></slot>
+ <div class="list">
+ <template id="chips" is="dom-repeat" items="[[accounts]]" as="account">
+ <gr-account-chip
+ account="[[account]]"
+ class$="[[_computeChipClass(account)]]"
+ data-account-id$="[[account._account_id]]"
+ removable="[[_computeRemovable(account, readonly)]]"
+ on-keydown="_handleChipKeydown"
+ tabindex="-1"
+ >
+ </gr-account-chip>
+ </template>
+ </div>
+ <gr-account-entry
+ borderless=""
+ hidden$="[[_computeEntryHidden(maxCount, accounts.*, readonly)]]"
+ id="entry"
+ placeholder="[[placeholder]]"
+ on-add="_handleAdd"
+ on-input-keydown="_handleInputKeydown"
+ allow-any-input="[[allowAnyInput]]"
+ query-suggestions="[[_querySuggestions]]"
+ >
+ </gr-account-entry>
+ <slot></slot>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-alert/gr-alert_html.js b/polygerrit-ui/app/elements/shared/gr-alert/gr-alert_html.js
index 1190516..e9f386d 100644
--- a/polygerrit-ui/app/elements/shared/gr-alert/gr-alert_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-alert/gr-alert_html.js
@@ -17,27 +17,27 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /**
+ <style include="shared-styles">
+ /**
* ALERT: DO NOT ADD TRANSITION PROPERTIES WITHOUT PROPERLY UNDERSTANDING
* HOW THEY ARE USED IN THE CODE.
*/
- :host([toast]) {
- background-color: var(--tooltip-background-color);
- bottom: 1.25rem;
- border-radius: var(--border-radius);
- box-shadow: var(--elevation-level-2);
- color: var(--view-background-color);
- left: 1.25rem;
- position: fixed;
- transform: translateY(5rem);
- transition: transform var(--gr-alert-transition-duration, 80ms) ease-out;
- z-index: 1000;
- }
- :host([shown]) {
- transform: translateY(0);
- }
- /**
+ :host([toast]) {
+ background-color: var(--tooltip-background-color);
+ bottom: 1.25rem;
+ border-radius: var(--border-radius);
+ box-shadow: var(--elevation-level-2);
+ color: var(--view-background-color);
+ left: 1.25rem;
+ position: fixed;
+ transform: translateY(5rem);
+ transition: transform var(--gr-alert-transition-duration, 80ms) ease-out;
+ z-index: 1000;
+ }
+ :host([shown]) {
+ transform: translateY(0);
+ }
+ /**
* NOTE: To avoid style being overwritten by outside of the shadow DOM
* (as outside styles always win), .content-wrapper is introduced as a
* wrapper around main content to have better encapsulation, styles that
@@ -45,29 +45,35 @@
* In this case, \`padding:0px\` is defined in main.css for all elements
* with the universal selector: *.
*/
- .content-wrapper {
- padding: var(--spacing-l) var(--spacing-xl);
+ .content-wrapper {
+ padding: var(--spacing-l) var(--spacing-xl);
+ }
+ .text {
+ color: var(--tooltip-text-color);
+ display: inline-block;
+ max-height: 10rem;
+ max-width: 80vw;
+ vertical-align: bottom;
+ word-break: break-all;
+ }
+ .action {
+ color: var(--link-color);
+ font-weight: var(--font-weight-bold);
+ margin-left: var(--spacing-l);
+ text-decoration: none;
+ --gr-button: {
+ padding: 0;
}
- .text {
- color: var(--tooltip-text-color);
- display: inline-block;
- max-height: 10rem;
- max-width: 80vw;
- vertical-align: bottom;
- word-break: break-all;
- }
- .action {
- color: var(--link-color);
- font-weight: var(--font-weight-bold);
- margin-left: var(--spacing-l);
- text-decoration: none;
- --gr-button: {
- padding: 0;
- }
- }
- </style>
- <div class="content-wrapper">
- <span class="text">[[text]]</span>
- <gr-button link="" class="action" hidden\$="[[_hideActionButton]]" on-click="_handleActionTap">[[actionText]]</gr-button>
- </div>
+ }
+ </style>
+ <div class="content-wrapper">
+ <span class="text">[[text]]</span>
+ <gr-button
+ link=""
+ class="action"
+ hidden$="[[_hideActionButton]]"
+ on-click="_handleActionTap"
+ >[[actionText]]</gr-button
+ >
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown_html.js b/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown_html.js
index 711315d..b31af73 100644
--- a/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-autocomplete-dropdown/gr-autocomplete-dropdown_html.js
@@ -17,64 +17,86 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- z-index: 100;
- }
- :host([is-hidden]) {
- display: none;
- }
- ul {
- list-style: none;
- }
- li {
- border-bottom: 1px solid var(--border-color);
- cursor: pointer;
- display: flex;
- justify-content: space-between;
- padding: var(--spacing-m) var(--spacing-l);
- }
- li:last-of-type {
- border: none;
- }
- li:focus {
- outline: none;
- }
- li:hover {
- background-color: var(--hover-background-color);
- }
- li.selected {
- background-color: var(--selection-background-color);
- }
+ <style include="shared-styles">
+ :host {
+ z-index: 100;
+ }
+ :host([is-hidden]) {
+ display: none;
+ }
+ ul {
+ list-style: none;
+ }
+ li {
+ border-bottom: 1px solid var(--border-color);
+ cursor: pointer;
+ display: flex;
+ justify-content: space-between;
+ padding: var(--spacing-m) var(--spacing-l);
+ }
+ li:last-of-type {
+ border: none;
+ }
+ li:focus {
+ outline: none;
+ }
+ li:hover {
+ background-color: var(--hover-background-color);
+ }
+ li.selected {
+ background-color: var(--selection-background-color);
+ }
+ .dropdown-content {
+ background: var(--dropdown-background-color);
+ box-shadow: var(--elevation-level-2);
+ border-radius: var(--border-radius);
+ max-height: 50vh;
+ overflow: auto;
+ }
+ @media only screen and (max-height: 35em) {
.dropdown-content {
- background: var(--dropdown-background-color);
- box-shadow: var(--elevation-level-2);
- border-radius: var(--border-radius);
- max-height: 50vh;
- overflow: auto;
+ max-height: 80vh;
}
- @media only screen and (max-height: 35em) {
- .dropdown-content {
- max-height: 80vh;
- }
- }
- .label {
- color: var(--deemphasized-text-color);
- padding-left: var(--spacing-l);
- }
- .hide {
- display: none;
- }
- </style>
- <div class="dropdown-content" slot="dropdown-content" id="suggestions" role="listbox">
- <ul>
- <template is="dom-repeat" items="[[suggestions]]">
- <li data-index\$="[[index]]" data-value\$="[[item.dataValue]]" tabindex="-1" aria-label\$="[[item.name]]" class="autocompleteOption" role="option" on-click="_handleClickItem">
- <span>[[item.text]]</span>
- <span class\$="label [[_computeLabelClass(item)]]">[[item.label]]</span>
- </li>
- </template>
- </ul>
- </div>
- <gr-cursor-manager id="cursor" index="{{index}}" cursor-target-class="selected" scroll-behavior="never" focus-on-move="" stops="[[_suggestionEls]]"></gr-cursor-manager>
+ }
+ .label {
+ color: var(--deemphasized-text-color);
+ padding-left: var(--spacing-l);
+ }
+ .hide {
+ display: none;
+ }
+ </style>
+ <div
+ class="dropdown-content"
+ slot="dropdown-content"
+ id="suggestions"
+ role="listbox"
+ >
+ <ul>
+ <template is="dom-repeat" items="[[suggestions]]">
+ <li
+ data-index$="[[index]]"
+ data-value$="[[item.dataValue]]"
+ tabindex="-1"
+ aria-label$="[[item.name]]"
+ class="autocompleteOption"
+ role="option"
+ on-click="_handleClickItem"
+ >
+ <span>[[item.text]]</span>
+ <span class$="label [[_computeLabelClass(item)]]"
+ >[[item.label]]</span
+ >
+ </li>
+ </template>
+ </ul>
+ </div>
+ <gr-cursor-manager
+ id="cursor"
+ index="{{index}}"
+ cursor-target-class="selected"
+ scroll-behavior="never"
+ focus-on-move=""
+ stops="[[_suggestionEls]]"
+ ></gr-cursor-manager>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete_html.js b/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete_html.js
index 11726d9..eae8741 100644
--- a/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-autocomplete/gr-autocomplete_html.js
@@ -17,71 +17,95 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- .searchIcon {
- display: none;
- }
- .searchIcon.showSearchIcon {
- display: inline-block;
- }
- iron-icon {
- margin: 0 var(--spacing-xs);
- vertical-align: top;
- }
- paper-input.borderless {
- border: none;
+ <style include="shared-styles">
+ .searchIcon {
+ display: none;
+ }
+ .searchIcon.showSearchIcon {
+ display: inline-block;
+ }
+ iron-icon {
+ margin: 0 var(--spacing-xs);
+ vertical-align: top;
+ }
+ paper-input.borderless {
+ border: none;
+ padding: 0;
+ }
+ paper-input {
+ background-color: var(--view-background-color);
+ color: var(--primary-text-color);
+ border: 1px solid var(--border-color);
+ border-radius: var(--border-radius);
+ padding: var(--spacing-s);
+ --paper-input-container: {
padding: 0;
}
- paper-input {
- background-color: var(--view-background-color);
- color: var(--primary-text-color);
- border: 1px solid var(--border-color);
- border-radius: var(--border-radius);
- padding: var(--spacing-s);
- --paper-input-container: {
- padding: 0;
- };
- --paper-input-container-input: {
- font-size: var(--font-size-normal);
- line-height: var(--line-height-normal);
- };
- /* This is a hack for not being able to set height:0 on the underline
+ --paper-input-container-input: {
+ font-size: var(--font-size-normal);
+ line-height: var(--line-height-normal);
+ }
+ /* This is a hack for not being able to set height:0 on the underline
of a paper-input 2.2.3 element. All the underline fixes below only
actually work in 3.x.x, so the height must be adjusted directly as
a workaround until we are on Polymer 3. */
- height: var(--line-height-normal);
- --paper-input-container-underline-height: 0;
- --paper-input-container-underline-wrapper-height: 0;
- --paper-input-container-underline-focus-height: 0;
- --paper-input-container-underline-legacy-height: 0;
- --paper-input-container-underline: {
- height: 0;
- display: none;
- };
- --paper-input-container-underline-focus: {
- height: 0;
- display: none;
- };
- --paper-input-container-underline-disabled: {
- height: 0;
- display: none;
- };
+ height: var(--line-height-normal);
+ --paper-input-container-underline-height: 0;
+ --paper-input-container-underline-wrapper-height: 0;
+ --paper-input-container-underline-focus-height: 0;
+ --paper-input-container-underline-legacy-height: 0;
+ --paper-input-container-underline: {
+ height: 0;
+ display: none;
}
- paper-input.warnUncommitted {
- --paper-input-container-input: {
- color: var(--error-text-color);
- font-size: inherit;
- }
+ --paper-input-container-underline-focus: {
+ height: 0;
+ display: none;
}
- </style>
- <paper-input no-label-float="" id="input" class\$="[[_computeClass(borderless)]]" disabled\$="[[disabled]]" value="{{text}}" placeholder="[[placeholder]]" on-keydown="_handleKeydown" on-focus="_onInputFocus" on-blur="_onInputBlur" autocomplete="off">
-
- <!-- prefix as attribute is required to for polymer 1 -->
- <div slot="prefix" prefix="">
- <iron-icon icon="gr-icons:search" class\$="searchIcon [[_computeShowSearchIconClass(showSearchIcon)]]">
- </iron-icon>
- </div>
- </paper-input>
- <gr-autocomplete-dropdown vertical-align="top" vertical-offset="[[verticalOffset]]" horizontal-align="left" id="suggestions" on-item-selected="_handleItemSelect" on-keydown="_handleKeydown" suggestions="[[_suggestions]]" role="listbox" index="[[_index]]" position-target="[[_inputElement]]">
- </gr-autocomplete-dropdown>
+ --paper-input-container-underline-disabled: {
+ height: 0;
+ display: none;
+ }
+ }
+ paper-input.warnUncommitted {
+ --paper-input-container-input: {
+ color: var(--error-text-color);
+ font-size: inherit;
+ }
+ }
+ </style>
+ <paper-input
+ no-label-float=""
+ id="input"
+ class$="[[_computeClass(borderless)]]"
+ disabled$="[[disabled]]"
+ value="{{text}}"
+ placeholder="[[placeholder]]"
+ on-keydown="_handleKeydown"
+ on-focus="_onInputFocus"
+ on-blur="_onInputBlur"
+ autocomplete="off"
+ >
+ <!-- prefix as attribute is required to for polymer 1 -->
+ <div slot="prefix" prefix="">
+ <iron-icon
+ icon="gr-icons:search"
+ class$="searchIcon [[_computeShowSearchIconClass(showSearchIcon)]]"
+ >
+ </iron-icon>
+ </div>
+ </paper-input>
+ <gr-autocomplete-dropdown
+ vertical-align="top"
+ vertical-offset="[[verticalOffset]]"
+ horizontal-align="left"
+ id="suggestions"
+ on-item-selected="_handleItemSelect"
+ on-keydown="_handleKeydown"
+ suggestions="[[_suggestions]]"
+ role="listbox"
+ index="[[_index]]"
+ position-target="[[_inputElement]]"
+ >
+ </gr-autocomplete-dropdown>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar_html.js b/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar_html.js
index be4c350..cc8a42f 100644
--- a/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-avatar/gr-avatar_html.js
@@ -17,13 +17,13 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: inline-block;
- border-radius: 50%;
- background-size: cover;
- background-color: var(--avatar-background-color, #f1f2f3);
- }
- </style>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <style include="shared-styles">
+ :host {
+ display: inline-block;
+ border-radius: 50%;
+ background-size: cover;
+ background-color: var(--avatar-background-color, #f1f2f3);
+ }
+ </style>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-button/gr-button_html.js b/polygerrit-ui/app/elements/shared/gr-button/gr-button_html.js
index ad5c00d..db3b880 100644
--- a/polygerrit-ui/app/elements/shared/gr-button/gr-button_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-button/gr-button_html.js
@@ -17,92 +17,93 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* general styles for all buttons */
- :host {
- --background-color: var(--button-background-color, var(--default-button-background-color));
- --text-color: var(--default-button-text-color);
- display: inline-block;
- position: relative;
- }
- :host([hidden]) {
- display: none;
- }
- :host([no-uppercase]) paper-button {
- text-transform: none;
- }
- paper-button {
- /* The next lines contains a copy of paper-button style.
+ <style include="shared-styles">
+ /* general styles for all buttons */
+ :host {
+ --background-color: var(
+ --button-background-color,
+ var(--default-button-background-color)
+ );
+ --text-color: var(--default-button-text-color);
+ display: inline-block;
+ position: relative;
+ }
+ :host([hidden]) {
+ display: none;
+ }
+ :host([no-uppercase]) paper-button {
+ text-transform: none;
+ }
+ paper-button {
+ /* The next lines contains a copy of paper-button style.
Without a copy, the @apply works incorrectly with Polymer 2.
@apply is deprecated and is not recommended to use. It is expected
that @apply will be replaced with the ::part CSS pseudo-element.
After replacecment copied lines can be removed.
*/
- @apply --layout-inline;
- @apply --layout-center-center;
- position: relative;
- box-sizing: border-box;
- min-width: 5.14em;
- margin: 0 0.29em;
- background: transparent;
- -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
- -webkit-tap-highlight-color: transparent;
- font: inherit;
- text-transform: uppercase;
- outline-width: 0;
- border-radius: var(--border-radius);
- -moz-user-select: none;
- -ms-user-select: none;
- -webkit-user-select: none;
- user-select: none;
- cursor: pointer;
- z-index: 0;
- padding: var(--spacing-m);
+ @apply --layout-inline;
+ @apply --layout-center-center;
+ position: relative;
+ box-sizing: border-box;
+ min-width: 5.14em;
+ margin: 0 0.29em;
+ background: transparent;
+ -webkit-tap-highlight-color: rgba(0, 0, 0, 0);
+ -webkit-tap-highlight-color: transparent;
+ font: inherit;
+ text-transform: uppercase;
+ outline-width: 0;
+ border-radius: var(--border-radius);
+ -moz-user-select: none;
+ -ms-user-select: none;
+ -webkit-user-select: none;
+ user-select: none;
+ cursor: pointer;
+ z-index: 0;
+ padding: var(--spacing-m);
- @apply --paper-font-common-base;
- @apply --paper-button;
- /* End of copy*/
+ @apply --paper-font-common-base;
+ @apply --paper-button;
+ /* End of copy*/
- /* paper-button sets this to anti-aliased, which appears different than
+ /* paper-button sets this to anti-aliased, which appears different than
bold font elsewhere on macOS. */
- -webkit-font-smoothing: initial;
- align-items: center;
- background-color: var(--background-color);
- color: var(--text-color);
- display: flex;
- font-family: inherit;
- justify-content: center;
- margin: var(--margin, 0);
- min-width: var(--border, 0);
- padding: var(--padding, 4px 8px);
- @apply --gr-button;
- }
- /* https://github.com/PolymerElements/paper-button/blob/2.x/paper-button.html */
- /* BEGIN: Copy from paper-button */
- paper-button[elevation="1"] {
- @apply --paper-material-elevation-1;
- }
- paper-button[elevation="2"] {
- @apply --paper-material-elevation-2;
- }
- paper-button[elevation="3"] {
- @apply --paper-material-elevation-3;
- }
- paper-button[elevation="4"] {
- @apply --paper-material-elevation-4;
- }
- paper-button[elevation="5"] {
- @apply --paper-material-elevation-5;
- }
- /* END: Copy from paper-button */
- paper-button:hover {
- background: linear-gradient(
- rgba(0, 0, 0, .12),
- rgba(0, 0, 0, .12)
- ), var(--background-color);
- }
+ -webkit-font-smoothing: initial;
+ align-items: center;
+ background-color: var(--background-color);
+ color: var(--text-color);
+ display: flex;
+ font-family: inherit;
+ justify-content: center;
+ margin: var(--margin, 0);
+ min-width: var(--border, 0);
+ padding: var(--padding, 4px 8px);
+ @apply --gr-button;
+ }
+ /* https://github.com/PolymerElements/paper-button/blob/2.x/paper-button.html */
+ /* BEGIN: Copy from paper-button */
+ paper-button[elevation='1'] {
+ @apply --paper-material-elevation-1;
+ }
+ paper-button[elevation='2'] {
+ @apply --paper-material-elevation-2;
+ }
+ paper-button[elevation='3'] {
+ @apply --paper-material-elevation-3;
+ }
+ paper-button[elevation='4'] {
+ @apply --paper-material-elevation-4;
+ }
+ paper-button[elevation='5'] {
+ @apply --paper-material-elevation-5;
+ }
+ /* END: Copy from paper-button */
+ paper-button:hover {
+ background: linear-gradient(rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.12)),
+ var(--background-color);
+ }
- /* Some mobile browsers treat focused element as hovered element.
+ /* Some mobile browsers treat focused element as hovered element.
As a result, element remains hovered after click (has grey background in default theme).
Use @media (hover:none) to remove background if
user's primary input mechanism can't hover over elements.
@@ -113,63 +114,64 @@
If browser doesn't support it, then the whole content of @media .. is ignored.
This is why the default behavior is placed outside of @media.
*/
- @media (hover:none) {
- paper-button:hover {
- background: transparent;
- }
+ @media (hover: none) {
+ paper-button:hover {
+ background: transparent;
}
+ }
- :host([primary]) {
- --background-color: var(--primary-button-background-color);
- --text-color: var(--primary-button-text-color);
- }
- :host([link][primary]) {
- --text-color: var(--primary-button-background-color);
- }
+ :host([primary]) {
+ --background-color: var(--primary-button-background-color);
+ --text-color: var(--primary-button-text-color);
+ }
+ :host([link][primary]) {
+ --text-color: var(--primary-button-background-color);
+ }
- /* Keep below color definition for primary so that this takes precedence
+ /* Keep below color definition for primary so that this takes precedence
when disabled. */
- :host([disabled]), :host([loading]) {
- --background-color: var(--disabled-button-background-color);
- --text-color: var(--deemphasized-text-color);
- cursor: default;
- }
+ :host([disabled]),
+ :host([loading]) {
+ --background-color: var(--disabled-button-background-color);
+ --text-color: var(--deemphasized-text-color);
+ cursor: default;
+ }
- /* Styles for link buttons specifically */
- :host([link]) {
- --background-color: transparent;
- --margin: 0;
- --padding: 5px 4px;
- }
- :host([disabled][link]),
- :host([loading][link]) {
- --background-color: transparent;
- --text-color: var(--deemphasized-text-color);
- cursor: default;
- }
+ /* Styles for link buttons specifically */
+ :host([link]) {
+ --background-color: transparent;
+ --margin: 0;
+ --padding: 5px 4px;
+ }
+ :host([disabled][link]),
+ :host([loading][link]) {
+ --background-color: transparent;
+ --text-color: var(--deemphasized-text-color);
+ cursor: default;
+ }
- /* Styles for the optional down arrow */
- :host(:not([down-arrow])) .downArrow {
- display: none;
- }
- :host([down-arrow]) .downArrow {
- border-top: .36em solid #ccc;
- border-left: .36em solid transparent;
- border-right: .36em solid transparent;
- margin-bottom: var(--spacing-xxs);
- margin-left: var(--spacing-m);
- transition: border-top-color 200ms;
- }
- :host([down-arrow]) paper-button:hover .downArrow {
- border-top-color: var(--deemphasized-text-color);
- }
- </style>
- <paper-button raised="[[!link]]" disabled="[[_disabled]]" tabindex="-1">
- <template is="dom-if" if="[[loading]]">
- <span class="loadingSpin"></span>
- </template>
- <slot></slot>
- <i class="downArrow"></i>
- </paper-button>
- <gr-reporting id="reporting"></gr-reporting>
+ /* Styles for the optional down arrow */
+ :host(:not([down-arrow])) .downArrow {
+ display: none;
+ }
+ :host([down-arrow]) .downArrow {
+ border-top: 0.36em solid #ccc;
+ border-left: 0.36em solid transparent;
+ border-right: 0.36em solid transparent;
+ margin-bottom: var(--spacing-xxs);
+ margin-left: var(--spacing-m);
+ transition: border-top-color 200ms;
+ }
+ :host([down-arrow]) paper-button:hover .downArrow {
+ border-top-color: var(--deemphasized-text-color);
+ }
+ </style>
+ <paper-button raised="[[!link]]" disabled="[[_disabled]]" tabindex="-1">
+ <template is="dom-if" if="[[loading]]">
+ <span class="loadingSpin"></span>
+ </template>
+ <slot></slot>
+ <i class="downArrow"></i>
+ </paper-button>
+ <gr-reporting id="reporting"></gr-reporting>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-change-star/gr-change-star_html.js b/polygerrit-ui/app/elements/shared/gr-change-star/gr-change-star_html.js
index a4925aa..f723717a 100644
--- a/polygerrit-ui/app/elements/shared/gr-change-star/gr-change-star_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-change-star/gr-change-star_html.js
@@ -17,21 +17,30 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- button {
- background-color: transparent;
- cursor: pointer;
- }
- iron-icon.active {
- fill: var(--link-color);
- }
- iron-icon {
- vertical-align: top;
- --iron-icon-height: var(--gr-change-star-size, var(--line-height-normal, 20px));
- --iron-icon-width: var(--gr-change-star-size, var(--line-height-normal, 20px));
- }
- </style>
- <button aria-label="Change star" on-click="toggleStar">
- <iron-icon class\$="[[_computeStarClass(change.starred)]]" icon\$="[[_computeStarIcon(change.starred)]]"></iron-icon>
- </button>
+ <style include="shared-styles">
+ button {
+ background-color: transparent;
+ cursor: pointer;
+ }
+ iron-icon.active {
+ fill: var(--link-color);
+ }
+ iron-icon {
+ vertical-align: top;
+ --iron-icon-height: var(
+ --gr-change-star-size,
+ var(--line-height-normal, 20px)
+ );
+ --iron-icon-width: var(
+ --gr-change-star-size,
+ var(--line-height-normal, 20px)
+ );
+ }
+ </style>
+ <button aria-label="Change star" on-click="toggleStar">
+ <iron-icon
+ class$="[[_computeStarClass(change.starred)]]"
+ icon$="[[_computeStarIcon(change.starred)]]"
+ ></iron-icon>
+ </button>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_html.js b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_html.js
index 1a1bc1b8..904ef1d 100644
--- a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_html.js
@@ -17,56 +17,61 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- .chip {
- border-radius: var(--border-radius);
- background-color: var(--chip-background-color);
- padding: 0 var(--spacing-m);
- white-space: nowrap;
- }
- :host(.merged) .chip {
- background-color: #5b9d52;
- color: #5b9d52;
- }
- :host(.abandoned) .chip {
- background-color: #afafaf;
- color: #afafaf;
- }
- :host(.wip) .chip {
- background-color: #8f756c;
- color: #8f756c;
- }
- :host(.private) .chip {
- background-color: #c17ccf;
- color: #c17ccf;
- }
- :host(.merge-conflict) .chip {
- background-color: #dc5c60;
- color: #dc5c60;
- }
- :host(.active) .chip {
- background-color: #29b6f6;
- color: #29b6f6;
- }
- :host(.ready-to-submit) .chip {
- background-color: #e10ca3;
- color: #e10ca3;
- }
- :host(.custom) .chip {
- background-color: #825cc2;
- color: #825cc2;
- }
- :host([flat]) .chip {
- background-color: transparent;
- padding: 0;
- }
- :host(:not([flat])) .chip {
- color: white;
- }
- </style>
- <gr-tooltip-content has-tooltip="" position-below="" title="[[tooltipText]]" max-width="40em">
- <div class="chip" aria-label\$="Label: [[status]]">
- [[_computeStatusString(status)]]
- </div>
- </gr-tooltip-content>
+ <style include="shared-styles">
+ .chip {
+ border-radius: var(--border-radius);
+ background-color: var(--chip-background-color);
+ padding: 0 var(--spacing-m);
+ white-space: nowrap;
+ }
+ :host(.merged) .chip {
+ background-color: #5b9d52;
+ color: #5b9d52;
+ }
+ :host(.abandoned) .chip {
+ background-color: #afafaf;
+ color: #afafaf;
+ }
+ :host(.wip) .chip {
+ background-color: #8f756c;
+ color: #8f756c;
+ }
+ :host(.private) .chip {
+ background-color: #c17ccf;
+ color: #c17ccf;
+ }
+ :host(.merge-conflict) .chip {
+ background-color: #dc5c60;
+ color: #dc5c60;
+ }
+ :host(.active) .chip {
+ background-color: #29b6f6;
+ color: #29b6f6;
+ }
+ :host(.ready-to-submit) .chip {
+ background-color: #e10ca3;
+ color: #e10ca3;
+ }
+ :host(.custom) .chip {
+ background-color: #825cc2;
+ color: #825cc2;
+ }
+ :host([flat]) .chip {
+ background-color: transparent;
+ padding: 0;
+ }
+ :host(:not([flat])) .chip {
+ color: white;
+ }
+ </style>
+ <gr-tooltip-content
+ has-tooltip=""
+ position-below=""
+ title="[[tooltipText]]"
+ max-width="40em"
+ >
+ <div class="chip" aria-label$="Label: [[status]]">
+ [[_computeStatusString(status)]]
+ </div>
+ </gr-tooltip-content>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_html.js b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_html.js
index 109e413..fbc18b4 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-comment-thread/gr-comment-thread_html.js
@@ -17,86 +17,138 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- font-family: var(--font-family);
- font-size: var(--font-size-normal);
- font-weight: var(--font-weight-normal);
- line-height: var(--line-height-normal);
- }
- gr-button {
- margin-left: var(--spacing-m);
- }
- gr-comment:not(:last-of-type) {
- border-bottom: 1px solid var(--comment-separator-color);
- }
- #actions {
- margin-left: auto;
- padding: var(--spacing-m);
- }
- #container {
- background-color: var(--comment-background-color);
- color: var(--comment-text-color);
- display: block;
- margin: 0 var(--spacing-s) var(--spacing-s);
- white-space: normal;
- box-shadow: var(--elevation-level-2);
- border-radius: var(--border-radius);
- /** This is required for firefox to continue the inheritance */
- -webkit-user-select: inherit;
- -moz-user-select: inherit;
- -ms-user-select: inherit;
- user-select: inherit;
- }
- #container.unresolved {
- background-color: var(--unresolved-comment-background-color);
- }
- #container.robotComment {
- background-color: var(--robot-comment-background-color);
- }
- #commentInfoContainer {
- border-top: 1px dotted var(--border-color);
- display: flex;
- }
- #unresolvedLabel {
- font-family: var(--font-family);
- margin: auto 0;
- padding: var(--spacing-m);
- }
- .pathInfo {
- display: flex;
- align-items: baseline;
- justify-content: space-between;
- padding: 0 var(--spacing-s) var(--spacing-s);
- }
- .descriptionText {
- margin-left: var(--spacing-m);
- font-style: italic;
- }
- </style>
- <template is="dom-if" if="[[showFilePath]]">
- <div class="pathInfo">
- <a href\$="[[_getDiffUrlForComment(projectName, changeNum, path, patchNum)]]">[[_computeDisplayPath(path)]]</a>
- <span class="descriptionText">Patchset [[patchNum]]</span>
- </div>
+ <style include="shared-styles">
+ :host {
+ font-family: var(--font-family);
+ font-size: var(--font-size-normal);
+ font-weight: var(--font-weight-normal);
+ line-height: var(--line-height-normal);
+ }
+ gr-button {
+ margin-left: var(--spacing-m);
+ }
+ gr-comment:not(:last-of-type) {
+ border-bottom: 1px solid var(--comment-separator-color);
+ }
+ #actions {
+ margin-left: auto;
+ padding: var(--spacing-m);
+ }
+ #container {
+ background-color: var(--comment-background-color);
+ color: var(--comment-text-color);
+ display: block;
+ margin: 0 var(--spacing-s) var(--spacing-s);
+ white-space: normal;
+ box-shadow: var(--elevation-level-2);
+ border-radius: var(--border-radius);
+ /** This is required for firefox to continue the inheritance */
+ -webkit-user-select: inherit;
+ -moz-user-select: inherit;
+ -ms-user-select: inherit;
+ user-select: inherit;
+ }
+ #container.unresolved {
+ background-color: var(--unresolved-comment-background-color);
+ }
+ #container.robotComment {
+ background-color: var(--robot-comment-background-color);
+ }
+ #commentInfoContainer {
+ border-top: 1px dotted var(--border-color);
+ display: flex;
+ }
+ #unresolvedLabel {
+ font-family: var(--font-family);
+ margin: auto 0;
+ padding: var(--spacing-m);
+ }
+ .pathInfo {
+ display: flex;
+ align-items: baseline;
+ justify-content: space-between;
+ padding: 0 var(--spacing-s) var(--spacing-s);
+ }
+ .descriptionText {
+ margin-left: var(--spacing-m);
+ font-style: italic;
+ }
+ </style>
+ <template is="dom-if" if="[[showFilePath]]">
+ <div class="pathInfo">
+ <a
+ href$="[[_getDiffUrlForComment(projectName, changeNum, path, patchNum)]]"
+ >[[_computeDisplayPath(path)]]</a
+ >
+ <span class="descriptionText">Patchset [[patchNum]]</span>
+ </div>
+ </template>
+ <div
+ id="container"
+ class$="[[_computeHostClass(unresolved, isRobotComment)]]"
+ >
+ <template
+ id="commentList"
+ is="dom-repeat"
+ items="[[_orderedComments]]"
+ as="comment"
+ >
+ <gr-comment
+ comment="{{comment}}"
+ comments="{{comments}}"
+ robot-button-disabled="[[_shouldDisableAction(_showActions, _lastComment)]]"
+ change-num="[[changeNum]]"
+ patch-num="[[patchNum]]"
+ draft="[[_isDraft(comment)]]"
+ show-actions="[[_showActions]]"
+ comment-side="[[comment.__commentSide]]"
+ side="[[comment.side]]"
+ project-config="[[_projectConfig]]"
+ on-create-fix-comment="_handleCommentFix"
+ on-comment-discard="_handleCommentDiscard"
+ on-comment-save="_handleCommentSavedOrDiscarded"
+ ></gr-comment>
</template>
- <div id="container" class\$="[[_computeHostClass(unresolved, isRobotComment)]]">
- <template id="commentList" is="dom-repeat" items="[[_orderedComments]]" as="comment">
- <gr-comment comment="{{comment}}" comments="{{comments}}" robot-button-disabled="[[_shouldDisableAction(_showActions, _lastComment)]]" change-num="[[changeNum]]" patch-num="[[patchNum]]" draft="[[_isDraft(comment)]]" show-actions="[[_showActions]]" comment-side="[[comment.__commentSide]]" side="[[comment.side]]" project-config="[[_projectConfig]]" on-create-fix-comment="_handleCommentFix" on-comment-discard="_handleCommentDiscard" on-comment-save="_handleCommentSavedOrDiscarded"></gr-comment>
- </template>
- <div id="commentInfoContainer" hidden\$="[[_hideActions(_showActions, _lastComment)]]">
- <span id="unresolvedLabel" hidden\$="[[!unresolved]]">Unresolved</span>
- <div id="actions">
- <gr-button id="replyBtn" link="" class="action reply" on-click="_handleCommentReply">Reply</gr-button>
- <gr-button id="quoteBtn" link="" class="action quote" on-click="_handleCommentQuote">Quote</gr-button>
- <template is="dom-if" if="[[unresolved]]">
- <gr-button id="ackBtn" link="" class="action ack" on-click="_handleCommentAck">Ack</gr-button>
- <gr-button id="doneBtn" link="" class="action done" on-click="_handleCommentDone">Done</gr-button>
- </template>
- </div>
+ <div
+ id="commentInfoContainer"
+ hidden$="[[_hideActions(_showActions, _lastComment)]]"
+ >
+ <span id="unresolvedLabel" hidden$="[[!unresolved]]">Unresolved</span>
+ <div id="actions">
+ <gr-button
+ id="replyBtn"
+ link=""
+ class="action reply"
+ on-click="_handleCommentReply"
+ >Reply</gr-button
+ >
+ <gr-button
+ id="quoteBtn"
+ link=""
+ class="action quote"
+ on-click="_handleCommentQuote"
+ >Quote</gr-button
+ >
+ <template is="dom-if" if="[[unresolved]]">
+ <gr-button
+ id="ackBtn"
+ link=""
+ class="action ack"
+ on-click="_handleCommentAck"
+ >Ack</gr-button
+ >
+ <gr-button
+ id="doneBtn"
+ link=""
+ class="action done"
+ on-click="_handleCommentDone"
+ >Done</gr-button
+ >
+ </template>
</div>
</div>
- <gr-reporting id="reporting"></gr-reporting>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
- <gr-storage id="storage"></gr-storage>
+ </div>
+ <gr-reporting id="reporting"></gr-reporting>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-storage id="storage"></gr-storage>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_html.js b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_html.js
index 5c20cd5..accf3e7 100644
--- a/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-comment/gr-comment_html.js
@@ -17,331 +17,435 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- font-family: var(--font-family);
- padding: var(--spacing-m);
+ <style include="shared-styles">
+ :host {
+ display: block;
+ font-family: var(--font-family);
+ padding: var(--spacing-m);
+ }
+ :host([disabled]) {
+ pointer-events: none;
+ }
+ :host([disabled]) .actions,
+ :host([disabled]) .robotActions,
+ :host([disabled]) .date {
+ opacity: 0.5;
+ }
+ :host([discarding]) {
+ display: none;
+ }
+ .header {
+ align-items: center;
+ cursor: pointer;
+ display: flex;
+ margin: calc(0px - var(--spacing-m)) calc(0px - var(--spacing-m)) 0
+ calc(0px - var(--spacing-m));
+ padding: var(--spacing-m);
+ }
+ .headerLeft > span {
+ font-weight: var(--font-weight-bold);
+ }
+ .container.collapsed .header {
+ margin-bottom: calc(0 - var(--spacing-m));
+ }
+ .headerMiddle {
+ color: var(--deemphasized-text-color);
+ flex: 1;
+ overflow: hidden;
+ }
+ .draftLabel,
+ .draftTooltip {
+ color: var(--deemphasized-text-color);
+ display: none;
+ }
+ .date {
+ justify-content: flex-end;
+ margin-left: 5px;
+ min-width: 4.5em;
+ text-align: right;
+ white-space: nowrap;
+ }
+ span.date {
+ color: var(--deemphasized-text-color);
+ }
+ span.date:hover {
+ text-decoration: underline;
+ }
+ .actions,
+ .robotActions {
+ display: flex;
+ justify-content: flex-end;
+ padding-top: 0;
+ }
+ .action {
+ margin-left: var(--spacing-l);
+ }
+ .rightActions {
+ display: flex;
+ justify-content: flex-end;
+ }
+ .rightActions gr-button {
+ --gr-button: {
+ height: 20px;
+ padding: 0 var(--spacing-s);
}
- :host([disabled]) {
- pointer-events: none;
- }
- :host([disabled]) .actions,
- :host([disabled]) .robotActions,
- :host([disabled]) .date {
- opacity: .5;
- }
- :host([discarding]) {
- display: none;
- }
- .header {
- align-items: center;
- cursor: pointer;
- display: flex;
- margin: calc(0px - var(--spacing-m)) calc(0px - var(--spacing-m)) 0 calc(0px - var(--spacing-m));
- padding: var(--spacing-m);
- }
- .headerLeft > span {
- font-weight: var(--font-weight-bold);
- }
- .container.collapsed .header {
- margin-bottom: calc(0 - var(--spacing-m));
- }
- .headerMiddle {
- color: var(--deemphasized-text-color);
- flex: 1;
- overflow: hidden;
- }
- .draftLabel,
- .draftTooltip {
- color: var(--deemphasized-text-color);
- display: none;
- }
- .date {
- justify-content: flex-end;
- margin-left: 5px;
- min-width: 4.5em;
- text-align: right;
- white-space: nowrap;
- }
- span.date {
- color: var(--deemphasized-text-color);
- }
- span.date:hover {
- text-decoration: underline;
- }
- .actions, .robotActions {
- display: flex;
- justify-content: flex-end;
- padding-top: 0;
- }
- .action {
- margin-left: var(--spacing-l);
- }
- .rightActions {
- display: flex;
- justify-content: flex-end;
- }
- .rightActions gr-button {
- --gr-button: {
- height: 20px;
- padding: 0 var(--spacing-s);
- }
- }
- .editMessage {
- display: none;
- margin: var(--spacing-m) 0;
- width: 100%;
- }
- .container:not(.draft) .actions .hideOnPublished {
- display: none;
- }
- .draft .reply,
- .draft .quote,
- .draft .ack,
- .draft .done {
- display: none;
- }
- .draft .draftLabel,
- .draft .draftTooltip {
- display: inline;
- }
- .draft:not(.editing) .save,
- .draft:not(.editing) .cancel {
- display: none;
- }
- .editing .message,
- .editing .reply,
- .editing .quote,
- .editing .ack,
- .editing .done,
- .editing .edit,
- .editing .discard,
- .editing .unresolved {
- display: none;
- }
- .editing .editMessage {
- display: block;
- }
- .show-hide {
- margin-left: var(--spacing-s);
- }
- .robotId {
- color: var(--deemphasized-text-color);
- margin-bottom: var(--spacing-m);
- margin-top: -.4em;
- }
- .robotIcon {
- margin-right: var(--spacing-xs);
- /* because of the antenna of the robot, it looks off center even when it
+ }
+ .editMessage {
+ display: none;
+ margin: var(--spacing-m) 0;
+ width: 100%;
+ }
+ .container:not(.draft) .actions .hideOnPublished {
+ display: none;
+ }
+ .draft .reply,
+ .draft .quote,
+ .draft .ack,
+ .draft .done {
+ display: none;
+ }
+ .draft .draftLabel,
+ .draft .draftTooltip {
+ display: inline;
+ }
+ .draft:not(.editing) .save,
+ .draft:not(.editing) .cancel {
+ display: none;
+ }
+ .editing .message,
+ .editing .reply,
+ .editing .quote,
+ .editing .ack,
+ .editing .done,
+ .editing .edit,
+ .editing .discard,
+ .editing .unresolved {
+ display: none;
+ }
+ .editing .editMessage {
+ display: block;
+ }
+ .show-hide {
+ margin-left: var(--spacing-s);
+ }
+ .robotId {
+ color: var(--deemphasized-text-color);
+ margin-bottom: var(--spacing-m);
+ margin-top: -0.4em;
+ }
+ .robotIcon {
+ margin-right: var(--spacing-xs);
+ /* because of the antenna of the robot, it looks off center even when it
is centered. artificially adjust margin to account for this. */
- margin-top: -4px;
+ margin-top: -4px;
+ }
+ .runIdInformation {
+ margin: var(--spacing-m) 0;
+ }
+ .robotRun {
+ margin-left: var(--spacing-m);
+ }
+ .robotRunLink {
+ margin-left: var(--spacing-m);
+ }
+ input.show-hide {
+ display: none;
+ }
+ label.show-hide {
+ cursor: pointer;
+ display: block;
+ }
+ label.show-hide iron-icon {
+ vertical-align: top;
+ }
+ #container .collapsedContent {
+ display: none;
+ }
+ #container.collapsed {
+ padding-bottom: 3px;
+ }
+ #container.collapsed .collapsedContent {
+ display: block;
+ overflow: hidden;
+ padding-left: 5px;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ }
+ #container.collapsed .actions,
+ #container.collapsed gr-formatted-text,
+ #container.collapsed gr-textarea,
+ #container.collapsed .respectfulReviewTip {
+ display: none;
+ }
+ .resolve,
+ .unresolved {
+ align-items: center;
+ display: flex;
+ flex: 1;
+ margin: 0;
+ }
+ .resolve label {
+ color: var(--comment-text-color);
+ }
+ gr-dialog .main {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ }
+ #deleteBtn {
+ display: none;
+ --gr-button: {
+ color: var(--deemphasized-text-color);
+ padding: 0;
}
- .runIdInformation {
- margin: var(--spacing-m) 0;
- }
- .robotRun {
- margin-left: var(--spacing-m);
- }
- .robotRunLink {
- margin-left: var(--spacing-m);
- }
- input.show-hide {
- display: none;
- }
- label.show-hide {
- cursor: pointer;
- display: block;
- }
- label.show-hide iron-icon {
- vertical-align: top;
- }
- #container .collapsedContent {
- display: none;
- }
- #container.collapsed {
- padding-bottom: 3px;
- }
- #container.collapsed .collapsedContent {
- display: block;
- overflow: hidden;
- padding-left: 5px;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- #container.collapsed .actions,
- #container.collapsed gr-formatted-text,
- #container.collapsed gr-textarea,
- #container.collapsed .respectfulReviewTip{
- display: none;
- }
- .resolve,
- .unresolved {
- align-items: center;
- display: flex;
- flex: 1;
- margin: 0;
- }
- .resolve label {
- color: var(--comment-text-color);
- }
- gr-dialog .main {
- display: flex;
- flex-direction: column;
- width: 100%;
- }
- #deleteBtn {
- display: none;
- --gr-button: {
- color: var(--deemphasized-text-color);
- padding: 0;
- }
- }
- #deleteBtn.showDeleteButtons {
- display: block;
- }
+ }
+ #deleteBtn.showDeleteButtons {
+ display: block;
+ }
- /** Disable select for the caret and actions */
- .actions,
- .show-hide {
- -webkit-user-select: none;
- -moz-user-select: none;
- -ms-user-select: none;
- user-select: none;
- }
+ /** Disable select for the caret and actions */
+ .actions,
+ .show-hide {
+ -webkit-user-select: none;
+ -moz-user-select: none;
+ -ms-user-select: none;
+ user-select: none;
+ }
- .respectfulReviewTip {
- justify-content: space-between;
- display: flex;
- padding: var(--spacing-m);
- border: 1px solid var(--border-color);
- border-radius: var(--border-radius);
- margin-bottom: var(--spacing-m);
- }
- .respectfulReviewTip div {
- display: flex;
- }
- .respectfulReviewTip div iron-icon {
- margin-right: var(--spacing-s);
- }
- .respectfulReviewTip a {
- white-space: nowrap;
- margin-right: var(--spacing-s);
- padding-left: var(--spacing-m);
- text-decoration: none;
- }
- .pointer {
- cursor: pointer;
- }
- </style>
- <div id="container" class="container">
- <div class="header" id="header" on-click="_handleToggleCollapsed">
- <div class="headerLeft">
- <span class="authorName">[[_computeAuthorName(comment)]]</span>
- <span class="draftLabel">DRAFT</span>
- <gr-tooltip-content class="draftTooltip" has-tooltip="" title="This draft is only visible to you. To publish drafts, click the 'Reply' or 'Start review' button at the top of the change or press the 'A' key." max-width="20em" show-icon=""></gr-tooltip-content>
- </div>
- <div class="headerMiddle">
- <span class="collapsedContent">[[comment.message]]</span>
- </div>
- <div hidden\$="[[_computeHideRunDetails(comment, collapsed)]]" class="runIdMessage message">
- <div class="runIdInformation">
- <a class="robotRunLink" href\$="[[comment.url]]">
- <span class="robotRun link">Run Details</span>
- </a>
- </div>
- </div>
- <gr-button id="deleteBtn" link="" class\$="action delete [[_computeDeleteButtonClass(_isAdmin, draft)]]" hidden\$="[[isRobotComment]]" on-click="_handleCommentDelete">
- <iron-icon id="icon" icon="gr-icons:delete"></iron-icon>
- </gr-button>
- <span class="date" on-click="_handleAnchorClick">
- <gr-date-formatter has-tooltip="" date-str="[[comment.updated]]"></gr-date-formatter>
- </span>
- <div class="show-hide">
- <label class="show-hide">
- <input type="checkbox" class="show-hide" checked\$="[[collapsed]]" on-change="_handleToggleCollapsed">
- <iron-icon id="icon" icon="[[_computeShowHideIcon(collapsed)]]">
- </iron-icon>
- </label>
+ .respectfulReviewTip {
+ justify-content: space-between;
+ display: flex;
+ padding: var(--spacing-m);
+ border: 1px solid var(--border-color);
+ border-radius: var(--border-radius);
+ margin-bottom: var(--spacing-m);
+ }
+ .respectfulReviewTip div {
+ display: flex;
+ }
+ .respectfulReviewTip div iron-icon {
+ margin-right: var(--spacing-s);
+ }
+ .respectfulReviewTip a {
+ white-space: nowrap;
+ margin-right: var(--spacing-s);
+ padding-left: var(--spacing-m);
+ text-decoration: none;
+ }
+ .pointer {
+ cursor: pointer;
+ }
+ </style>
+ <div id="container" class="container">
+ <div class="header" id="header" on-click="_handleToggleCollapsed">
+ <div class="headerLeft">
+ <span class="authorName">[[_computeAuthorName(comment)]]</span>
+ <span class="draftLabel">DRAFT</span>
+ <gr-tooltip-content
+ class="draftTooltip"
+ has-tooltip=""
+ title="This draft is only visible to you. To publish drafts, click the 'Reply' or 'Start review' button at the top of the change or press the 'A' key."
+ max-width="20em"
+ show-icon=""
+ ></gr-tooltip-content>
+ </div>
+ <div class="headerMiddle">
+ <span class="collapsedContent">[[comment.message]]</span>
+ </div>
+ <div
+ hidden$="[[_computeHideRunDetails(comment, collapsed)]]"
+ class="runIdMessage message"
+ >
+ <div class="runIdInformation">
+ <a class="robotRunLink" href$="[[comment.url]]">
+ <span class="robotRun link">Run Details</span>
+ </a>
</div>
</div>
- <div class="body">
- <template is="dom-if" if="[[isRobotComment]]">
- <div class="robotId" hidden\$="[[collapsed]]">
- [[comment.author.name]]
- </div>
- </template>
- <template is="dom-if" if="[[editing]]">
- <gr-textarea id="editTextarea" class="editMessage" autocomplete="on" code="" disabled="{{disabled}}" rows="4" text="{{_messageText}}"></gr-textarea>
- <template is="dom-if" if="[[_computeVisibilityOfTip(_showRespectfulTip, _respectfulTipDismissed)]]">
- <div class="respectfulReviewTip">
- <div>
- <gr-tooltip-content has-tooltip="" title="Tips for respectful code reviews.">
- <iron-icon class="pointer" icon="gr-icons:lightbulb-outline"></iron-icon>
- </gr-tooltip-content>
- [[_respectfulReviewTip]]
- </div>
- <div>
- <a tabindex="-1" on-click="_onRespectfulReadMoreClick" href="https://testing.googleblog.com/2019/11/code-health-respectful-reviews-useful.html" target="_blank">
- Read more
- </a>
- <a tabindex="-1" class="close pointer" on-click="_dismissRespectfulTip">Not helpful</a>
- </div>
- </div>
- </template>
- </template>
- <!--The message class is needed to ensure selectability from
- gr-diff-selection.-->
- <gr-formatted-text class="message" content="[[comment.message]]" no-trailing-margin="[[!comment.__draft]]" config="[[projectConfig.commentlinks]]"></gr-formatted-text>
- <div class="actions humanActions" hidden\$="[[!_showHumanActions]]">
- <div class="action resolve hideOnPublished">
- <label>
- <input type="checkbox" id="resolvedCheckbox" checked="[[resolved]]" on-change="_handleToggleResolved">
- Resolved
- </label>
- </div>
- <div class="rightActions">
- <gr-button link="" class="action cancel hideOnPublished" on-click="_handleCancel">Cancel</gr-button>
- <gr-button link="" class="action discard hideOnPublished" on-click="_handleDiscard">Discard</gr-button>
- <gr-button link="" class="action edit hideOnPublished" on-click="_handleEdit">Edit</gr-button>
- <gr-button link="" disabled\$="[[_computeSaveDisabled(_messageText, comment, resolved)]]" class="action save hideOnPublished" on-click="_handleSave">Save</gr-button>
- </div>
- </div>
- <div class="robotActions" hidden\$="[[!_showRobotActions]]">
- <template is="dom-if" if="[[isRobotComment]]">
- <gr-endpoint-decorator name="robot-comment-controls">
- <gr-endpoint-param name="comment" value="[[comment]]">
- </gr-endpoint-param>
- </gr-endpoint-decorator>
- <gr-button link="" secondary="" class="action show-fix" hidden\$="[[_hasNoFix(comment)]]" on-click="_handleShowFix">
- Show Fix
- </gr-button>
- <template is="dom-if" if="[[!_hasHumanReply]]">
- <gr-button link="" class="action fix" on-click="_handleFix" disabled="[[robotButtonDisabled]]">
- Please Fix
- </gr-button>
- </template>
- </template>
- </div>
+ <gr-button
+ id="deleteBtn"
+ link=""
+ class$="action delete [[_computeDeleteButtonClass(_isAdmin, draft)]]"
+ hidden$="[[isRobotComment]]"
+ on-click="_handleCommentDelete"
+ >
+ <iron-icon id="icon" icon="gr-icons:delete"></iron-icon>
+ </gr-button>
+ <span class="date" on-click="_handleAnchorClick">
+ <gr-date-formatter
+ has-tooltip=""
+ date-str="[[comment.updated]]"
+ ></gr-date-formatter>
+ </span>
+ <div class="show-hide">
+ <label class="show-hide">
+ <input
+ type="checkbox"
+ class="show-hide"
+ checked$="[[collapsed]]"
+ on-change="_handleToggleCollapsed"
+ />
+ <iron-icon id="icon" icon="[[_computeShowHideIcon(collapsed)]]">
+ </iron-icon>
+ </label>
</div>
</div>
- <template is="dom-if" if="[[_enableOverlay]]">
- <gr-overlay id="confirmDeleteOverlay" with-backdrop="">
- <gr-confirm-delete-comment-dialog id="confirmDeleteComment" on-confirm="_handleConfirmDeleteComment" on-cancel="_handleCancelDeleteComment">
- </gr-confirm-delete-comment-dialog>
- </gr-overlay>
- <gr-overlay id="confirmDiscardOverlay" with-backdrop="">
- <gr-dialog id="confirmDiscardDialog" confirm-label="Discard" confirm-on-enter="" on-confirm="_handleConfirmDiscard" on-cancel="_closeConfirmDiscardOverlay">
- <div class="header" slot="header">
- Discard comment
+ <div class="body">
+ <template is="dom-if" if="[[isRobotComment]]">
+ <div class="robotId" hidden$="[[collapsed]]">
+ [[comment.author.name]]
+ </div>
+ </template>
+ <template is="dom-if" if="[[editing]]">
+ <gr-textarea
+ id="editTextarea"
+ class="editMessage"
+ autocomplete="on"
+ code=""
+ disabled="{{disabled}}"
+ rows="4"
+ text="{{_messageText}}"
+ ></gr-textarea>
+ <template
+ is="dom-if"
+ if="[[_computeVisibilityOfTip(_showRespectfulTip, _respectfulTipDismissed)]]"
+ >
+ <div class="respectfulReviewTip">
+ <div>
+ <gr-tooltip-content
+ has-tooltip=""
+ title="Tips for respectful code reviews."
+ >
+ <iron-icon
+ class="pointer"
+ icon="gr-icons:lightbulb-outline"
+ ></iron-icon>
+ </gr-tooltip-content>
+ [[_respectfulReviewTip]]
+ </div>
+ <div>
+ <a
+ tabindex="-1"
+ on-click="_onRespectfulReadMoreClick"
+ href="https://testing.googleblog.com/2019/11/code-health-respectful-reviews-useful.html"
+ target="_blank"
+ >
+ Read more
+ </a>
+ <a
+ tabindex="-1"
+ class="close pointer"
+ on-click="_dismissRespectfulTip"
+ >Not helpful</a
+ >
+ </div>
</div>
- <div class="main" slot="main">
- Are you sure you want to discard this draft comment?
- </div>
- </gr-dialog>
- </gr-overlay>
- </template>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
- <gr-storage id="storage"></gr-storage>
- <gr-reporting id="reporting"></gr-reporting>
+ </template>
+ </template>
+ <!--The message class is needed to ensure selectability from
+ gr-diff-selection.-->
+ <gr-formatted-text
+ class="message"
+ content="[[comment.message]]"
+ no-trailing-margin="[[!comment.__draft]]"
+ config="[[projectConfig.commentlinks]]"
+ ></gr-formatted-text>
+ <div class="actions humanActions" hidden$="[[!_showHumanActions]]">
+ <div class="action resolve hideOnPublished">
+ <label>
+ <input
+ type="checkbox"
+ id="resolvedCheckbox"
+ checked="[[resolved]]"
+ on-change="_handleToggleResolved"
+ />
+ Resolved
+ </label>
+ </div>
+ <div class="rightActions">
+ <gr-button
+ link=""
+ class="action cancel hideOnPublished"
+ on-click="_handleCancel"
+ >Cancel</gr-button
+ >
+ <gr-button
+ link=""
+ class="action discard hideOnPublished"
+ on-click="_handleDiscard"
+ >Discard</gr-button
+ >
+ <gr-button
+ link=""
+ class="action edit hideOnPublished"
+ on-click="_handleEdit"
+ >Edit</gr-button
+ >
+ <gr-button
+ link=""
+ disabled$="[[_computeSaveDisabled(_messageText, comment, resolved)]]"
+ class="action save hideOnPublished"
+ on-click="_handleSave"
+ >Save</gr-button
+ >
+ </div>
+ </div>
+ <div class="robotActions" hidden$="[[!_showRobotActions]]">
+ <template is="dom-if" if="[[isRobotComment]]">
+ <gr-endpoint-decorator name="robot-comment-controls">
+ <gr-endpoint-param name="comment" value="[[comment]]">
+ </gr-endpoint-param>
+ </gr-endpoint-decorator>
+ <gr-button
+ link=""
+ secondary=""
+ class="action show-fix"
+ hidden$="[[_hasNoFix(comment)]]"
+ on-click="_handleShowFix"
+ >
+ Show Fix
+ </gr-button>
+ <template is="dom-if" if="[[!_hasHumanReply]]">
+ <gr-button
+ link=""
+ class="action fix"
+ on-click="_handleFix"
+ disabled="[[robotButtonDisabled]]"
+ >
+ Please Fix
+ </gr-button>
+ </template>
+ </template>
+ </div>
+ </div>
+ </div>
+ <template is="dom-if" if="[[_enableOverlay]]">
+ <gr-overlay id="confirmDeleteOverlay" with-backdrop="">
+ <gr-confirm-delete-comment-dialog
+ id="confirmDeleteComment"
+ on-confirm="_handleConfirmDeleteComment"
+ on-cancel="_handleCancelDeleteComment"
+ >
+ </gr-confirm-delete-comment-dialog>
+ </gr-overlay>
+ <gr-overlay id="confirmDiscardOverlay" with-backdrop="">
+ <gr-dialog
+ id="confirmDiscardDialog"
+ confirm-label="Discard"
+ confirm-on-enter=""
+ on-confirm="_handleConfirmDiscard"
+ on-cancel="_closeConfirmDiscardOverlay"
+ >
+ <div class="header" slot="header">
+ Discard comment
+ </div>
+ <div class="main" slot="main">
+ Are you sure you want to discard this draft comment?
+ </div>
+ </gr-dialog>
+ </gr-overlay>
+ </template>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <gr-storage id="storage"></gr-storage>
+ <gr-reporting id="reporting"></gr-reporting>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog_html.js b/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog_html.js
index f6caaa1..2d0fa6f 100644
--- a/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-confirm-delete-comment-dialog/gr-confirm-delete-comment-dialog_html.js
@@ -17,40 +17,52 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- }
- :host([disabled]) {
- opacity: .5;
- pointer-events: none;
- }
- .main {
- display: flex;
- flex-direction: column;
- width: 100%;
- }
- p {
- margin-bottom: var(--spacing-l);
- }
- label {
- cursor: pointer;
- display: block;
- width: 100%;
- }
- iron-autogrow-textarea {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-mono);
- line-height: var(--line-height-mono);
- width: 73ch; /* Add a char to account for the border. */
- }
- </style>
- <gr-dialog confirm-label="Delete" on-confirm="_handleConfirmTap" on-cancel="_handleCancelTap">
- <div class="header" slot="header">Delete Comment</div>
- <div class="main" slot="main">
- <p>This is an admin function. Please only use in exceptional circumstances.</p>
- <label for="messageInput">Enter comment delete reason</label>
- <iron-autogrow-textarea id="messageInput" class="message" autocomplete="on" placeholder="<Insert reasoning here>" bind-value="{{message}}"></iron-autogrow-textarea>
- </div>
- </gr-dialog>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ :host([disabled]) {
+ opacity: 0.5;
+ pointer-events: none;
+ }
+ .main {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ }
+ p {
+ margin-bottom: var(--spacing-l);
+ }
+ label {
+ cursor: pointer;
+ display: block;
+ width: 100%;
+ }
+ iron-autogrow-textarea {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-mono);
+ line-height: var(--line-height-mono);
+ width: 73ch; /* Add a char to account for the border. */
+ }
+ </style>
+ <gr-dialog
+ confirm-label="Delete"
+ on-confirm="_handleConfirmTap"
+ on-cancel="_handleCancelTap"
+ >
+ <div class="header" slot="header">Delete Comment</div>
+ <div class="main" slot="main">
+ <p>
+ This is an admin function. Please only use in exceptional circumstances.
+ </p>
+ <label for="messageInput">Enter comment delete reason</label>
+ <iron-autogrow-textarea
+ id="messageInput"
+ class="message"
+ autocomplete="on"
+ placeholder="<Insert reasoning here>"
+ bind-value="{{message}}"
+ ></iron-autogrow-textarea>
+ </div>
+ </gr-dialog>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard_html.js b/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard_html.js
index 29becbb..8378de5 100644
--- a/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-copy-clipboard/gr-copy-clipboard_html.js
@@ -17,49 +17,70 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- .text {
- align-items: center;
- display: flex;
- flex-wrap: wrap;
- }
- .copyText {
- flex-grow: 1;
- margin-right: var(--spacing-s);
- }
- .hideInput {
- display: none;
- }
- input#input {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-mono);
- line-height: var(--line-height-mono);
- @apply --text-container-style;
- width: 100%;
- }
- /*
+ <style include="shared-styles">
+ .text {
+ align-items: center;
+ display: flex;
+ flex-wrap: wrap;
+ }
+ .copyText {
+ flex-grow: 1;
+ margin-right: var(--spacing-s);
+ }
+ .hideInput {
+ display: none;
+ }
+ input#input {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-mono);
+ line-height: var(--line-height-mono);
+ @apply --text-container-style;
+ width: 100%;
+ }
+ /*
* Typically icons are 20px, which is the normal line-height.
* The copy icon is too prominent at 20px, so we choose 16px
* here, but add 2x2px padding below, so the entire
* component should still fit nicely into a normal inline
* layout flow.
*/
- #icon {
- height: 16px;
- width: 16px;
+ #icon {
+ height: 16px;
+ width: 16px;
+ }
+ gr-button {
+ --gr-button: {
+ padding: 2px;
}
- gr-button {
- --gr-button: {
- padding: 2px;
- }
- }
- </style>
- <div class="text">
- <iron-input class="copyText" type="text" bind-value="[[text]]" on-tap="_handleInputClick" readonly="">
- <input id="input" is="iron-input" class\$="[[_computeInputClass(hideInput)]]" type="text" bind-value="[[text]]" on-click="_handleInputClick" readonly="">
- </iron-input>
- <gr-button id="button" link="" has-tooltip="[[hasTooltip]]" class="copyToClipboard" title="[[buttonTitle]]" on-click="_copyToClipboard">
- <iron-icon id="icon" icon="gr-icons:content-copy"></iron-icon>
- </gr-button>
- </div>
+ }
+ </style>
+ <div class="text">
+ <iron-input
+ class="copyText"
+ type="text"
+ bind-value="[[text]]"
+ on-tap="_handleInputClick"
+ readonly=""
+ >
+ <input
+ id="input"
+ is="iron-input"
+ class$="[[_computeInputClass(hideInput)]]"
+ type="text"
+ bind-value="[[text]]"
+ on-click="_handleInputClick"
+ readonly=""
+ />
+ </iron-input>
+ <gr-button
+ id="button"
+ link=""
+ has-tooltip="[[hasTooltip]]"
+ class="copyToClipboard"
+ title="[[buttonTitle]]"
+ on-click="_copyToClipboard"
+ >
+ <iron-icon id="icon" icon="gr-icons:content-copy"></iron-icon>
+ </gr-button>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager_html.js b/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager_html.js
index 29757e5..3ed33d1 100644
--- a/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-cursor-manager/gr-cursor-manager_html.js
@@ -16,6 +16,4 @@
*/
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
-export const htmlTemplate = html`
-
-`;
+export const htmlTemplate = html``;
diff --git a/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter_html.js b/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter_html.js
index 19aa143..2571065 100644
--- a/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-date-formatter/gr-date-formatter_html.js
@@ -17,14 +17,15 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- color: inherit;
- display: inline;
- }
- </style>
- <span>
- [[_computeDateStr(dateStr, _timeFormat, _dateFormat, _relative, showDateAndTime)]]
- </span>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <style include="shared-styles">
+ :host {
+ color: inherit;
+ display: inline;
+ }
+ </style>
+ <span>
+ [[_computeDateStr(dateStr, _timeFormat, _dateFormat, _relative,
+ showDateAndTime)]]
+ </span>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog_html.js b/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog_html.js
index 4bfd13f..b32f871 100644
--- a/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-dialog/gr-dialog_html.js
@@ -17,63 +17,75 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- color: var(--primary-text-color);
- display: block;
- max-height: 90vh;
- overflow: auto;
- }
- .container {
- display: flex;
- flex-direction: column;
- max-height: 90vh;
- padding: var(--spacing-xl);
- }
- header {
- flex-shrink: 0;
- padding-bottom: var(--spacing-xl);
- }
- main {
- display: flex;
- flex-shrink: 1;
- width: 100%;
- flex: 1;
- /* IMPORTANT: required for firefox */
- min-height: 0px;
- }
- main .overflow-container {
- flex: 1;
- overflow: auto;
- }
- footer {
- display: flex;
- flex-shrink: 0;
- justify-content: flex-end;
- padding-top: var(--spacing-xl);
- }
- gr-button {
- margin-left: var(--spacing-l);
- }
- .hidden {
- display: none;
- }
- </style>
- <div class="container" on-keydown="_handleKeydown">
- <header class="font-h3"><slot name="header"></slot></header>
- <main>
- <div class="overflow-container">
- <slot name="main"></slot>
- </div>
- </main>
- <footer>
- <slot name="footer"></slot>
- <gr-button id="cancel" class\$="[[_computeCancelClass(cancelLabel)]]" link="" on-click="_handleCancelTap">
- [[cancelLabel]]
- </gr-button>
- <gr-button id="confirm" link="" primary="" on-click="_handleConfirm" disabled="[[disabled]]" title\$="[[confirmTooltip]]">
- [[confirmLabel]]
- </gr-button>
- </footer>
- </div>
+ <style include="shared-styles">
+ :host {
+ color: var(--primary-text-color);
+ display: block;
+ max-height: 90vh;
+ overflow: auto;
+ }
+ .container {
+ display: flex;
+ flex-direction: column;
+ max-height: 90vh;
+ padding: var(--spacing-xl);
+ }
+ header {
+ flex-shrink: 0;
+ padding-bottom: var(--spacing-xl);
+ }
+ main {
+ display: flex;
+ flex-shrink: 1;
+ width: 100%;
+ flex: 1;
+ /* IMPORTANT: required for firefox */
+ min-height: 0px;
+ }
+ main .overflow-container {
+ flex: 1;
+ overflow: auto;
+ }
+ footer {
+ display: flex;
+ flex-shrink: 0;
+ justify-content: flex-end;
+ padding-top: var(--spacing-xl);
+ }
+ gr-button {
+ margin-left: var(--spacing-l);
+ }
+ .hidden {
+ display: none;
+ }
+ </style>
+ <div class="container" on-keydown="_handleKeydown">
+ <header class="font-h3"><slot name="header"></slot></header>
+ <main>
+ <div class="overflow-container">
+ <slot name="main"></slot>
+ </div>
+ </main>
+ <footer>
+ <slot name="footer"></slot>
+ <gr-button
+ id="cancel"
+ class$="[[_computeCancelClass(cancelLabel)]]"
+ link=""
+ on-click="_handleCancelTap"
+ >
+ [[cancelLabel]]
+ </gr-button>
+ <gr-button
+ id="confirm"
+ link=""
+ primary=""
+ on-click="_handleConfirm"
+ disabled="[[disabled]]"
+ title$="[[confirmTooltip]]"
+ >
+ [[confirmLabel]]
+ </gr-button>
+ </footer>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences_html.js b/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences_html.js
index 7869c2c..3ea40d9 100644
--- a/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-diff-preferences/gr-diff-preferences_html.js
@@ -17,98 +17,179 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="gr-form-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <div id="diffPreferences" class="gr-form-styles">
- <section>
- <span class="title">Context</span>
+ <style include="shared-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="gr-form-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <div id="diffPreferences" class="gr-form-styles">
+ <section>
+ <span class="title">Context</span>
+ <span class="value">
+ <gr-select id="contextSelect" bind-value="{{diffPrefs.context}}">
+ <select
+ on-keypress="_handleDiffPrefsChanged"
+ on-change="_handleDiffPrefsChanged"
+ >
+ <option value="3">3 lines</option>
+ <option value="10">10 lines</option>
+ <option value="25">25 lines</option>
+ <option value="50">50 lines</option>
+ <option value="75">75 lines</option>
+ <option value="100">100 lines</option>
+ <option value="-1">Whole file</option>
+ </select>
+ </gr-select>
+ </span>
+ </section>
+ <section>
+ <span class="title">Fit to screen</span>
+ <span class="value">
+ <input
+ id="lineWrappingInput"
+ type="checkbox"
+ checked$="[[diffPrefs.line_wrapping]]"
+ on-change="_handleLineWrappingTap"
+ />
+ </span>
+ </section>
+ <section>
+ <span class="title">Diff width</span>
+ <span class="value">
+ <iron-input
+ type="number"
+ prevent-invalid-input=""
+ allowed-pattern="[0-9]"
+ bind-value="{{diffPrefs.line_length}}"
+ on-keypress="_handleDiffPrefsChanged"
+ on-change="_handleDiffPrefsChanged"
+ >
+ <input
+ is="iron-input"
+ type="number"
+ id="columnsInput"
+ prevent-invalid-input=""
+ allowed-pattern="[0-9]"
+ bind-value="{{diffPrefs.line_length}}"
+ on-keypress="_handleDiffPrefsChanged"
+ on-change="_handleDiffPrefsChanged"
+ />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <span class="title">Tab width</span>
+ <span class="value">
+ <iron-input
+ type="number"
+ prevent-invalid-input=""
+ allowed-pattern="[0-9]"
+ bind-value="{{diffPrefs.tab_size}}"
+ on-keypress="_handleDiffPrefsChanged"
+ on-change="_handleDiffPrefsChanged"
+ >
+ <input
+ is="iron-input"
+ type="number"
+ id="tabSizeInput"
+ prevent-invalid-input=""
+ allowed-pattern="[0-9]"
+ bind-value="{{diffPrefs.tab_size}}"
+ on-keypress="_handleDiffPrefsChanged"
+ on-change="_handleDiffPrefsChanged"
+ />
+ </iron-input>
+ </span>
+ </section>
+ <section hidden$="[[!diffPrefs.font_size]]">
+ <span class="title">Font size</span>
+ <span class="value">
+ <iron-input
+ type="number"
+ prevent-invalid-input=""
+ allowed-pattern="[0-9]"
+ bind-value="{{diffPrefs.font_size}}"
+ on-keypress="_handleDiffPrefsChanged"
+ on-change="_handleDiffPrefsChanged"
+ >
+ <input
+ is="iron-input"
+ type="number"
+ id="fontSizeInput"
+ prevent-invalid-input=""
+ allowed-pattern="[0-9]"
+ bind-value="{{diffPrefs.font_size}}"
+ on-keypress="_handleDiffPrefsChanged"
+ on-change="_handleDiffPrefsChanged"
+ />
+ </iron-input>
+ </span>
+ </section>
+ <section>
+ <span class="title">Show tabs</span>
+ <span class="value">
+ <input
+ id="showTabsInput"
+ type="checkbox"
+ checked$="[[diffPrefs.show_tabs]]"
+ on-change="_handleShowTabsTap"
+ />
+ </span>
+ </section>
+ <section>
+ <span class="title">Show trailing whitespace</span>
+ <span class="value">
+ <input
+ id="showTrailingWhitespaceInput"
+ type="checkbox"
+ checked$="[[diffPrefs.show_whitespace_errors]]"
+ on-change="_handleShowTrailingWhitespaceTap"
+ />
+ </span>
+ </section>
+ <section>
+ <span class="title">Syntax highlighting</span>
+ <span class="value">
+ <input
+ id="syntaxHighlightInput"
+ type="checkbox"
+ checked$="[[diffPrefs.syntax_highlighting]]"
+ on-change="_handleSyntaxHighlightTap"
+ />
+ </span>
+ </section>
+ <section>
+ <span class="title">Automatically mark viewed files reviewed</span>
+ <span class="value">
+ <input
+ id="automaticReviewInput"
+ type="checkbox"
+ checked$="[[!diffPrefs.manual_review]]"
+ on-change="_handleAutomaticReviewTap"
+ />
+ </span>
+ </section>
+ <section>
+ <div class="pref">
+ <span class="title">Ignore Whitespace</span>
<span class="value">
- <gr-select id="contextSelect" bind-value="{{diffPrefs.context}}">
- <select on-keypress="_handleDiffPrefsChanged" on-change="_handleDiffPrefsChanged">
- <option value="3">3 lines</option>
- <option value="10">10 lines</option>
- <option value="25">25 lines</option>
- <option value="50">50 lines</option>
- <option value="75">75 lines</option>
- <option value="100">100 lines</option>
- <option value="-1">Whole file</option>
+ <gr-select bind-value="{{diffPrefs.ignore_whitespace}}">
+ <select
+ on-keypress="_handleDiffPrefsChanged"
+ on-change="_handleDiffPrefsChanged"
+ >
+ <option value="IGNORE_NONE">None</option>
+ <option value="IGNORE_TRAILING">Trailing</option>
+ <option value="IGNORE_LEADING_AND_TRAILING"
+ >Leading & trailing</option
+ >
+ <option value="IGNORE_ALL">All</option>
</select>
</gr-select>
</span>
- </section>
- <section>
- <span class="title">Fit to screen</span>
- <span class="value">
- <input id="lineWrappingInput" type="checkbox" checked\$="[[diffPrefs.line_wrapping]]" on-change="_handleLineWrappingTap">
- </span>
- </section>
- <section>
- <span class="title">Diff width</span>
- <span class="value">
- <iron-input type="number" prevent-invalid-input="" allowed-pattern="[0-9]" bind-value="{{diffPrefs.line_length}}" on-keypress="_handleDiffPrefsChanged" on-change="_handleDiffPrefsChanged">
- <input is="iron-input" type="number" id="columnsInput" prevent-invalid-input="" allowed-pattern="[0-9]" bind-value="{{diffPrefs.line_length}}" on-keypress="_handleDiffPrefsChanged" on-change="_handleDiffPrefsChanged">
- </iron-input>
- </span>
- </section>
- <section>
- <span class="title">Tab width</span>
- <span class="value">
- <iron-input type="number" prevent-invalid-input="" allowed-pattern="[0-9]" bind-value="{{diffPrefs.tab_size}}" on-keypress="_handleDiffPrefsChanged" on-change="_handleDiffPrefsChanged">
- <input is="iron-input" type="number" id="tabSizeInput" prevent-invalid-input="" allowed-pattern="[0-9]" bind-value="{{diffPrefs.tab_size}}" on-keypress="_handleDiffPrefsChanged" on-change="_handleDiffPrefsChanged">
- </iron-input>
- </span>
- </section>
- <section hidden\$="[[!diffPrefs.font_size]]">
- <span class="title">Font size</span>
- <span class="value">
- <iron-input type="number" prevent-invalid-input="" allowed-pattern="[0-9]" bind-value="{{diffPrefs.font_size}}" on-keypress="_handleDiffPrefsChanged" on-change="_handleDiffPrefsChanged">
- <input is="iron-input" type="number" id="fontSizeInput" prevent-invalid-input="" allowed-pattern="[0-9]" bind-value="{{diffPrefs.font_size}}" on-keypress="_handleDiffPrefsChanged" on-change="_handleDiffPrefsChanged">
- </iron-input>
- </span>
- </section>
- <section>
- <span class="title">Show tabs</span>
- <span class="value">
- <input id="showTabsInput" type="checkbox" checked\$="[[diffPrefs.show_tabs]]" on-change="_handleShowTabsTap">
- </span>
- </section>
- <section>
- <span class="title">Show trailing whitespace</span>
- <span class="value">
- <input id="showTrailingWhitespaceInput" type="checkbox" checked\$="[[diffPrefs.show_whitespace_errors]]" on-change="_handleShowTrailingWhitespaceTap">
- </span>
- </section>
- <section>
- <span class="title">Syntax highlighting</span>
- <span class="value">
- <input id="syntaxHighlightInput" type="checkbox" checked\$="[[diffPrefs.syntax_highlighting]]" on-change="_handleSyntaxHighlightTap">
- </span>
- </section>
- <section>
- <span class="title">Automatically mark viewed files reviewed</span>
- <span class="value">
- <input id="automaticReviewInput" type="checkbox" checked\$="[[!diffPrefs.manual_review]]" on-change="_handleAutomaticReviewTap">
- </span>
- </section>
- <section>
- <div class="pref">
- <span class="title">Ignore Whitespace</span>
- <span class="value">
- <gr-select bind-value="{{diffPrefs.ignore_whitespace}}">
- <select on-keypress="_handleDiffPrefsChanged" on-change="_handleDiffPrefsChanged">
- <option value="IGNORE_NONE">None</option>
- <option value="IGNORE_TRAILING">Trailing</option>
- <option value="IGNORE_LEADING_AND_TRAILING">Leading & trailing</option>
- <option value="IGNORE_ALL">All</option>
- </select>
- </gr-select>
- </span>
- </div>
- </section>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </div>
+ </section>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands_html.js b/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands_html.js
index 12a8d01..7248e65 100644
--- a/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-download-commands/gr-download-commands_html.js
@@ -17,51 +17,59 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- paper-tabs {
- height: 3rem;
- margin-bottom: var(--spacing-m);
- --paper-tabs-selection-bar-color: var(--link-color);
- }
- paper-tab {
- max-width: 15rem;
- text-transform: uppercase;
- --paper-tab-ink: var(--link-color);
- }
- label,
- input {
- display: block;
- }
- label {
- font-weight: var(--font-weight-bold);
- }
- .schemes {
- display: flex;
- justify-content: space-between;
- }
- .commands {
- display: flex;
- flex-direction: column;
- }
- gr-shell-command {
- width: 60em;
- margin-bottom: var(--spacing-m);
- }
- .hidden {
- display: none;
- }
- </style>
- <div class="schemes">
- <paper-tabs id="downloadTabs" class\$="[[_computeShowTabs(schemes)]]" selected="[[_computeSelected(schemes, selectedScheme)]]" on-selected-changed="_handleTabChange">
- <template is="dom-repeat" items="[[schemes]]" as="scheme">
- <paper-tab data-scheme\$="[[scheme]]">[[scheme]]</paper-tab>
- </template>
- </paper-tabs>
- </div>
- <div class="commands" hidden\$="[[!schemes.length]]" hidden="">
- <template is="dom-repeat" items="[[commands]]" as="command">
- <gr-shell-command label="[[command.title]]" command="[[command.command]]"></gr-shell-command>
+ <style include="shared-styles">
+ paper-tabs {
+ height: 3rem;
+ margin-bottom: var(--spacing-m);
+ --paper-tabs-selection-bar-color: var(--link-color);
+ }
+ paper-tab {
+ max-width: 15rem;
+ text-transform: uppercase;
+ --paper-tab-ink: var(--link-color);
+ }
+ label,
+ input {
+ display: block;
+ }
+ label {
+ font-weight: var(--font-weight-bold);
+ }
+ .schemes {
+ display: flex;
+ justify-content: space-between;
+ }
+ .commands {
+ display: flex;
+ flex-direction: column;
+ }
+ gr-shell-command {
+ width: 60em;
+ margin-bottom: var(--spacing-m);
+ }
+ .hidden {
+ display: none;
+ }
+ </style>
+ <div class="schemes">
+ <paper-tabs
+ id="downloadTabs"
+ class$="[[_computeShowTabs(schemes)]]"
+ selected="[[_computeSelected(schemes, selectedScheme)]]"
+ on-selected-changed="_handleTabChange"
+ >
+ <template is="dom-repeat" items="[[schemes]]" as="scheme">
+ <paper-tab data-scheme$="[[scheme]]">[[scheme]]</paper-tab>
</template>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ </paper-tabs>
+ </div>
+ <div class="commands" hidden$="[[!schemes.length]]" hidden="">
+ <template is="dom-repeat" items="[[commands]]" as="command">
+ <gr-shell-command
+ label="[[command.title]]"
+ command="[[command.command]]"
+ ></gr-shell-command>
+ </template>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list_html.js b/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list_html.js
index 3b454c2..0f80af2 100644
--- a/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-dropdown-list/gr-dropdown-list_html.js
@@ -17,135 +17,158 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: inline-block;
- }
- #triggerText {
- -moz-user-select: text;
- -ms-user-select: text;
- -webkit-user-select: text;
- user-select: text;
- }
- .dropdown-trigger {
- cursor: pointer;
+ <style include="shared-styles">
+ :host {
+ display: inline-block;
+ }
+ #triggerText {
+ -moz-user-select: text;
+ -ms-user-select: text;
+ -webkit-user-select: text;
+ user-select: text;
+ }
+ .dropdown-trigger {
+ cursor: pointer;
+ padding: 0;
+ }
+ .dropdown-content {
+ background-color: var(--dropdown-background-color);
+ box-shadow: var(--elevation-level-2);
+ max-height: 70vh;
+ margin-top: var(--spacing-xxl);
+ min-width: 266px;
+ @apply --dropdown-content-style;
+ }
+ paper-listbox {
+ --paper-listbox: {
padding: 0;
}
- .dropdown-content {
- background-color: var(--dropdown-background-color);
- box-shadow: var(--elevation-level-2);
- max-height: 70vh;
- margin-top: var(--spacing-xxl);
- min-width: 266px;
- @apply --dropdown-content-style;
- }
- paper-listbox {
- --paper-listbox: {
- padding: 0;
- }
- }
- paper-item {
- cursor: pointer;
- flex-direction: column;
- font-size: inherit;
- /* This variable was introduced in Dec 2019. We keep both min-height
+ }
+ paper-item {
+ cursor: pointer;
+ flex-direction: column;
+ font-size: inherit;
+ /* This variable was introduced in Dec 2019. We keep both min-height
* rules around, because --paper-item-min-height is not yet upstreamed.
*/
- --paper-item-min-height: 0;
- --paper-item: {
- min-height: 0;
- padding: 10px 16px;
- };
- --paper-item-focused-before: {
- background-color: var(--selection-background-color);
- };
- --paper-item-focused: {
- background-color: var(--selection-background-color);
- };
+ --paper-item-min-height: 0;
+ --paper-item: {
+ min-height: 0;
+ padding: 10px 16px;
}
- paper-item:hover {
- background-color: var(--hover-background-color);
+ --paper-item-focused-before: {
+ background-color: var(--selection-background-color);
}
- paper-item:not(:last-of-type) {
- border-bottom: 1px solid var(--border-color);
+ --paper-item-focused: {
+ background-color: var(--selection-background-color);
}
- .bottomContent {
- color: var(--deemphasized-text-color);
+ }
+ paper-item:hover {
+ background-color: var(--hover-background-color);
+ }
+ paper-item:not(:last-of-type) {
+ border-bottom: 1px solid var(--border-color);
+ }
+ .bottomContent {
+ color: var(--deemphasized-text-color);
+ }
+ .bottomContent,
+ .topContent {
+ display: flex;
+ justify-content: space-between;
+ flex-direction: row;
+ width: 100%;
+ }
+ gr-button {
+ --gr-button: {
+ @apply --trigger-style;
}
- .bottomContent,
- .topContent {
- display: flex;
- justify-content: space-between;
- flex-direction: row;
- width: 100%;
- }
- gr-button {
- --gr-button: {
- @apply --trigger-style;
- }
- }
- gr-date-formatter {
- color: var(--deemphasized-text-color);
- margin-left: var(--spacing-xxl);
- white-space: nowrap;
- }
- gr-select {
- display: none;
- }
- /* Because the iron dropdown 'area' includes the trigger, and the entire
+ }
+ gr-date-formatter {
+ color: var(--deemphasized-text-color);
+ margin-left: var(--spacing-xxl);
+ white-space: nowrap;
+ }
+ gr-select {
+ display: none;
+ }
+ /* Because the iron dropdown 'area' includes the trigger, and the entire
width of the dropdown, we want to treat tapping the area above the
dropdown content as if it is tapping whatever content is underneath it.
The next two styles allow this to happen. */
+ iron-dropdown {
+ max-width: none;
+ pointer-events: none;
+ }
+ paper-listbox {
+ pointer-events: auto;
+ }
+ @media only screen and (max-width: 50em) {
+ gr-select {
+ display: inline;
+ @apply --gr-select-style;
+ }
+ gr-button,
iron-dropdown {
- max-width: none;
- pointer-events: none;
+ display: none;
}
- paper-listbox {
- pointer-events: auto;
+ select {
+ @apply --native-select-style;
}
- @media only screen and (max-width: 50em) {
- gr-select {
- display: inline;
- @apply --gr-select-style;
- }
- gr-button,
- iron-dropdown {
- display: none;
- }
- select {
- @apply --native-select-style;
- }
- }
- </style>
- <gr-button disabled="[[disabled]]" down-arrow="" link="" id="trigger" class="dropdown-trigger" on-click="_showDropdownTapHandler" slot="dropdown-trigger">
- <span id="triggerText">[[text]]</span>
- </gr-button>
- <iron-dropdown id="dropdown" vertical-align="top" allow-outside-scroll="true" on-click="_handleDropdownClick">
- <paper-listbox class="dropdown-content" slot="dropdown-content" attr-for-selected="data-value" selected="{{value}}" on-tap="_handleDropdownTap">
- <template is="dom-repeat" items="[[items]]" initial-count="[[initialCount]]">
- <paper-item disabled="[[item.disabled]]" data-value\$="[[item.value]]">
- <div class="topContent">
- <div>[[item.text]]</div>
- <template is="dom-if" if="[[item.date]]">
- <gr-date-formatter date-str="[[item.date]]"></gr-date-formatter>
- </template>
- </div>
- <template is="dom-if" if="[[item.bottomText]]">
- <div class="bottomContent">
- <div>[[item.bottomText]]</div>
- </div>
+ }
+ </style>
+ <gr-button
+ disabled="[[disabled]]"
+ down-arrow=""
+ link=""
+ id="trigger"
+ class="dropdown-trigger"
+ on-click="_showDropdownTapHandler"
+ slot="dropdown-trigger"
+ >
+ <span id="triggerText">[[text]]</span>
+ </gr-button>
+ <iron-dropdown
+ id="dropdown"
+ vertical-align="top"
+ allow-outside-scroll="true"
+ on-click="_handleDropdownClick"
+ >
+ <paper-listbox
+ class="dropdown-content"
+ slot="dropdown-content"
+ attr-for-selected="data-value"
+ selected="{{value}}"
+ on-tap="_handleDropdownTap"
+ >
+ <template
+ is="dom-repeat"
+ items="[[items]]"
+ initial-count="[[initialCount]]"
+ >
+ <paper-item disabled="[[item.disabled]]" data-value$="[[item.value]]">
+ <div class="topContent">
+ <div>[[item.text]]</div>
+ <template is="dom-if" if="[[item.date]]">
+ <gr-date-formatter date-str="[[item.date]]"></gr-date-formatter>
</template>
- </paper-item>
- </template>
- </paper-listbox>
- </iron-dropdown>
- <gr-select bind-value="{{value}}">
- <select>
- <template is="dom-repeat" items="[[items]]">
- <option disabled\$="[[item.disabled]]" value="[[item.value]]">
- [[_computeMobileText(item)]]
- </option>
- </template>
- </select>
- </gr-select>
+ </div>
+ <template is="dom-if" if="[[item.bottomText]]">
+ <div class="bottomContent">
+ <div>[[item.bottomText]]</div>
+ </div>
+ </template>
+ </paper-item>
+ </template>
+ </paper-listbox>
+ </iron-dropdown>
+ <gr-select bind-value="{{value}}">
+ <select>
+ <template is="dom-repeat" items="[[items]]">
+ <option disabled$="[[item.disabled]]" value="[[item.value]]">
+ [[_computeMobileText(item)]]
+ </option>
+ </template>
+ </select>
+ </gr-select>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown_html.js b/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown_html.js
index 99028af..d0b0d09 100644
--- a/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-dropdown/gr-dropdown_html.js
@@ -17,102 +17,153 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: inline-block;
- }
- .dropdown-trigger {
- text-decoration: none;
- width: 100%;
- }
- .dropdown-content {
- background-color: var(--dropdown-background-color);
- box-shadow: var(--elevation-level-2);
- }
- gr-button {
- @apply --gr-button;
- }
- gr-avatar {
- height: 2em;
- width: 2em;
- vertical-align: middle;
- }
- gr-button[link]:focus {
- outline: 5px auto -webkit-focus-ring-color;
- }
- ul {
- list-style: none;
- }
- .topContent,
- li {
- border-bottom: 1px solid var(--border-color);
- }
- li:last-of-type {
- border: none;
- }
- li .itemAction {
- cursor: pointer;
- display: block;
- padding: var(--spacing-m) var(--spacing-l);
- }
- li .itemAction {
- @apply --gr-dropdown-item;
- }
- li .itemAction.disabled {
- color: var(--deemphasized-text-color);
- cursor: default;
- }
- li .itemAction:link,
- li .itemAction:visited {
- text-decoration: none;
- }
- li .itemAction:not(.disabled):hover {
- background-color: var(--hover-background-color);
- }
- li:focus,
- li.selected {
- background-color: var(--selection-background-color);
- outline: none;
- }
- li:focus .itemAction,
- li.selected .itemAction {
- background-color: transparent;
- }
- .topContent {
- display: block;
- padding: var(--spacing-m) var(--spacing-l);
- @apply --gr-dropdown-item;
- }
- .bold-text {
- font-weight: var(--font-weight-bold);
- }
- </style>
- <gr-button link="[[link]]" class="dropdown-trigger" id="trigger" down-arrow="[[downArrow]]" on-click="_dropdownTriggerTapHandler">
- <slot></slot>
- </gr-button>
- <iron-dropdown id="dropdown" vertical-align="top" vertical-offset="[[verticalOffset]]" allow-outside-scroll="true" horizontal-align="[[horizontalAlign]]" on-click="_handleDropdownClick">
- <div class="dropdown-content" slot="dropdown-content">
- <ul>
- <template is="dom-if" if="[[topContent]]">
- <div class="topContent">
- <template is="dom-repeat" items="[[topContent]]" as="item" initial-count="75">
- <div class\$="[[_getClassIfBold(item.bold)]] top-item" tabindex="-1">
- [[item.text]]
- </div>
- </template>
- </div>
- </template>
- <template is="dom-repeat" items="[[items]]" as="link" initial-count="75">
- <li tabindex="-1">
- <gr-tooltip-content has-tooltip="[[_computeHasTooltip(link.tooltip)]]" title\$="[[link.tooltip]]">
- <span class\$="itemAction [[_computeDisabledClass(link.id, disabledIds.*)]]" data-id\$="[[link.id]]" on-click="_handleItemTap" hidden\$="[[link.url]]" tabindex="-1">[[link.name]]</span>
- <a class="itemAction" href\$="[[_computeLinkURL(link)]]" download\$="[[_computeIsDownload(link)]]" rel\$="[[_computeLinkRel(link)]]" target\$="[[link.target]]" hidden\$="[[!link.url]]" tabindex="-1">[[link.name]]</a>
- </gr-tooltip-content>
- </li>
- </template>
- </ul>
- </div>
- </iron-dropdown>
- <gr-cursor-manager id="cursor" cursor-target-class="selected" scroll-behavior="never" focus-on-move="" stops="[[_listElements]]"></gr-cursor-manager>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <style include="shared-styles">
+ :host {
+ display: inline-block;
+ }
+ .dropdown-trigger {
+ text-decoration: none;
+ width: 100%;
+ }
+ .dropdown-content {
+ background-color: var(--dropdown-background-color);
+ box-shadow: var(--elevation-level-2);
+ }
+ gr-button {
+ @apply --gr-button;
+ }
+ gr-avatar {
+ height: 2em;
+ width: 2em;
+ vertical-align: middle;
+ }
+ gr-button[link]:focus {
+ outline: 5px auto -webkit-focus-ring-color;
+ }
+ ul {
+ list-style: none;
+ }
+ .topContent,
+ li {
+ border-bottom: 1px solid var(--border-color);
+ }
+ li:last-of-type {
+ border: none;
+ }
+ li .itemAction {
+ cursor: pointer;
+ display: block;
+ padding: var(--spacing-m) var(--spacing-l);
+ }
+ li .itemAction {
+ @apply --gr-dropdown-item;
+ }
+ li .itemAction.disabled {
+ color: var(--deemphasized-text-color);
+ cursor: default;
+ }
+ li .itemAction:link,
+ li .itemAction:visited {
+ text-decoration: none;
+ }
+ li .itemAction:not(.disabled):hover {
+ background-color: var(--hover-background-color);
+ }
+ li:focus,
+ li.selected {
+ background-color: var(--selection-background-color);
+ outline: none;
+ }
+ li:focus .itemAction,
+ li.selected .itemAction {
+ background-color: transparent;
+ }
+ .topContent {
+ display: block;
+ padding: var(--spacing-m) var(--spacing-l);
+ @apply --gr-dropdown-item;
+ }
+ .bold-text {
+ font-weight: var(--font-weight-bold);
+ }
+ </style>
+ <gr-button
+ link="[[link]]"
+ class="dropdown-trigger"
+ id="trigger"
+ down-arrow="[[downArrow]]"
+ on-click="_dropdownTriggerTapHandler"
+ >
+ <slot></slot>
+ </gr-button>
+ <iron-dropdown
+ id="dropdown"
+ vertical-align="top"
+ vertical-offset="[[verticalOffset]]"
+ allow-outside-scroll="true"
+ horizontal-align="[[horizontalAlign]]"
+ on-click="_handleDropdownClick"
+ >
+ <div class="dropdown-content" slot="dropdown-content">
+ <ul>
+ <template is="dom-if" if="[[topContent]]">
+ <div class="topContent">
+ <template
+ is="dom-repeat"
+ items="[[topContent]]"
+ as="item"
+ initial-count="75"
+ >
+ <div
+ class$="[[_getClassIfBold(item.bold)]] top-item"
+ tabindex="-1"
+ >
+ [[item.text]]
+ </div>
+ </template>
+ </div>
+ </template>
+ <template
+ is="dom-repeat"
+ items="[[items]]"
+ as="link"
+ initial-count="75"
+ >
+ <li tabindex="-1">
+ <gr-tooltip-content
+ has-tooltip="[[_computeHasTooltip(link.tooltip)]]"
+ title$="[[link.tooltip]]"
+ >
+ <span
+ class$="itemAction [[_computeDisabledClass(link.id, disabledIds.*)]]"
+ data-id$="[[link.id]]"
+ on-click="_handleItemTap"
+ hidden$="[[link.url]]"
+ tabindex="-1"
+ >[[link.name]]</span
+ >
+ <a
+ class="itemAction"
+ href$="[[_computeLinkURL(link)]]"
+ download$="[[_computeIsDownload(link)]]"
+ rel$="[[_computeLinkRel(link)]]"
+ target$="[[link.target]]"
+ hidden$="[[!link.url]]"
+ tabindex="-1"
+ >[[link.name]]</a
+ >
+ </gr-tooltip-content>
+ </li>
+ </template>
+ </ul>
+ </div>
+ </iron-dropdown>
+ <gr-cursor-manager
+ id="cursor"
+ cursor-target-class="selected"
+ scroll-behavior="never"
+ focus-on-move=""
+ stops="[[_listElements]]"
+ ></gr-cursor-manager>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content_html.js b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content_html.js
index e0e5047..24eb0b0 100644
--- a/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-editable-content/gr-editable-content_html.js
@@ -17,51 +17,59 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- }
- :host([disabled]) iron-autogrow-textarea {
- opacity: .5;
- }
- .viewer {
- background-color: var(--view-background-color);
- border: 1px solid var(--view-background-color);
- border-radius: var(--border-radius);
- box-shadow: var(--elevation-level-1);
- padding: var(--spacing-m);
- }
- :host([collapsed]) .viewer {
- max-height: 36em;
- overflow: hidden;
- }
- .editor iron-autogrow-textarea {
- background-color: var(--view-background-color);
- width: 100%;
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ :host([disabled]) iron-autogrow-textarea {
+ opacity: 0.5;
+ }
+ .viewer {
+ background-color: var(--view-background-color);
+ border: 1px solid var(--view-background-color);
+ border-radius: var(--border-radius);
+ box-shadow: var(--elevation-level-1);
+ padding: var(--spacing-m);
+ }
+ :host([collapsed]) .viewer {
+ max-height: 36em;
+ overflow: hidden;
+ }
+ .editor iron-autogrow-textarea {
+ background-color: var(--view-background-color);
+ width: 100%;
- /* You have to also repeat everything from shared-styles here, because
+ /* You have to also repeat everything from shared-styles here, because
you can only *replace* --iron-autogrow-textarea vars as a whole. */
- --iron-autogrow-textarea: {
- box-sizing: border-box;
- padding: var(--spacing-m);
- overflow-y: hidden;
- white-space: pre;
- };
+ --iron-autogrow-textarea: {
+ box-sizing: border-box;
+ padding: var(--spacing-m);
+ overflow-y: hidden;
+ white-space: pre;
}
- .editButtons {
- display: flex;
- justify-content: space-between;
- }
- </style>
- <div class="viewer" hidden\$="[[editing]]">
- <slot></slot>
+ }
+ .editButtons {
+ display: flex;
+ justify-content: space-between;
+ }
+ </style>
+ <div class="viewer" hidden$="[[editing]]">
+ <slot></slot>
+ </div>
+ <div class="editor" hidden$="[[!editing]]">
+ <iron-autogrow-textarea
+ autocomplete="on"
+ bind-value="{{_newContent}}"
+ disabled="[[disabled]]"
+ ></iron-autogrow-textarea>
+ <div class="editButtons">
+ <gr-button primary="" on-click="_handleSave" disabled="[[_saveDisabled]]"
+ >Save</gr-button
+ >
+ <gr-button on-click="_handleCancel" disabled="[[disabled]]"
+ >Cancel</gr-button
+ >
</div>
- <div class="editor" hidden\$="[[!editing]]">
- <iron-autogrow-textarea autocomplete="on" bind-value="{{_newContent}}" disabled="[[disabled]]"></iron-autogrow-textarea>
- <div class="editButtons">
- <gr-button primary="" on-click="_handleSave" disabled="[[_saveDisabled]]">Save</gr-button>
- <gr-button on-click="_handleCancel" disabled="[[disabled]]">Cancel</gr-button>
- </div>
- </div>
- <gr-storage id="storage"></gr-storage>
+ </div>
+ <gr-storage id="storage"></gr-storage>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label_html.js b/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label_html.js
index 9bc31a3..a226e30 100644
--- a/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-editable-label/gr-editable-label_html.js
@@ -17,68 +17,87 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- align-items: center;
- display: inline-flex;
+ <style include="shared-styles">
+ :host {
+ align-items: center;
+ display: inline-flex;
+ }
+ :host([uppercase]) label {
+ text-transform: uppercase;
+ }
+ input,
+ label {
+ width: 100%;
+ }
+ label {
+ color: var(--deemphasized-text-color);
+ display: inline-block;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ white-space: nowrap;
+ @apply --label-style;
+ }
+ label.editable {
+ color: var(--link-color);
+ cursor: pointer;
+ }
+ #dropdown {
+ box-shadow: var(--elevation-level-2);
+ }
+ .inputContainer {
+ background-color: var(--dialog-background-color);
+ padding: var(--spacing-m);
+ @apply --input-style;
+ }
+ .buttons {
+ display: flex;
+ justify-content: flex-end;
+ padding-top: var(--spacing-l);
+ width: 100%;
+ }
+ .buttons gr-button {
+ margin-left: var(--spacing-m);
+ }
+ paper-input {
+ --paper-input-container: {
+ padding: 0;
+ min-width: 15em;
}
- :host([uppercase]) label {
- text-transform: uppercase;
+ --paper-input-container-input: {
+ font-size: inherit;
}
- input,
- label {
- width: 100%;
- }
- label {
- color: var(--deemphasized-text-color);
- display: inline-block;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- @apply --label-style;
- }
- label.editable {
- color: var(--link-color);
- cursor: pointer;
- }
- #dropdown {
- box-shadow: var(--elevation-level-2);
- }
- .inputContainer {
- background-color: var(--dialog-background-color);
- padding: var(--spacing-m);
- @apply --input-style;
- }
- .buttons {
- display: flex;
- justify-content: flex-end;
- padding-top: var(--spacing-l);
- width: 100%;
- }
- .buttons gr-button {
- margin-left: var(--spacing-m);
- }
- paper-input {
- --paper-input-container: {
- padding: 0;
- min-width: 15em;
- }
- --paper-input-container-input: {
- font-size: inherit;
- }
- --paper-input-container-focus-color: var(--link-color);
- }
- </style>
- <label class\$="[[_computeLabelClass(readOnly, value, placeholder)]]" title\$="[[_computeLabel(value, placeholder)]]" on-click="_showDropdown">[[_computeLabel(value, placeholder)]]</label>
- <iron-dropdown id="dropdown" vertical-align="auto" horizontal-align="auto" vertical-offset="[[_verticalOffset]]" allow-outside-scroll="true" on-iron-overlay-canceled="_cancel">
- <div class="dropdown-content" slot="dropdown-content">
- <div class="inputContainer">
- <paper-input id="input" label="[[labelText]]" maxlength="[[maxLength]]" value="{{_inputText}}"></paper-input>
- <div class="buttons">
- <gr-button link="" id="cancelBtn" on-click="_cancel">cancel</gr-button>
- <gr-button link="" id="saveBtn" on-click="_save">save</gr-button>
- </div>
- </div>
+ --paper-input-container-focus-color: var(--link-color);
+ }
+ </style>
+ <label
+ class$="[[_computeLabelClass(readOnly, value, placeholder)]]"
+ title$="[[_computeLabel(value, placeholder)]]"
+ on-click="_showDropdown"
+ >[[_computeLabel(value, placeholder)]]</label
+ >
+ <iron-dropdown
+ id="dropdown"
+ vertical-align="auto"
+ horizontal-align="auto"
+ vertical-offset="[[_verticalOffset]]"
+ allow-outside-scroll="true"
+ on-iron-overlay-canceled="_cancel"
+ >
+ <div class="dropdown-content" slot="dropdown-content">
+ <div class="inputContainer">
+ <paper-input
+ id="input"
+ label="[[labelText]]"
+ maxlength="[[maxLength]]"
+ value="{{_inputText}}"
+ ></paper-input>
+ <div class="buttons">
+ <gr-button link="" id="cancelBtn" on-click="_cancel"
+ >cancel</gr-button
+ >
+ <gr-button link="" id="saveBtn" on-click="_save">save</gr-button>
</div>
- </iron-dropdown>
+ </div>
+ </div>
+ </iron-dropdown>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-fixed-panel/gr-fixed-panel_html.js b/polygerrit-ui/app/elements/shared/gr-fixed-panel/gr-fixed-panel_html.js
index 69ae735..61e8b24 100644
--- a/polygerrit-ui/app/elements/shared/gr-fixed-panel/gr-fixed-panel_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-fixed-panel/gr-fixed-panel_html.js
@@ -17,31 +17,34 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- box-sizing: border-box;
- display: block;
- min-height: var(--header-height);
- position: relative;
- }
- header {
- background: inherit;
- border: inherit;
- display: inline;
- height: inherit;
- }
- .floating {
- left: 0;
- position: fixed;
- width: 100%;
- will-change: top;
- }
- .fixedAtTop {
- border-bottom: 1px solid #a4a4a4;
- box-shadow: var(--elevation-level-2);
- }
- </style>
- <header id="header" class\$="[[_computeHeaderClass(_headerFloating, _topLast)]]">
- <slot></slot>
- </header>
+ <style include="shared-styles">
+ :host {
+ box-sizing: border-box;
+ display: block;
+ min-height: var(--header-height);
+ position: relative;
+ }
+ header {
+ background: inherit;
+ border: inherit;
+ display: inline;
+ height: inherit;
+ }
+ .floating {
+ left: 0;
+ position: fixed;
+ width: 100%;
+ will-change: top;
+ }
+ .fixedAtTop {
+ border-bottom: 1px solid #a4a4a4;
+ box-shadow: var(--elevation-level-2);
+ }
+ </style>
+ <header
+ id="header"
+ class$="[[_computeHeaderClass(_headerFloating, _topLast)]]"
+ >
+ <slot></slot>
+ </header>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text_html.js b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text_html.js
index 2b50565..5cb8670 100644
--- a/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-formatted-text/gr-formatted-text_html.js
@@ -17,50 +17,49 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- font-family: var(--font-family);
- }
- p,
- ul,
- code,
- blockquote,
- gr-linked-text.pre {
- margin: 0 0 var(--spacing-m) 0;
- }
- p,
- ul,
- code,
- blockquote {
- max-width: var(--gr-formatted-text-prose-max-width, none);
- }
- :host(.noTrailingMargin) p:last-child,
- :host(.noTrailingMargin) ul:last-child,
- :host(.noTrailingMargin) blockquote:last-child,
- :host(.noTrailingMargin) gr-linked-text.pre:last-child {
- margin: 0;
- }
- code,
- blockquote {
- border-left: 1px solid #aaa;
- padding: 0 var(--spacing-m);
- }
- code {
- display: block;
- white-space: pre-wrap;
- color: var(--deemphasized-text-color);
- }
- li {
- list-style-type: disc;
- margin-left: var(--spacing-xl);
- }
- gr-linked-text.pre {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-code);
- line-height: var(--line-height-code);
- }
-
- </style>
- <div id="container"></div>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ font-family: var(--font-family);
+ }
+ p,
+ ul,
+ code,
+ blockquote,
+ gr-linked-text.pre {
+ margin: 0 0 var(--spacing-m) 0;
+ }
+ p,
+ ul,
+ code,
+ blockquote {
+ max-width: var(--gr-formatted-text-prose-max-width, none);
+ }
+ :host(.noTrailingMargin) p:last-child,
+ :host(.noTrailingMargin) ul:last-child,
+ :host(.noTrailingMargin) blockquote:last-child,
+ :host(.noTrailingMargin) gr-linked-text.pre:last-child {
+ margin: 0;
+ }
+ code,
+ blockquote {
+ border-left: 1px solid #aaa;
+ padding: 0 var(--spacing-m);
+ }
+ code {
+ display: block;
+ white-space: pre-wrap;
+ color: var(--deemphasized-text-color);
+ }
+ li {
+ list-style-type: disc;
+ margin-left: var(--spacing-xl);
+ }
+ gr-linked-text.pre {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-code);
+ line-height: var(--line-height-code);
+ }
+ </style>
+ <div id="container"></div>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account_html.js b/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account_html.js
index 0763420..8d14ff4 100644
--- a/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-hovercard-account/gr-hovercard-account_html.js
@@ -18,79 +18,79 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="gr-hovercard-shared-style">
- .top,
- .attention,
- .status,
- .voteable {
- padding: var(--spacing-s) var(--spacing-l);
+ <style include="gr-hovercard-shared-style">
+ .top,
+ .attention,
+ .status,
+ .voteable {
+ padding: var(--spacing-s) var(--spacing-l);
+ }
+ .top {
+ display: flex;
+ padding-top: var(--spacing-xl);
+ min-width: 300px;
+ }
+ gr-avatar {
+ height: 48px;
+ width: 48px;
+ margin-right: var(--spacing-l);
+ }
+ .title,
+ .email {
+ color: var(--deemphasized-text-color);
+ }
+ .status iron-icon {
+ width: 14px;
+ height: 14px;
+ vertical-align: top;
+ position: relative;
+ top: 2px;
+ }
+ .action {
+ border-top: 1px solid var(--border-color);
+ padding: var(--spacing-s) var(--spacing-l);
+ --gr-button: {
+ padding: var(--spacing-s) 0;
}
- .top {
- display: flex;
- padding-top: var(--spacing-xl);
- min-width: 300px;
- }
- gr-avatar {
- height: 48px;
- width: 48px;
- margin-right: var(--spacing-l);
- }
- .title,
- .email {
- color: var(--deemphasized-text-color);
- }
- .status iron-icon {
- width: 14px;
- height: 14px;
- vertical-align: top;
- position: relative;
- top: 2px;
- }
- .action {
- border-top: 1px solid var(--border-color);
- padding: var(--spacing-s) var(--spacing-l);
- --gr-button: {
- padding: var(--spacing-s) 0;
- };
- }
- :host(:not([attention])) .attention {
- display: none;
- }
- .attention {
- background-color: var(--emphasis-color);
- }
- .attention iron-icon {
- vertical-align: top;
- }
- </style>
- <div id="container" role="tooltip" tabindex="-1">
- <div class="top">
- <div class="avatar">
- <gr-avatar account="[[account]]" image-size="56"></gr-avatar>
- </div>
- <div class="account">
- <h3 class="name">[[account.name]]</h3>
- <div class="email">[[account.email]]</div>
- </div>
+ }
+ :host(:not([attention])) .attention {
+ display: none;
+ }
+ .attention {
+ background-color: var(--emphasis-color);
+ }
+ .attention iron-icon {
+ vertical-align: top;
+ }
+ </style>
+ <div id="container" role="tooltip" tabindex="-1">
+ <div class="top">
+ <div class="avatar">
+ <gr-avatar account="[[account]]" image-size="56"></gr-avatar>
</div>
- <template is="dom-if" if="[[account.status]]">
- <div class="status">
- <span class="title">
- <iron-icon icon="gr-icons:calendar"></iron-icon>
- Status:
- </span>
- <span class="value">[[account.status]]</span>
- </div>
- </template>
- <template is="dom-if" if="[[voteableText]]">
- <div class="voteable">
- <span class="title">Voteable:</span>
- <span class="value">[[voteableText]]</span>
- </div>
- </template>
- <div class="attention">
- <iron-icon icon="gr-icons:attention"></iron-icon>
- <span>It is this user's turn to take action.</span>
+ <div class="account">
+ <h3 class="name">[[account.name]]</h3>
+ <div class="email">[[account.email]]</div>
</div>
</div>
+ <template is="dom-if" if="[[account.status]]">
+ <div class="status">
+ <span class="title">
+ <iron-icon icon="gr-icons:calendar"></iron-icon>
+ Status:
+ </span>
+ <span class="value">[[account.status]]</span>
+ </div>
+ </template>
+ <template is="dom-if" if="[[voteableText]]">
+ <div class="voteable">
+ <span class="title">Voteable:</span>
+ <span class="value">[[voteableText]]</span>
+ </div>
+ </template>
+ <div class="attention">
+ <iron-icon icon="gr-icons:attention"></iron-icon>
+ <span>It is this user's turn to take action.</span>
+ </div>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard_html.js b/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard_html.js
index 69fd4c5..67a3545 100644
--- a/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-hovercard/gr-hovercard_html.js
@@ -17,12 +17,12 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="gr-hovercard-shared-style">
- #container {
- padding: var(--spacing-l);
- }
- </style>
- <div id="container" role="tooltip" tabindex="-1">
- <slot></slot>
- </div>
+ <style include="gr-hovercard-shared-style">
+ #container {
+ padding: var(--spacing-l);
+ }
+ </style>
+ <div id="container" role="tooltip" tabindex="-1">
+ <slot></slot>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info_html.js b/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info_html.js
index d19467b..2a86669 100644
--- a/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-label-info/gr-label-info_html.js
@@ -17,89 +17,109 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="gr-voting-styles">
- /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
- </style>
- <style include="shared-styles">
- .placeholder {
- color: var(--deemphasized-text-color);
- padding-top: var(--spacing-xs);
- }
- .hidden {
- display: none;
- }
- .voteChip {
- display: flex;
- justify-content: center;
- margin-right: var(--spacing-s);
+ <style include="gr-voting-styles">
+ /* Workaround for empty style block - see https://github.com/Polymer/tools/issues/408 */
+ </style>
+ <style include="shared-styles">
+ .placeholder {
+ color: var(--deemphasized-text-color);
+ padding-top: var(--spacing-xs);
+ }
+ .hidden {
+ display: none;
+ }
+ .voteChip {
+ display: flex;
+ justify-content: center;
+ margin-right: var(--spacing-s);
+ padding: 0;
+ @apply --vote-chip-styles;
+ border-width: 0;
+ }
+ .max {
+ background-color: var(--vote-color-approved);
+ }
+ .min {
+ background-color: var(--vote-color-rejected);
+ }
+ .positive {
+ background-color: var(--vote-color-recommended);
+ }
+ .negative {
+ background-color: var(--vote-color-disliked);
+ }
+ .hidden {
+ display: none;
+ }
+ td {
+ vertical-align: top;
+ }
+ tr {
+ min-height: var(--line-height-normal);
+ }
+ gr-button {
+ vertical-align: top;
+ --gr-button: {
+ height: var(--line-height-normal);
+ width: var(--line-height-normal);
padding: 0;
- @apply --vote-chip-styles;
- border-width: 0;
}
- .max {
- background-color: var(--vote-color-approved);
- }
- .min {
- background-color: var(--vote-color-rejected);
- }
- .positive {
- background-color: var(--vote-color-recommended);
- }
- .negative {
- background-color: var(--vote-color-disliked);
- }
- .hidden {
- display: none;
- }
- td {
- vertical-align: top;
- }
- tr {
- min-height: var(--line-height-normal);
- }
- gr-button {
- vertical-align: top;
- --gr-button: {
- height: var(--line-height-normal);
- width: var(--line-height-normal);
- padding: 0;
- }
- }
- gr-button[disabled] iron-icon {
- color: var(--border-color);
- }
- gr-account-chip {
- margin-right: var(--spacing-xs);
- }
- iron-icon {
- height: calc(var(--line-height-normal) - 2px);
- width: calc(var(--line-height-normal) - 2px);
- }
- .labelValueContainer:not(:first-of-type) td {
- padding-top: var(--spacing-s);
- }
- </style>
- <p class\$="placeholder [[_computeShowPlaceholder(labelInfo, change.labels.*)]]">
- No votes.
- </p><table>
-
- <template is="dom-repeat" items="[[_mapLabelInfo(labelInfo, account, change.labels.*)]]" as="mappedLabel">
- <tr class="labelValueContainer">
- <td>
- <gr-label has-tooltip="" title="[[_computeValueTooltip(labelInfo, mappedLabel.value)]]" class\$="[[mappedLabel.className]] voteChip">
- [[mappedLabel.value]]
- </gr-label>
- </td>
- <td>
- <gr-account-chip account="[[mappedLabel.account]]" transparent-background=""></gr-account-chip>
- </td>
- <td>
- <gr-button link="" aria-label="Remove" on-click="_onDeleteVote" tooltip="Remove vote" data-account-id\$="[[mappedLabel.account._account_id]]" class\$="deleteBtn [[_computeDeleteClass(mappedLabel.account, mutable, change)]]">
- <iron-icon icon="gr-icons:delete"></iron-icon>
- </gr-button>
- </td>
- </tr>
- </template>
- </table>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ }
+ gr-button[disabled] iron-icon {
+ color: var(--border-color);
+ }
+ gr-account-chip {
+ margin-right: var(--spacing-xs);
+ }
+ iron-icon {
+ height: calc(var(--line-height-normal) - 2px);
+ width: calc(var(--line-height-normal) - 2px);
+ }
+ .labelValueContainer:not(:first-of-type) td {
+ padding-top: var(--spacing-s);
+ }
+ </style>
+ <p
+ class$="placeholder [[_computeShowPlaceholder(labelInfo, change.labels.*)]]"
+ >
+ No votes.
+ </p>
+ <table>
+ <template
+ is="dom-repeat"
+ items="[[_mapLabelInfo(labelInfo, account, change.labels.*)]]"
+ as="mappedLabel"
+ >
+ <tr class="labelValueContainer">
+ <td>
+ <gr-label
+ has-tooltip=""
+ title="[[_computeValueTooltip(labelInfo, mappedLabel.value)]]"
+ class$="[[mappedLabel.className]] voteChip"
+ >
+ [[mappedLabel.value]]
+ </gr-label>
+ </td>
+ <td>
+ <gr-account-chip
+ account="[[mappedLabel.account]]"
+ transparent-background=""
+ ></gr-account-chip>
+ </td>
+ <td>
+ <gr-button
+ link=""
+ aria-label="Remove"
+ on-click="_onDeleteVote"
+ tooltip="Remove vote"
+ data-account-id$="[[mappedLabel.account._account_id]]"
+ class$="deleteBtn [[_computeDeleteClass(mappedLabel.account, mutable, change)]]"
+ >
+ <iron-icon icon="gr-icons:delete"></iron-icon>
+ </gr-button>
+ </td>
+ </tr>
+ </template>
+ </table>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-label/gr-label_html.js b/polygerrit-ui/app/elements/shared/gr-label/gr-label_html.js
index 1644c07..c4310fc 100644
--- a/polygerrit-ui/app/elements/shared/gr-label/gr-label_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-label/gr-label_html.js
@@ -16,6 +16,4 @@
*/
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
-export const htmlTemplate = html`
- <slot></slot>
-`;
+export const htmlTemplate = html` <slot></slot> `;
diff --git a/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete_html.js b/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete_html.js
index fe0b03c..615a525 100644
--- a/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-labeled-autocomplete/gr-labeled-autocomplete_html.js
@@ -17,38 +17,45 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- width: 12em;
- }
- #container {
- background: var(--chip-background-color);
- border-radius: 1em;
- padding: var(--spacing-m);
- }
- #header {
- color: var(--deemphasized-text-color);
- font-weight: var(--font-weight-bold);
- font-size: var(--font-size-small);
- }
- #body {
- display: flex;
- }
- #trigger {
- color: var(--deemphasized-text-color);
- cursor: pointer;
- padding-left: var(--spacing-s);
- }
- #trigger:hover {
- color: var(--primary-text-color);
- }
- </style>
- <div id="container">
- <div id="header">[[label]]</div>
- <div id="body">
- <gr-autocomplete id="autocomplete" threshold="[[_autocompleteThreshold]]" query="[[query]]" disabled="[[disabled]]" placeholder="[[placeholder]]" borderless=""></gr-autocomplete>
- <div id="trigger" on-click="_handleTriggerClick">▼</div>
- </div>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ width: 12em;
+ }
+ #container {
+ background: var(--chip-background-color);
+ border-radius: 1em;
+ padding: var(--spacing-m);
+ }
+ #header {
+ color: var(--deemphasized-text-color);
+ font-weight: var(--font-weight-bold);
+ font-size: var(--font-size-small);
+ }
+ #body {
+ display: flex;
+ }
+ #trigger {
+ color: var(--deemphasized-text-color);
+ cursor: pointer;
+ padding-left: var(--spacing-s);
+ }
+ #trigger:hover {
+ color: var(--primary-text-color);
+ }
+ </style>
+ <div id="container">
+ <div id="header">[[label]]</div>
+ <div id="body">
+ <gr-autocomplete
+ id="autocomplete"
+ threshold="[[_autocompleteThreshold]]"
+ query="[[query]]"
+ disabled="[[disabled]]"
+ placeholder="[[placeholder]]"
+ borderless=""
+ ></gr-autocomplete>
+ <div id="trigger" on-click="_handleTriggerClick">▼</div>
</div>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader_html.js b/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader_html.js
index 3bc0d72..204aa87 100644
--- a/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-lib-loader/gr-lib-loader_html.js
@@ -17,5 +17,5 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
+ <gr-js-api-interface id="jsAPI"></gr-js-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text_html.js b/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text_html.js
index c14f9f9..6bcce8c 100644
--- a/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-limited-text/gr-limited-text_html.js
@@ -16,6 +16,4 @@
*/
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
-export const htmlTemplate = html`
-[[_computeDisplayText(text, limit)]]
-`;
+export const htmlTemplate = html` [[_computeDisplayText(text, limit)]] `;
diff --git a/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip_html.js b/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip_html.js
index c028d02..f1f5f46 100644
--- a/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-linked-chip/gr-linked-chip_html.js
@@ -17,65 +17,72 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- overflow: hidden;
+ <style include="shared-styles">
+ :host {
+ display: block;
+ overflow: hidden;
+ }
+ .container {
+ align-items: center;
+ background: var(--chip-background-color);
+ border-radius: 0.75em;
+ display: inline-flex;
+ padding: 0 var(--spacing-m);
+ }
+ gr-button.remove {
+ --gr-remove-button-style: {
+ border: 0;
+ color: var(--deemphasized-text-color);
+ font-weight: var(--font-weight-normal);
+ height: 0.6em;
+ line-height: 10px;
+ margin-left: var(--spacing-xs);
+ padding: 0;
+ text-decoration: none;
}
- .container {
- align-items: center;
- background: var(--chip-background-color);
- border-radius: .75em;
- display: inline-flex;
- padding: 0 var(--spacing-m);
- }
- gr-button.remove {
- --gr-remove-button-style: {
- border: 0;
- color: var(--deemphasized-text-color);
- font-weight: var(--font-weight-normal);
- height: .6em;
- line-height: 10px;
- margin-left: var(--spacing-xs);
- padding: 0;
- text-decoration: none;
- }
- }
+ }
- gr-button.remove:hover,
- gr-button.remove:focus {
- --gr-button: {
- @apply --gr-remove-button-style;
- color: #333;
- }
+ gr-button.remove:hover,
+ gr-button.remove:focus {
+ --gr-button: {
+ @apply --gr-remove-button-style;
+ color: #333;
}
- gr-button.remove {
- --gr-button: {
- @apply --gr-remove-button-style;
- }
+ }
+ gr-button.remove {
+ --gr-button: {
+ @apply --gr-remove-button-style;
}
- .transparentBackground,
- gr-button.transparentBackground {
- background-color: transparent;
- }
- :host([disabled]) {
- opacity: .6;
- pointer-events: none;
- }
- a {
- color: var(--linked-chip-text-color);
- }
- iron-icon {
- height: 1.2rem;
- width: 1.2rem;
- }
- </style>
- <div class\$="container [[_getBackgroundClass(transparentBackground)]]">
- <a href\$="[[href]]">
- <gr-limited-text limit="[[limit]]" text="[[text]]"></gr-limited-text>
- </a>
- <gr-button id="remove" link="" hidden\$="[[!removable]]" hidden="" class\$="remove [[_getBackgroundClass(transparentBackground)]]" on-click="_handleRemoveTap">
- <iron-icon icon="gr-icons:close"></iron-icon>
- </gr-button>
- </div>
+ }
+ .transparentBackground,
+ gr-button.transparentBackground {
+ background-color: transparent;
+ }
+ :host([disabled]) {
+ opacity: 0.6;
+ pointer-events: none;
+ }
+ a {
+ color: var(--linked-chip-text-color);
+ }
+ iron-icon {
+ height: 1.2rem;
+ width: 1.2rem;
+ }
+ </style>
+ <div class$="container [[_getBackgroundClass(transparentBackground)]]">
+ <a href$="[[href]]">
+ <gr-limited-text limit="[[limit]]" text="[[text]]"></gr-limited-text>
+ </a>
+ <gr-button
+ id="remove"
+ link=""
+ hidden$="[[!removable]]"
+ hidden=""
+ class$="remove [[_getBackgroundClass(transparentBackground)]]"
+ on-click="_handleRemoveTap"
+ >
+ <iron-icon icon="gr-icons:close"></iron-icon>
+ </gr-button>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text_html.js b/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text_html.js
index 43d7144..59bed1e 100644
--- a/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-linked-text/gr-linked-text_html.js
@@ -17,19 +17,19 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- }
- :host([pre]) span {
- white-space: var(--linked-text-white-space, pre-wrap);
- word-wrap: var(--linked-text-word-wrap, break-word);
- }
- :host([disabled]) a {
- color: inherit;
- text-decoration: none;
- pointer-events: none;
- }
- </style>
- <span id="output"></span>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ :host([pre]) span {
+ white-space: var(--linked-text-white-space, pre-wrap);
+ word-wrap: var(--linked-text-word-wrap, break-word);
+ }
+ :host([disabled]) a {
+ color: inherit;
+ text-decoration: none;
+ pointer-events: none;
+ }
+ </style>
+ <span id="output"></span>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view_html.js b/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view_html.js
index 0d33dd0..ff73d4d8 100644
--- a/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-list-view/gr-list-view_html.js
@@ -17,68 +17,83 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- #filter {
- max-width: 25em;
- }
- #filter:focus {
- outline: none;
- }
- #topContainer {
- align-items: center;
- display: flex;
- height: 3rem;
- justify-content: space-between;
- margin: 0 var(--spacing-l);
- }
- #createNewContainer:not(.show) {
- display: none;
- }
- a {
- color: var(--primary-text-color);
- text-decoration: none;
- }
- a:hover {
- text-decoration: underline;
- }
- nav {
- align-items: center;
- display: flex;
- height: 3rem;
- justify-content: flex-end;
- margin-right: 20px;
- }
- nav,
- iron-icon {
- color: var(--deemphasized-text-color);
- }
- iron-icon {
- height: 1.85rem;
- margin-left: 16px;
- width: 1.85rem;
- }
- </style>
- <div id="topContainer">
- <div class="filterContainer">
- <label>Filter:</label>
- <iron-input type="text" bind-value="{{filter}}">
- <input is="iron-input" type="text" id="filter" bind-value="{{filter}}">
- </iron-input>
- </div>
- <div id="createNewContainer" class\$="[[_computeCreateClass(createNew)]]">
- <gr-button primary="" link="" id="createNew" on-click="_createNewItem">
- Create New
- </gr-button>
- </div>
+ <style include="shared-styles">
+ #filter {
+ max-width: 25em;
+ }
+ #filter:focus {
+ outline: none;
+ }
+ #topContainer {
+ align-items: center;
+ display: flex;
+ height: 3rem;
+ justify-content: space-between;
+ margin: 0 var(--spacing-l);
+ }
+ #createNewContainer:not(.show) {
+ display: none;
+ }
+ a {
+ color: var(--primary-text-color);
+ text-decoration: none;
+ }
+ a:hover {
+ text-decoration: underline;
+ }
+ nav {
+ align-items: center;
+ display: flex;
+ height: 3rem;
+ justify-content: flex-end;
+ margin-right: 20px;
+ }
+ nav,
+ iron-icon {
+ color: var(--deemphasized-text-color);
+ }
+ iron-icon {
+ height: 1.85rem;
+ margin-left: 16px;
+ width: 1.85rem;
+ }
+ </style>
+ <div id="topContainer">
+ <div class="filterContainer">
+ <label>Filter:</label>
+ <iron-input type="text" bind-value="{{filter}}">
+ <input
+ is="iron-input"
+ type="text"
+ id="filter"
+ bind-value="{{filter}}"
+ />
+ </iron-input>
</div>
- <slot></slot>
- <nav>
- Page [[_computePage(offset, itemsPerPage)]]
- <a id="prevArrow" href\$="[[_computeNavLink(offset, -1, itemsPerPage, filter, path)]]" hidden\$="[[_hidePrevArrow(loading, offset)]]" hidden="">
- <iron-icon icon="gr-icons:chevron-left"></iron-icon>
- </a>
- <a id="nextArrow" href\$="[[_computeNavLink(offset, 1, itemsPerPage, filter, path)]]" hidden\$="[[_hideNextArrow(loading, items)]]" hidden="">
- <iron-icon icon="gr-icons:chevron-right"></iron-icon>
- </a>
- </nav>
+ <div id="createNewContainer" class$="[[_computeCreateClass(createNew)]]">
+ <gr-button primary="" link="" id="createNew" on-click="_createNewItem">
+ Create New
+ </gr-button>
+ </div>
+ </div>
+ <slot></slot>
+ <nav>
+ Page [[_computePage(offset, itemsPerPage)]]
+ <a
+ id="prevArrow"
+ href$="[[_computeNavLink(offset, -1, itemsPerPage, filter, path)]]"
+ hidden$="[[_hidePrevArrow(loading, offset)]]"
+ hidden=""
+ >
+ <iron-icon icon="gr-icons:chevron-left"></iron-icon>
+ </a>
+ <a
+ id="nextArrow"
+ href$="[[_computeNavLink(offset, 1, itemsPerPage, filter, path)]]"
+ hidden$="[[_hideNextArrow(loading, items)]]"
+ hidden=""
+ >
+ <iron-icon icon="gr-icons:chevron-right"></iron-icon>
+ </a>
+ </nav>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay_html.js b/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay_html.js
index 5fe000a..7123adb 100644
--- a/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-overlay/gr-overlay_html.js
@@ -17,24 +17,24 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- background: var(--dialog-background-color);
- border-radius: var(--border-radius);
- box-shadow: var(--elevation-level-5);
- }
+ <style include="shared-styles">
+ :host {
+ background: var(--dialog-background-color);
+ border-radius: var(--border-radius);
+ box-shadow: var(--elevation-level-5);
+ }
- @media screen and (max-width: 50em) {
- :host {
- height: 100%;
- left: 0;
- position: fixed;
- right: 0;
- top: 0;
- border-radius: 0;
- box-shadow: none;
- }
+ @media screen and (max-width: 50em) {
+ :host {
+ height: 100%;
+ left: 0;
+ position: fixed;
+ right: 0;
+ top: 0;
+ border-radius: 0;
+ box-shadow: none;
}
- </style>
- <slot></slot>
+ }
+ </style>
+ <slot></slot>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav_html.js b/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav_html.js
index fe17a1b..c5e9142 100644
--- a/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-page-nav/gr-page-nav_html.js
@@ -17,26 +17,26 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
+ <style include="shared-styles">
+ #nav {
+ background-color: var(--table-header-background-color);
+ border: 1px solid var(--border-color);
+ border-top: none;
+ height: 100%;
+ position: absolute;
+ top: 0;
+ width: 14em;
+ }
+ #nav.pinned {
+ position: fixed;
+ }
+ @media only screen and (max-width: 53em) {
#nav {
- background-color: var(--table-header-background-color);
- border: 1px solid var(--border-color);
- border-top: none;
- height: 100%;
- position: absolute;
- top: 0;
- width: 14em;
+ display: none;
}
- #nav.pinned {
- position: fixed;
- }
- @media only screen and (max-width: 53em) {
- #nav {
- display: none;
- }
- }
- </style>
- <nav id="nav">
- <slot></slot>
- </nav>
+ }
+ </style>
+ <nav id="nav">
+ <slot></slot>
+ </nav>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker_html.js b/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker_html.js
index fe6b522..0ce885a 100644
--- a/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-repo-branch-picker/gr-repo-branch-picker_html.js
@@ -17,24 +17,37 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: block;
- }
- gr-labeled-autocomplete,
- iron-icon {
- display: inline-block;
- }
- iron-icon {
- margin-bottom: var(--spacing-l);
- }
- </style>
- <div>
- <gr-labeled-autocomplete id="repoInput" label="Repository" placeholder="Select repo" on-commit="_repoCommitted" query="[[_repoQuery]]">
- </gr-labeled-autocomplete>
- <iron-icon icon="gr-icons:chevron-right"></iron-icon>
- <gr-labeled-autocomplete id="branchInput" label="Branch" placeholder="Select branch" disabled="[[_branchDisabled]]" on-commit="_branchCommitted" query="[[_query]]">
- </gr-labeled-autocomplete>
- </div>
- <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
+ <style include="shared-styles">
+ :host {
+ display: block;
+ }
+ gr-labeled-autocomplete,
+ iron-icon {
+ display: inline-block;
+ }
+ iron-icon {
+ margin-bottom: var(--spacing-l);
+ }
+ </style>
+ <div>
+ <gr-labeled-autocomplete
+ id="repoInput"
+ label="Repository"
+ placeholder="Select repo"
+ on-commit="_repoCommitted"
+ query="[[_repoQuery]]"
+ >
+ </gr-labeled-autocomplete>
+ <iron-icon icon="gr-icons:chevron-right"></iron-icon>
+ <gr-labeled-autocomplete
+ id="branchInput"
+ label="Branch"
+ placeholder="Select branch"
+ disabled="[[_branchDisabled]]"
+ on-commit="_branchCommitted"
+ query="[[_query]]"
+ >
+ </gr-labeled-autocomplete>
+ </div>
+ <gr-rest-api-interface id="restAPI"></gr-rest-api-interface>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-shell-command/gr-shell-command_html.js b/polygerrit-ui/app/elements/shared/gr-shell-command/gr-shell-command_html.js
index 8fbf2b6..4a4480e 100644
--- a/polygerrit-ui/app/elements/shared/gr-shell-command/gr-shell-command_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-shell-command/gr-shell-command_html.js
@@ -17,41 +17,42 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- .commandContainer {
- margin-bottom: var(--spacing-m);
+ <style include="shared-styles">
+ .commandContainer {
+ margin-bottom: var(--spacing-m);
+ }
+ .commandContainer {
+ background-color: var(--shell-command-background-color);
+ /* Should be spacing-m larger than the :before width. */
+ padding: var(--spacing-m) var(--spacing-m) var(--spacing-m)
+ calc(3 * var(--spacing-m) + 0.5em);
+ position: relative;
+ width: 100%;
+ }
+ .commandContainer:before {
+ content: '$';
+ position: absolute;
+ display: block;
+ box-sizing: border-box;
+ background: var(--shell-command-decoration-background-color);
+ top: 0;
+ bottom: 0;
+ left: 0;
+ /* Should be spacing-m smaller than the .commandContainer padding-left. */
+ width: calc(2 * var(--spacing-m) + 0.5em);
+ /* Should vertically match the padding of .commandContainer. */
+ padding: var(--spacing-m);
+ /* Should roughly match the height of .commandContainer without padding. */
+ line-height: 26px;
+ }
+ .commandContainer gr-copy-clipboard {
+ --text-container-style: {
+ border: none;
}
- .commandContainer {
- background-color: var(--shell-command-background-color);
- /* Should be spacing-m larger than the :before width. */
- padding: var(--spacing-m) var(--spacing-m) var(--spacing-m) calc(3*var(--spacing-m) + 0.5em);
- position: relative;
- width: 100%;
- }
- .commandContainer:before {
- content: '\$';
- position: absolute;
- display: block;
- box-sizing: border-box;
- background: var(--shell-command-decoration-background-color);
- top: 0;
- bottom: 0;
- left: 0;
- /* Should be spacing-m smaller than the .commandContainer padding-left. */
- width: calc(2*var(--spacing-m) + 0.5em);
- /* Should vertically match the padding of .commandContainer. */
- padding: var(--spacing-m);
- /* Should roughly match the height of .commandContainer without padding. */
- line-height: 26px;
- }
- .commandContainer gr-copy-clipboard {
- --text-container-style: {
- border: none;
- }
- }
- </style>
- <label>[[label]]</label>
- <div class="commandContainer">
- <gr-copy-clipboard text="[[command]]"></gr-copy-clipboard>
- </div>
+ }
+ </style>
+ <label>[[label]]</label>
+ <div class="commandContainer">
+ <gr-copy-clipboard text="[[command]]"></gr-copy-clipboard>
+ </div>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea_html.js b/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea_html.js
index 99dd52d..59135ec 100644
--- a/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-textarea/gr-textarea_html.js
@@ -17,62 +17,81 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- display: flex;
- position: relative;
- }
- :host(.monospace) {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-mono);
- line-height: var(--line-height-mono);
- font-weight: var(--font-weight-normal);
- }
- :host(.code) {
- font-family: var(--monospace-font-family);
- font-size: var(--font-size-code);
- line-height: var(--line-height-code);
- font-weight: var(--font-weight-normal);
- }
- #emojiSuggestions {
- font-family: var(--font-family);
- }
- gr-autocomplete {
- display: inline-block
- }
- #textarea {
- background-color: var(--view-background-color);
- width: 100%;
- }
- #hiddenText #emojiSuggestions {
- visibility: visible;
- white-space: normal;
- }
- iron-autogrow-textarea {
- position: relative;
+ <style include="shared-styles">
+ :host {
+ display: flex;
+ position: relative;
+ }
+ :host(.monospace) {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-mono);
+ line-height: var(--line-height-mono);
+ font-weight: var(--font-weight-normal);
+ }
+ :host(.code) {
+ font-family: var(--monospace-font-family);
+ font-size: var(--font-size-code);
+ line-height: var(--line-height-code);
+ font-weight: var(--font-weight-normal);
+ }
+ #emojiSuggestions {
+ font-family: var(--font-family);
+ }
+ gr-autocomplete {
+ display: inline-block;
+ }
+ #textarea {
+ background-color: var(--view-background-color);
+ width: 100%;
+ }
+ #hiddenText #emojiSuggestions {
+ visibility: visible;
+ white-space: normal;
+ }
+ iron-autogrow-textarea {
+ position: relative;
- /** This is needed for firefox */
- --iron-autogrow-textarea_-_white-space: pre-wrap;
- }
- #textarea.noBorder {
- border: none;
- }
- #hiddenText {
- display: block;
- float: left;
- position: absolute;
- visibility: hidden;
- width: 100%;
- white-space: pre-wrap;
- }
- </style>
- <div id="hiddenText"></div>
- <!-- When the autocomplete is open, the span is moved at the end of
+ /** This is needed for firefox */
+ --iron-autogrow-textarea_-_white-space: pre-wrap;
+ }
+ #textarea.noBorder {
+ border: none;
+ }
+ #hiddenText {
+ display: block;
+ float: left;
+ position: absolute;
+ visibility: hidden;
+ width: 100%;
+ white-space: pre-wrap;
+ }
+ </style>
+ <div id="hiddenText"></div>
+ <!-- When the autocomplete is open, the span is moved at the end of
hiddenText in order to correctly position the dropdown. After being moved,
it is set as the positionTarget for the emojiSuggestions dropdown. -->
- <span id="caratSpan"></span>
- <gr-autocomplete-dropdown vertical-align="top" horizontal-align="left" dynamic-align="" id="emojiSuggestions" suggestions="[[_suggestions]]" index="[[_index]]" vertical-offset="[[_verticalOffset]]" on-dropdown-closed="_resetEmojiDropdown" on-item-selected="_handleEmojiSelect">
- </gr-autocomplete-dropdown>
- <iron-autogrow-textarea id="textarea" autocomplete="[[autocomplete]]" placeholder="[[placeholder]]" disabled="[[disabled]]" rows="[[rows]]" max-rows="[[maxRows]]" value="{{text}}" on-bind-value-changed="_onValueChanged"></iron-autogrow-textarea>
- <gr-reporting id="reporting"></gr-reporting>
+ <span id="caratSpan"></span>
+ <gr-autocomplete-dropdown
+ vertical-align="top"
+ horizontal-align="left"
+ dynamic-align=""
+ id="emojiSuggestions"
+ suggestions="[[_suggestions]]"
+ index="[[_index]]"
+ vertical-offset="[[_verticalOffset]]"
+ on-dropdown-closed="_resetEmojiDropdown"
+ on-item-selected="_handleEmojiSelect"
+ >
+ </gr-autocomplete-dropdown>
+ <iron-autogrow-textarea
+ id="textarea"
+ autocomplete="[[autocomplete]]"
+ placeholder="[[placeholder]]"
+ disabled="[[disabled]]"
+ rows="[[rows]]"
+ max-rows="[[maxRows]]"
+ value="{{text}}"
+ on-bind-value-changed="_onValueChanged"
+ ></iron-autogrow-textarea>
+ <gr-reporting id="reporting"></gr-reporting>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content_html.js b/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content_html.js
index e4b5891..e5a2813 100644
--- a/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-tooltip-content/gr-tooltip-content_html.js
@@ -17,13 +17,14 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style>
- iron-icon {
- width: var(--line-height-normal);
- height: var(--line-height-normal);
- vertical-align: top;
- }
- </style>
- <slot></slot><!--
- --><iron-icon icon="gr-icons:info" hidden\$="[[!showIcon]]"></iron-icon>
+ <style>
+ iron-icon {
+ width: var(--line-height-normal);
+ height: var(--line-height-normal);
+ vertical-align: top;
+ }
+ </style>
+ <slot></slot
+ ><!--
+ --><iron-icon icon="gr-icons:info" hidden$="[[!showIcon]]"></iron-icon>
`;
diff --git a/polygerrit-ui/app/elements/shared/gr-tooltip/gr-tooltip_html.js b/polygerrit-ui/app/elements/shared/gr-tooltip/gr-tooltip_html.js
index 5f9ce51..3f02fc5 100644
--- a/polygerrit-ui/app/elements/shared/gr-tooltip/gr-tooltip_html.js
+++ b/polygerrit-ui/app/elements/shared/gr-tooltip/gr-tooltip_html.js
@@ -17,50 +17,52 @@
import {html} from '@polymer/polymer/lib/utils/html-tag.js';
export const htmlTemplate = html`
- <style include="shared-styles">
- :host {
- --gr-tooltip-arrow-size: .5em;
- --gr-tooltip-arrow-center-offset: 0;
+ <style include="shared-styles">
+ :host {
+ --gr-tooltip-arrow-size: 0.5em;
+ --gr-tooltip-arrow-center-offset: 0;
- background-color: var(--tooltip-background-color);
- box-shadow: var(--elevation-level-2);
- color: var(--tooltip-text-color);
- font-size: var(--font-size-small);
- position: absolute;
- z-index: 1000;
- max-width: var(--tooltip-max-width);
- }
- :host .tooltip {
- padding: var(--spacing-m) var(--spacing-l);
- }
- :host .arrowPositionBelow,
- :host([position-below]) .arrowPositionAbove {
- display: none;
- }
- :host([position-below]) .arrowPositionBelow {
- display: initial;
- }
- .arrow {
- border-left: var(--gr-tooltip-arrow-size) solid transparent;
- border-right: var(--gr-tooltip-arrow-size) solid transparent;
- height: 0;
- position: absolute;
- left: calc(50% - var(--gr-tooltip-arrow-size));
- margin-left: var(--gr-tooltip-arrow-center-offset);
- width: 0;
- }
- .arrowPositionAbove {
- border-top: var(--gr-tooltip-arrow-size) solid var(--tooltip-background-color);
- bottom: calc(-1 * var(--gr-tooltip-arrow-size));
- }
- .arrowPositionBelow {
- border-bottom: var(--gr-tooltip-arrow-size) solid var(--tooltip-background-color);
- top: calc(-1 * var(--gr-tooltip-arrow-size));
- }
- </style>
- <div class="tooltip">
- <i class="arrowPositionBelow arrow"></i>
- [[text]]
- <i class="arrowPositionAbove arrow"></i>
- </div>
+ background-color: var(--tooltip-background-color);
+ box-shadow: var(--elevation-level-2);
+ color: var(--tooltip-text-color);
+ font-size: var(--font-size-small);
+ position: absolute;
+ z-index: 1000;
+ max-width: var(--tooltip-max-width);
+ }
+ :host .tooltip {
+ padding: var(--spacing-m) var(--spacing-l);
+ }
+ :host .arrowPositionBelow,
+ :host([position-below]) .arrowPositionAbove {
+ display: none;
+ }
+ :host([position-below]) .arrowPositionBelow {
+ display: initial;
+ }
+ .arrow {
+ border-left: var(--gr-tooltip-arrow-size) solid transparent;
+ border-right: var(--gr-tooltip-arrow-size) solid transparent;
+ height: 0;
+ position: absolute;
+ left: calc(50% - var(--gr-tooltip-arrow-size));
+ margin-left: var(--gr-tooltip-arrow-center-offset);
+ width: 0;
+ }
+ .arrowPositionAbove {
+ border-top: var(--gr-tooltip-arrow-size) solid
+ var(--tooltip-background-color);
+ bottom: calc(-1 * var(--gr-tooltip-arrow-size));
+ }
+ .arrowPositionBelow {
+ border-bottom: var(--gr-tooltip-arrow-size) solid
+ var(--tooltip-background-color);
+ top: calc(-1 * var(--gr-tooltip-arrow-size));
+ }
+ </style>
+ <div class="tooltip">
+ <i class="arrowPositionBelow arrow"></i>
+ [[text]]
+ <i class="arrowPositionAbove arrow"></i>
+ </div>
`;
diff --git a/yarn.lock b/yarn.lock
index 7b9f9d3..8379dd7 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3385,6 +3385,13 @@
semver "^6.3.0"
spdx-expression-parse "^3.0.0"
+eslint-plugin-prettier@^3.1.3:
+ version "3.1.3"
+ resolved "https://registry.yarnpkg.com/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.3.tgz#ae116a0fc0e598fdae48743a4430903de5b4e6ca"
+ integrity sha512-+HG5jmu/dN3ZV3T6eCD7a4BlAySdN7mLIbJYo0z1cFQuI+r2DiTJEFeF68ots93PsnrMxbzIZ2S/ieX+mkrBeQ==
+ dependencies:
+ prettier-linter-helpers "^1.0.0"
+
eslint-scope@^5.0.0:
version "5.0.0"
resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.0.0.tgz#e87c8887c73e8d1ec84f1ca591645c358bfc8fb9"
@@ -3698,6 +3705,11 @@
resolved "https://registry.yarnpkg.com/fast-deep-equal/-/fast-deep-equal-2.0.1.tgz#7b05218ddf9667bf7f370bf7fdb2cb15fdd0aa49"
integrity sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=
+fast-diff@^1.1.2:
+ version "1.2.0"
+ resolved "https://registry.yarnpkg.com/fast-diff/-/fast-diff-1.2.0.tgz#73ee11982d86caaf7959828d519cfe927fac5f03"
+ integrity sha512-xJuoT5+L99XlZ8twedaRf6Ax2TgQVxvgZOYoPKqZufmJib0tL2tegPBOZb1pVNgIhlqDlA0eO0c3wBvQcmzx4w==
+
fast-glob@^2.0.2:
version "2.2.7"
resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-2.2.7.tgz#6953857c3afa475fff92ee6015d52da70a4cd39d"
@@ -6916,6 +6928,18 @@
resolved "https://registry.yarnpkg.com/preserve/-/preserve-0.2.0.tgz#815ed1f6ebc65926f865b310c0713bcb3315ce4b"
integrity sha1-gV7R9uvGWSb4ZbMQwHE7yzMVzks=
+prettier-linter-helpers@^1.0.0:
+ version "1.0.0"
+ resolved "https://registry.yarnpkg.com/prettier-linter-helpers/-/prettier-linter-helpers-1.0.0.tgz#d23d41fe1375646de2d0104d3454a3008802cf7b"
+ integrity sha512-GbK2cP9nraSSUF9N2XwUwqfzlAFlMNYYl+ShE/V+H8a9uNl/oUqB1w2EL54Jh0OlyRSd8RfWYJ3coVS4TROP2w==
+ dependencies:
+ fast-diff "^1.1.2"
+
+prettier@2.0.5:
+ version "2.0.5"
+ resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.0.5.tgz#d6d56282455243f2f92cc1716692c08aa31522d4"
+ integrity sha512-7PtVymN48hGcO4fGjybyBSIWDsLU4H4XlvOHfq91pz9kkGlonzwTfYkaIEwiRg/dAJF9YlbsduBAgtYLi+8cFg==
+
pretty-bytes@^4.0.2:
version "4.0.2"
resolved "https://registry.yarnpkg.com/pretty-bytes/-/pretty-bytes-4.0.2.tgz#b2bf82e7350d65c6c33aa95aaa5a4f6327f61cd9"