There is 1 comment.
 
 
XWiki Platform / cid:jira-generated-image-avatar-5d7d4204-83a3-4edd-9d59-ebc30616eff6 XWIKI-24120 Open

Simplify the load of icon theme icons from JavaScript code

 
View issue   ยท   Add comment
 

1 comment

 
cid:jira-generated-image-avatar-483db35c-884d-46e2-88c7-e30975433330 Marius Dumitru Florea on 13/Mar/26 16:55
 

There is also https://github.com/xwiki/xwiki-platform/blob/634b5c5149a1eb5b39e608b1886b3eef34ac3b67/xwiki-platform-core/xwiki-platform-node/src/main/node/core/livedata/livedata-ui/src/components/utilities/XWikiIcon.vue

That is nice (is it documented somewhere?) but I don't think it's easy to reuse in existing JavaScript code that doesn't rely on Vue, and which is not trivial to move to Vue/node.

I'm sure we can reduce a lot code duplication by introducing a reusable module.

Definitely. For old code I find the RequireJS loader plugin easy to use, and it behaves similar to the localization module. But the RequireJS loader plugin could be just a wrapper around another standard JS module. On my side I needed a quick solution for the CKEditor link target picker which was hard-coding glyphicons.