Minor cosmetic change to Rule Machine

Okay. A big assumption on my part that this is a minor cosmetic change, as I don't know the code change required! :thinking:

I like to place a lot of comments in my more complicated rules to make maintenance easier when re-visiting. Can these comments be highlighted by changing the font colour to make them stand out more?

@bravenel, not a bad idea?

Also remove the word Comment from the comment so it looks like white space when the user does not input any text into the comment. Adding white space into code is an old but usefull method to break up code into logicical bits. You could follow the method used by groovy, C# or VB for comments. This does not require color coding the text to work but if you go that far, making the comment a lighter shade of gray would contrast the comment from the code nicely.

What color?

Purple.

1 Like

How about a leading character(s), such as > or // ?

3 Likes

!
! Hey, now there's an old idea. Raise your hand if you recall it taking up a CARD or two.
!
! and some great messages discovered, like
!
! If you are this deep, in this section, reading this line,
! you must be doing a rewrite or code conversion, ...you have my sympathy
!

//
// this would work nicely
//

Looks like there are personal preferences at play. Personally I like comments to fade back and the code stand out. However I will go with the flow on this one.

So perhaps we can just copy Groovy's way of doing it:

3 Likes

Hi Bruce

I was thinking of Purple as we already have Amber and Green for Current Values around Conditions but a contrasting colour is what I'm looking for.

There will never be a consensus about color...

1 Like

Very true :slight_smile: I'm happy to put my vote to your suggestion. :+1:

There are some UI changes coming in the next release, and this will actually work pretty well to stand out. Slight change to the color from above, so that actually IS the Groovy comment color.

9 Likes

Sounds Groovy (someone had to do it, I'm old enough to qualify). :+1:
Thanks @UKMedia for bringing it up.

1 Like