adding this as a feature request - would be useful.
Mostly for dependencies that use a little bit of javascript or css or roles.
Currently with dependencies where I want to inject some global css/javascript I would end up writing it directly in the native libraries of the dependency. This isn’t particularly clean… and not editable in an external ide.
Alternatively for every app that used the dependency I could include all the css/javascript/roles with the work around in the above post - but that’s convoluted so there must be a better way.
It would be nicer if there was a way that a dependency could have access to its own roles/assets.
It would clean up the code and make maintaining dependencies easier imo.
Yeap - when it comes to dependencies - i’ve often ended up moving js/css into the native libraries to account for this issue.
More recently, i’ve taken to adding some js/css features in python within the dependency and adding them dynamically. This way it can all be contained within a single python module.
As an example, if your app depends on anvil-extras, you could add this line to your native libraries, which will adjust the default spinner colour to match your theme
<!-- adjust color as required -->
<script src="_/theme/loading-spinner.js" color="#E91E63"></script>