diff options
author | Jukka Jokiniva <jukka.jokiniva@qt.io> | 2021-06-30 12:37:31 +0300 |
---|---|---|
committer | Jukka Jokiniva <jukka.jokiniva@qt.io> | 2021-12-10 15:24:10 +0000 |
commit | 03b1ceb00759f19768991536dd234b779d185ec2 (patch) | |
tree | 3b73edd69ef496e1b0c02a67424ec0f39e30a23c | |
parent | e722f8f63abdad25482efd5eda1b3626a1f85fcf (diff) |
Update status values staged, integrating and deferred for client side modules
Change-Id: Ib5fcc3fe61c09680c9ea5d60e37915e7e26e8660
Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
11 files changed, 60 insertions, 2 deletions
diff --git a/polygerrit-ui/app/constants/constants.ts b/polygerrit-ui/app/constants/constants.ts index b64a7d101f..529598a0ff 100644 --- a/polygerrit-ui/app/constants/constants.ts +++ b/polygerrit-ui/app/constants/constants.ts @@ -68,6 +68,9 @@ export enum ChangeStatus { ABANDONED = 'ABANDONED', MERGED = 'MERGED', NEW = 'NEW', + DEFERRED = 'DEFERRED', + INTEGRATING = 'INTEGRATING', + STAGED = 'STAGED', } /** diff --git a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.ts b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.ts index 3acdaf9e22..67c5bfba54 100644 --- a/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.ts +++ b/polygerrit-ui/app/elements/change-list/gr-change-list/gr-change-list.ts @@ -58,7 +58,7 @@ import { import {CustomKeyboardEvent} from '../../../types/events'; const NUMBER_FIXED_COLUMNS = 3; -const CLOSED_STATUS = ['MERGED', 'ABANDONED']; +const CLOSED_STATUS = ['MERGED', 'ABANDONED', 'DEFERRED', 'INTEGRATING', 'STAGED']; const LABEL_PREFIX_INVALID_PROLOG = 'Invalid-Prolog-Rules-Label-Name--'; const MAX_SHORTCUT_CHARS = 5; diff --git a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts index 8a0bf0fe63..b956020667 100644 --- a/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts +++ b/polygerrit-ui/app/elements/change/gr-change-view/gr-change-view.ts @@ -2380,6 +2380,9 @@ export class GrChangeView extends KeyboardShortcutMixin( // answer for abandoned changes. if ( this._change.status === ChangeStatus.MERGED || + this._change.status === ChangeStatus.STAGED || + this._change.status === ChangeStatus.INTEGRATING || + this._change.status === ChangeStatus.DEFERRED || this._change.status === ChangeStatus.ABANDONED ) { this._mergeable = false; diff --git a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.ts b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.ts index f8a4af236d..59778e8740 100644 --- a/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.ts +++ b/polygerrit-ui/app/elements/change/gr-related-changes-list/gr-related-changes-list.ts @@ -264,7 +264,8 @@ export class GrRelatedChangesList extends GestureEventListeners( _computeLinkClass(change: ParsedChangeInfo) { const statuses = []; - if (change.status === ChangeStatus.ABANDONED) { + if (change.status === ChangeStatus.ABANDONED || + change.status === ChangeStatus.DEFERRED) { statuses.push('strikethrough'); } if (change.submittable) { @@ -293,6 +294,12 @@ export class GrRelatedChangesList extends GestureEventListeners( return 'Merged'; case ChangeStatus.ABANDONED: return 'Abandoned'; + case ChangeStatus.DEFERRED: + return 'Deferred'; + case ChangeStatus.INTEGRATING: + return 'Integrating'; + case ChangeStatus.STAGED: + return 'Staged'; } if (change._revision_number !== change._current_revision_number) { return 'Not current'; diff --git a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.ts b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.ts index ee103b0929..1b7eb56d40 100644 --- a/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.ts +++ b/polygerrit-ui/app/elements/core/gr-main-header/gr-main-header.ts @@ -58,10 +58,22 @@ const DEFAULT_LINKS: MainHeaderLinkGroup[] = [ name: 'Open', }, { + url: '/q/status:staged', + name: 'Staged', + }, + { + url: '/q/status:integrating', + name: 'Integrating', + }, + { url: '/q/status:merged', name: 'Merged', }, { + url: '/q/status:deferred', + name: 'Deferred', + }, + { url: '/q/status:abandoned', name: 'Abandoned', }, diff --git a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.ts b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.ts index abbe3162e4..60749dfc2a 100644 --- a/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.ts +++ b/polygerrit-ui/app/elements/core/gr-search-bar/gr-search-bar.ts @@ -80,7 +80,9 @@ const SEARCH_OPERATORS: ReadonlyArray<string> = [ 'is:abandoned', 'is:assigned', 'is:closed', + 'is:deferred', 'is:ignored', + 'is:integrating', 'is:merge', 'is:merged', 'is:open', @@ -88,6 +90,7 @@ const SEARCH_OPERATORS: ReadonlyArray<string> = [ 'is:private', 'is:reviewed', 'is:reviewer', + 'is:staged', 'is:starred', 'is:submittable', 'is:watched', @@ -114,9 +117,12 @@ const SEARCH_OPERATORS: ReadonlyArray<string> = [ 'status:', 'status:abandoned', 'status:closed', + 'status:deferred', + 'status:integrating', 'status:merged', 'status:open', 'status:reviewed', + 'status:staged', 'submissionid:', 'topic:', 'tr:', diff --git a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.ts b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.ts index 44ec4f5205..5b32522041 100644 --- a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.ts +++ b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status.ts @@ -29,6 +29,9 @@ enum ChangeStates { MERGE_CONFLICT = 'Merge Conflict', WIP = 'WIP', PRIVATE = 'Private', + DEFERRED = 'Deferred', + INTEGRATING = 'Integrating', + STAGED = 'Staged', } const WIP_TOOLTIP = diff --git a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_html.ts b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_html.ts index 542d8bee08..8f1c08acf4 100644 --- a/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_html.ts +++ b/polygerrit-ui/app/elements/shared/gr-change-status/gr-change-status_html.ts @@ -32,6 +32,18 @@ export const htmlTemplate = html` background-color: var(--status-abandoned); color: var(--status-abandoned); } + :host(.deferred) .chip { + background-color: var(--status-deferred); + color: var(--status-deferred); + } + :host(.integrating) .chip { + background-color: var(--status-integrating); + color: var(--status-integrating); + } + :host(.staged) .chip { + background-color: var(--status-staged); + color: var(--status-staged); + } :host(.wip) .chip { background-color: var(--status-wip); color: var(--status-wip); diff --git a/polygerrit-ui/app/styles/themes/app-theme.ts b/polygerrit-ui/app/styles/themes/app-theme.ts index 8e362ab8bb..543420d429 100644 --- a/polygerrit-ui/app/styles/themes/app-theme.ts +++ b/polygerrit-ui/app/styles/themes/app-theme.ts @@ -104,6 +104,9 @@ const styleSheet = safeStyleSheet` /* status colors */ --status-merged: #188038; --status-abandoned: #5f6368; + --status-deferred: #5f6368; + --status-integrating: #999900; + --status-staged: #cccc00; --status-wip: #795548; --status-private: #a142f4; --status-conflict: #d93025; diff --git a/polygerrit-ui/app/styles/themes/dark-theme.ts b/polygerrit-ui/app/styles/themes/dark-theme.ts index 0b54da466c..b073c77b39 100644 --- a/polygerrit-ui/app/styles/themes/dark-theme.ts +++ b/polygerrit-ui/app/styles/themes/dark-theme.ts @@ -89,6 +89,9 @@ function getStyleEl() { /* status colors */ --status-merged: #5bb974; --status-abandoned: #dadce0; + --status-deferred: #dadce0; + --status-integrating: #999900; + --status-staged: #cccc00; --status-wip: #bcaaa4; --status-private: #d7aefb; --status-conflict: #f28b82; diff --git a/polygerrit-ui/app/utils/change-util.ts b/polygerrit-ui/app/utils/change-util.ts index 4c0bdef351..6cf26ad1f8 100644 --- a/polygerrit-ui/app/utils/change-util.ts +++ b/polygerrit-ui/app/utils/change-util.ts @@ -152,6 +152,12 @@ export function changeStatuses( states.push('Merged'); } else if (change.status === ChangeStatus.ABANDONED) { states.push('Abandoned'); + } else if (change.status === ChangeStatus.DEFERRED) { + states.push('Deferred'); + } else if (change.status === ChangeStatus.INTEGRATING) { + states.push('Integrating'); + } else if (change.status === ChangeStatus.STAGED) { + states.push('Staged'); } else if ( change.mergeable === false || (opt_options && opt_options.mergeable === false) |