Skip to content

Commit 885e359

Browse files
authored
fix(ui5-rating-indicator): import ui5-icon as used in template (#5320)
The Icon component is not imported, although used. Not marked as dependency. If someone bundles just the RatingIndicator, the Icon component will be missing and actually the stars won't be displayed. Also, when we don't mark it as dependency, we break the scoping, which adds suffixes to the dependencies of the component - the case with the issue, linked below. The users enabled the scoping feature and used ui5-rating-indicator-demo, but in the Shadow DOM, the ui5-icon did not get its suffix (ui5-icon-demo) and thus not rendered. FIXES: #5318
1 parent 719ca77 commit 885e359

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/main/src/RatingIndicator.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ import {
1818
RATING_INDICATOR_TOOLTIP_TEXT,
1919
} from "./generated/i18n/i18n-defaults.js";
2020
import RatingIndicatorTemplate from "./generated/templates/RatingIndicatorTemplate.lit.js";
21+
import Icon from "./Icon.js";
2122
import "@ui5/webcomponents-icons/dist/favorite.js";
2223
import "@ui5/webcomponents-icons/dist/unfavorite.js";
2324

@@ -194,6 +195,10 @@ class RatingIndicator extends UI5Element {
194195
RatingIndicator.i18nBundle = await getI18nBundle("@ui5/webcomponents");
195196
}
196197

198+
static get dependencies() {
199+
return [Icon];
200+
}
201+
197202
constructor() {
198203
super();
199204

0 commit comments

Comments
 (0)