Best practice cross-application styling

6
In our project, we have some custom CSS used in multiple applications and some is application-specific. We use SCSS and grunt/gulp to compile it to CSS. However, it's pretty cumbersome when changes are made to the cross-application files; we have to commit those files also to the other applications. A straightforward solution would be to host (S)CSS externally (e.g. GitHub), but I don't know how to manage local/test/acceptance/production environments. Is anyone in a similar situation and what are the best practices for this?
asked
5 answers
1

I have documented some exploration my UI team has done to solve this issue and added an idea to the Mendix forum. Please upvote it here: https://community.mendix.com/link/ideas/1218

answered
0

You can use the Private Mendix App store for it. This way you can upload your own module with the Cross Application CSS in the App Store and download the new version in all the applications every time it changes.

Hope it can help ;-)

answered
0

Since the theme is part of the package I think there is no workaround for what you want. In our company it is just part of the release cycle. When there is a new version of the theme we copy the theme to the project folder and update the setting inside the modeler. Yes, you have to do this for every client environment. But since it is part of the release planning not a big problem. And the theme get's also tested in the test cycle of the new release for that customer. I would not want to upgrade a theme without testing it on that specific client. But that is my opionion.

Regards,

Ronald

answered
0

For our multitenant application platform, I've created a request handler that can output content. We use this for custom (branded) css, branded javascript, etc. In other words, the css is hosted by the application itself and stored as FileDocument in the database for easy maintenance.

It works as follows:
- The request handler executes a microflow (similar to what deeplink does).
- The microflow returns a ContentDocument entity which contains: ContentType, Content, CharEncoding and StatusCode attributes.
- In the microflow, our custom (branded) css is retrieved as FileDocument from the database. A new ContentDocument entity is created and the css content, along with other attributes, is copied into the ContentDocument entity.
- The entity is transformed by the request handler into an HTTP response with the contenttype, content, etc for css.

HTH

answered
0

I’m very interested to know if anyone has figured this out?

answered