Sharing roles between apps

Is it possible to share the roles defined in an app with other apps?

I tried to define a few roles in an app, then add that app as a dependency to another app, but I couldn’t access the roles.

3 Likes

Moved to Feature Requests; sharing themes between apps is not currently possible, but it’s something we want to do. Have a Like from me :wink:

3 Likes

This seems to still not be possible.

It would great (plus share user-defined colors) so that when you import a component from another app, it will keep it’s style.

2 Likes

Yes, it would be GREAT to be able to house themes in a central hub and access them in whatever app we choose. Also, having them permeate through to dependent apps would remove a bunch of headaches. I’m currently dealing with a situation where I am having to manually set all this up in multiple apps because I have a set of apps that can be called independently of another (i.e., how you can go to youtube.com or access a video via youtu.be). However, in one instance, I will have the dependent apps working from within the main app.

Being able to create and update a theme from a central hub and selecting it for all of the apps I’m developing would be awesome.

Also, it would be great to modify the CSS from within the IDE similar to how you can access certain parameters of a component. For example, when I’m creating an app, I could access all of the CSS variables for that particular component, for example a Button. I could make it look exactly how I want. It would be even better if from there I could save it as a custom role. This would save a bunch of time going back and forth from the form, to the CSS, to the Roles to get all of this working. Also, I think it would greatly help those of us who are not CSS maestro’s. I have often stumbled through getting a component to look/function as intended do to the intricacies of the Anvil CSS. Further, sometimes changing the look of a component is a one off and not really needed to become a whole role. I have had to update the CSS parameters directly from the Python code with many objects.

With that, I want to say, you guys have created an amazing tool that has allowed me a way to develop great web apps. Bravo!

1 Like