summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJukka Jokiniva <jukka.jokiniva@qt.io>2021-07-08 09:50:55 +0300
committerJukka Jokiniva <jukka.jokiniva@qt.io>2023-04-14 11:52:30 +0000
commit30239150d8af199037ee3591f680fd46c5389641 (patch)
treef1fb54bf1b5e320f03e10c9e97006ce38d551972
parentb38fb38a229991dcdcacebf622dd6a2241b7d80d (diff)
Add label score extension points for plugin customization
These extension points allow hiding of Sanity-Review voting by default in the gerrit-plugin-qt-workflow implementation. Change-Id: Ia2cfa4473b37dbbeab08e906a8aa7444c2e47d9c Reviewed-by: Daniel Smith <Daniel.Smith@qt.io>
-rw-r--r--polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.ts6
1 files changed, 6 insertions, 0 deletions
diff --git a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.ts b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.ts
index 50c5cafe02..4bed33c00a 100644
--- a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.ts
+++ b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row.ts
@@ -150,10 +150,12 @@ export class GrLabelScoreRow extends LitElement {
override render() {
return html`
+ <gr-endpoint-decorator name="${ifDefined(this._computeDecoratorName('review-label-scores-', this.label?.name ?? ''))}">
<span class="labelNameCell" id="labelName" aria-hidden="true"
>${this.label?.name ?? ''}</span
>
${this.renderButtonsCell()} ${this.renderSelectedValue()}
+ </gr-endpoint-decorator>
`;
}
@@ -403,4 +405,8 @@ export class GrLabelScoreRow extends LitElement {
return '';
}
}
+
+ _computeDecoratorName(preString: string, name: string) {
+ return preString + name.toLowerCase();
+ }
}