Describe the bug
I created a new Web Component lib, and by default this lib has no new CSS variables, it is more of a composite library which uses other web components internally (the SuccessFactors Header). There are no new colors that it need to define.
The issue only happens when you have a new library in which the "parameter-bundle.css" is empty or contains only empty :root {} style.
Basically the /dist/generated/themes/sap_fiori_3/parameter-bundle.css.js is empty - because there are no variables (yet).
To reproduce
Steps to reproduce the behavior:
Make your default sap_fiori_3/parameter-bundle.css for the library empty
Start up the page
See exception
Isolated example
(not sure if this is needed)
Expected behavior
If the defaultTheme is empty string, calling registerThemeProperties should work as expected. But currently the code inside fetchThemeProperties assumes that this is a bug and throws an exception.
Screenshots
If applicable, add screenshots to help explain your problem.
Context
UI5 Web Components version: rc7
OS/Platform: {...}
Browser (if relevant): {...}
Other information: {...}
Affected components(if known)
Log output / Any errors in the console
Themes.js:68 Uncaught (in promise) Error: You have to import the @xweb/common-webcomponents/dist/Assets.js module to switch to additional themes
at fetchThemeProperties (Themes.js:68)
at getThemeProperties (Themes.js:57)
Describe the bug I created a new Web Component lib, and by default this lib has no new CSS variables, it is more of a composite library which uses other web components internally (the SuccessFactors Header). There are no new colors that it need to define.
The issue only happens when you have a new library in which the "parameter-bundle.css" is empty or contains only empty
:root {}
style.Basically the
/dist/generated/themes/sap_fiori_3/parameter-bundle.css.js
is empty - because there are no variables (yet).To reproduce Steps to reproduce the behavior:
Isolated example (not sure if this is needed)
Expected behavior If the defaultTheme is empty string, calling registerThemeProperties should work as expected. But currently the code inside fetchThemeProperties assumes that this is a bug and throws an exception.
Screenshots If applicable, add screenshots to help explain your problem.
Context
Affected components (if known)
Log output / Any errors in the console