You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
If the page has, for whatever reason, loaded 2 versions of the UI5 web components, there will be 2 copies of the icon registry but only the first class that defined <ui5-icon> tag will "win" and the second duplicate version of <ui5-icon> will be ignored. This should be avoided, of course, for performance reasons - having 2 copies of the same Javascript code loaded on the page is undesirable; however, in some cases it will become unavoidable.
To reproduce
Steps to reproduce the behavior:
Have a page which has 2 ui5 web components bundles loaded on the page
Make sure that the first bundle does not include any icon registered, and make sure the second bundle has a few icons included
Have the html reference a <ui5-icon> which references one of the icons that was included in the second bundle
Expected behavior
The icon registry should utilize some global variable to share the state between 2 copies of the same icon registry thus allowing all registered icons to be available to both copies, allowing the first copy of the <ui5-icon> class to utilize the registered icons from the second bundle.
Context
UI5 Web Components version: 0.21.4
OS/Platform: {...}
Browser (if relevant): {...}
Other information: {...}
Affected components(if known)
Icon
Log output / Any errors in the console
Icon.js:240 Required icon is not registered. You can either import the icon as a module in order to use it e.g. "@ui5/webcomponents-icons/dist/icons/shortcut.js", or setup a JSON build step and import "@ui5/webcomponents-icons/dist/Assets.js".
The text was updated successfully, but these errors were encountered:
This happens for me locally whenever I use the @xweb/common-webcomponents imported as a local "file:../" in the package.json even if that dependency uses the exact same version of @ui5/webcomponents-icons
I have tried multiple approaches to use a local file copy of this library and nothing I do can prevent this dupe issue, ideally the above would have shown that the icon library was deduped and this issue wouldn't happen.
Once I am able to get my library released to a new version I should be able to solve this deduping issue locally, but I opened this issue to solve the icon issue - this dupe issue can and will happen in the future when the new UI5 Web Component Header is released to all SuccessFactors pages INCLUDING the 3rd part integrations in which customer Extensions are loaded on the page and those extensions might also include UI5 web components (though I don't know if that will actually happen or not).
Describe the bug
If the page has, for whatever reason, loaded 2 versions of the UI5 web components, there will be 2 copies of the icon registry but only the first class that defined
<ui5-icon>
tag will "win" and the second duplicate version of<ui5-icon>
will be ignored. This should be avoided, of course, for performance reasons - having 2 copies of the same Javascript code loaded on the page is undesirable; however, in some cases it will become unavoidable.To reproduce
Steps to reproduce the behavior:
<ui5-icon>
which references one of the icons that was included in the second bundleExpected behavior
The icon registry should utilize some global variable to share the state between 2 copies of the same icon registry thus allowing all registered icons to be available to both copies, allowing the first copy of the
<ui5-icon>
class to utilize the registered icons from the second bundle.Context
Affected components (if known)
Icon
Log output / Any errors in the console
The text was updated successfully, but these errors were encountered: