Skip to content

Commit dcd64a9

Browse files
authored
fix: switch theme for single imported components (#356)
When importing a single component like show in the documentation, the url parameters for setting a theme stopped working, unless a ThemePropertiesProvider module is also imported. This change returns the previous behaviour, where the single imports have all features working.
1 parent ca5f62c commit dcd64a9

39 files changed

+118
-2
lines changed

packages/main/src/Button.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ import Icon from "./Icon.js";
1111
// Styles
1212
import buttonCss from "./themes/Button.css.js";
1313

14+
// all themes should work via the convenience import (inlined now, switch to json when elements can be imported individyally)
15+
import "./ThemePropertiesProvider.js";
16+
1417
/**
1518
* @public
1619
*/

packages/main/src/Calendar.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ import "@ui5/webcomponents-core/dist/sap/ui/core/date/Gregorian.js";
2424
// Styles
2525
import calendarCSS from "./themes/Calendar.css.js";
2626

27+
// all themes should work via the convenience import (inlined now, switch to json when elements can be imported individyally)
28+
import "./ThemePropertiesProvider.js";
29+
2730
/**
2831
* @public
2932
*/

packages/main/src/CalendarHeader.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ import CalendarHeaderRenderer from "./build/compiled/CalendarHeaderRenderer.lit.
99
// Styles
1010
import styles from "./themes/CalendarHeader.css.js";
1111

12+
// all themes should work via the convenience import (inlined now, switch to json when elements can be imported individyally)
13+
import "./ThemePropertiesProvider.js";
14+
1215
const metadata = {
1316
tag: "ui5-calendar-header",
1417
properties: {

packages/main/src/Card.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import Icon from "./Icon.js";
1010
// Styles
1111
import cardCss from "./themes/Card.css.js";
1212

13+
// all themes should work via the convenience import (inlined now, switch to json when elements can be imported individyally)
14+
import "./ThemePropertiesProvider.js";
15+
1316
/**
1417
* @public
1518
*/

packages/main/src/CheckBox.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ import Label from "./Label.js";
1010
// Styles
1111
import checkboxCss from "./themes/CheckBox.css.js";
1212

13+
// all themes should work via the convenience import (inlined now, switch to json when elements can be imported individyally)
14+
import "./ThemePropertiesProvider.js";
15+
1316
/**
1417
* @public
1518
*/

packages/main/src/CustomListItem.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@ import CustomListItemRenderer from "./build/compiled/CustomListItemRenderer.lit.
66
// Styles
77
import columnListItemCss from "./themes/CustomListItem.css.js";
88

9+
// all themes should work via the convenience import (inlined now, switch to json when elements can be imported individyally)
10+
import "./ThemePropertiesProvider.js";
11+
912
/**
1013
* @public
1114
*/

packages/main/src/DatePicker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ import "@ui5/webcomponents-core/dist/sap/ui/core/date/Gregorian.js";
2828
// Styles
2929
import datePickerCss from "./themes/DatePicker.css.js";
3030

31+
// all themes should work via the convenience import (inlined now, switch to json when elements can be imported individyally)
32+
import "./ThemePropertiesProvider.js";
33+
3134
/**
3235
* @public
3336
*/

packages/main/src/DayPicker.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ import DayPickerRenderer from "./build/compiled/DayPickerRenderer.lit.js";
1616
// Styles
1717
import dayPickerCSS from "./themes/DayPicker.css.js";
1818

19+
// all themes should work via the convenience import (inlined now, switch to json when elements can be imported individyally)
20+
import "./ThemePropertiesProvider.js";
21+
1922
/**
2023
* @public
2124
*/

packages/main/src/Dialog.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ import DialogRenderer from "./build/compiled/DialogRenderer.lit.js";
88
// Styles
99
import dialogCss from "./themes/Dialog.css.js";
1010

11+
// all themes should work via the convenience import (inlined now, switch to json when elements can be imported individyally)
12+
import "./ThemePropertiesProvider.js";
13+
1114
/**
1215
* @public
1316
*/

packages/main/src/GroupHeaderListItem.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ import GroupHeaderListItemTemplateContext from "./GroupHeaderListItemTemplateCon
88
// Styles
99
import groupheaderListItemCss from "./themes/GroupHeaderListItem.css.js";
1010

11+
// all themes should work via the convenience import (inlined now, switch to json when elements can be imported individyally)
12+
import "./ThemePropertiesProvider.js";
1113

1214
/**
1315
* @public

0 commit comments

Comments
 (0)