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>2022-05-30 10:32:22 +0000
commit1f810ad2ab101e70ed03e154a14dad3d1f6baae7 (patch)
tree199c69c5b2ee64c59858a20ac3276fbdf2dc0119
parent5021470ceb84d522b896d01432c07213c3e58af2 (diff)
Add label score extension points for plugin customization
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.ts4
-rw-r--r--polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_html.ts2
2 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 9a38095cac..dea06ee683 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
@@ -282,4 +282,8 @@ export class GrLabelScoreRow extends PolymerElement {
(labels[label] as DetailedLabelInfo).values![value]
);
}
+
+ _computeDecoratorName(preString: string, name: string) {
+ return preString + name.toLowerCase();
+ }
}
diff --git a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_html.ts b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_html.ts
index e57a2163f1..fbfb478cb2 100644
--- a/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_html.ts
+++ b/polygerrit-ui/app/elements/change/gr-label-score-row/gr-label-score-row_html.ts
@@ -99,6 +99,7 @@ export const htmlTemplate = html`
}
}
</style>
+ <gr-endpoint-decorator name$="[[_computeDecoratorName('review-label-scores-', label.name)]]">
<span class="labelNameCell" id="labelName" aria-hidden="true"
>[[label.name]]</span
>
@@ -157,4 +158,5 @@ export const htmlTemplate = html`
>
<span id="selectedValueLabel">[[_selectedValueText]]</span>
</div>
+ </gr-endpoint-decorator>
`;