Can I set one background color per branch?

0
I use 2 branches: Main and Release. I would like to see a color difference in the menu for these 2 branches. For example, green for Main and red for Release. To avoid making changes in the Release branch Is it possible?
asked
2 answers
0

Hi Pascal,

I think you mean setting the background color of studio pro it self?
I believe currently this is not possible within studio pro itself. You could add it as an idea here: https://forum.mendix.com/link/ideas

You could of course create something when running the app itself to indicate by color that your working in a different branche but as stated it will only show up when running and testing.

Hope this helps!

answered
0

Hi Pascal,

There's no built-in method to differentiate branches, but I see a couple of options.

  • Configure a ‘Branch’ constant exposed to the client with a value for Release or Main. Set a dynamic class like so: if @Module.Branch = 'Release' then 'background-warning' else ''.
    Pro: easy to configure.
    Con: will be overwritten on merging, probably
  • Add a stylesheet Branch.scss. Then, merge it to the release branch. Exclude it from versioning using TortoiseSVN. Then, add some branch-specific styling.
    Pro: won't be overwritten when merging.
    Con: You can't change the file anymore afterwards because it is excluded, and it's more complicated to set up.

Hope that helps.

answered