summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts13
1 files changed, 8 insertions, 5 deletions
diff --git a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts
index 0bf49db467..720403540a 100644
--- a/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts
+++ b/polygerrit-ui/app/elements/change/gr-reply-dialog/gr-reply-dialog.ts
@@ -787,8 +787,11 @@ export class GrReplyDialog extends LitElement {
name="change"
.value=${this.change}
></gr-endpoint-param>
- ${this.renderAttentionSummarySection()}
- ${this.renderAttentionDetailsSection()}
+ ${when(
+ this.attentionExpanded,
+ () => this.renderAttentionDetailsSection(),
+ () => this.renderAttentionSummarySection()
+ )}
<gr-endpoint-slot name="above-actions"></gr-endpoint-slot>
${this.renderActionsSection()}
</gr-endpoint-decorator>
@@ -989,7 +992,6 @@ export class GrReplyDialog extends LitElement {
}
private renderAttentionSummarySection() {
- if (this.attentionExpanded) return;
return html`
<section class="attention">
<div class="attentionSummary">
@@ -1056,7 +1058,6 @@ export class GrReplyDialog extends LitElement {
}
private renderAttentionDetailsSection() {
- if (!this.attentionExpanded) return;
return html`
<section class="attention-detail">
<div class="attentionDetailsTitle">
@@ -1722,8 +1723,10 @@ export class GrReplyDialog extends LitElement {
),
]);
// Possibly expand if need be, never collapse as this is jarring to the user.
+ // For long account lists (10 or more), avoid automatic expansion.
this.attentionExpanded =
- this.attentionExpanded || this.computeShowAttentionTip(1);
+ this.attentionExpanded ||
+ (allAccountIds.length < 10 && this.computeShowAttentionTip(1));
}
computeShowAttentionTip(minimum: number) {