Skip to content

Commit

Permalink
Offer a "Re-request Review" button (#4665)
Browse files Browse the repository at this point in the history
  • Loading branch information
jrobbins authored Jan 4, 2025
1 parent 392cdc9 commit e686bc3
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions client-src/elements/chromedash-gate-column.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,26 @@ export class ChromedashGateColumn extends LitElement {
`;
}

renderReviewStatusNeedsWork() {
const rereviewButton = !this.userCanRequestReview()
? nothing
: html`
<div>
<sl-button
size="small"
variant="primary"
@click=${this.handleReviewRequested}
>Re-request review</sl-button
>
</div>
`;

return html`
<div>Reviewer has indicated a need for rework.</div>
${rereviewButton}
`;
}

renderReviewRequest() {
for (const v of this.votes) {
if (v.state === GATE_REVIEW_REQUESTED || v.state === GATE_NA_REQUESTED) {
Expand Down Expand Up @@ -587,6 +607,8 @@ export class ChromedashGateColumn extends LitElement {
renderReviewStatus() {
if (this.gate.state == GATE_PREPARING) {
return this.renderReviewStatusPreparing();
} else if (this.gate.state == VOTE_OPTIONS.NEEDS_WORK[0]) {
return this.renderReviewStatusNeedsWork();
} else if (this.gate.state == VOTE_OPTIONS.APPROVED[0]) {
return this.renderReviewStatusApproved();
} else if (this.gate.state == VOTE_OPTIONS.DENIED[0]) {
Expand Down

0 comments on commit e686bc3

Please sign in to comment.