-
Notifications
You must be signed in to change notification settings - Fork 1
Update GroupBox widget #77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
rjwills28
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR - I didn't realise that the Group didn't work at all for BOB file. I've tested this and just found a few issues when experimenting with different Group properties in Phoebus, which I should now have fixed with my latest commits.
-
If the name of the Group is missing (i.e. maybe you don't want a name at the top of the group) then the parser fails as the 'name' is a non-optional property. I've made this property optional and set the name as '' if it is missing.

-
The title bar color is incorrect and the border line color doesn't change (see below Phoebus cf cs-web).

Here the foreground color (i.e. text color) should be red and the line color should be yellow as shown on the left. On the right you can see the background of the title bar has been changed to the foreground color and the border has remained black. I fixed this by adding the 'line_color' property to the parser and using this to set the border color and the title bar color, while using the foreground color for the title bar title. -
The title in the title bar appears in the centre whereas in Phoebus it is on the left. I've just set the textAlign property in the css to fix that.
-
If the foreground 'name' color is changed from black (e.g. in the case above it is red) then this propagates through to the other widgets contained in the group, i.e. in this case the label widgets turn red. I've fixed this by specifying the color black for the inner CSS. This will be overwritten if another color is specified by that widget (see below for example where the color of the label is purple) but if not specified will default to black.

|
Having updated Phoebus from 4.7.2 to 4.7.3 I am able to see the |
rjwills28
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approving if we're all happy with the changes.
I have updated the GroupBox widget appearance, and pointed the widget mapping to correctly use GroupBox instead of GroupingContainer for bob files. None of the opi behaviour should be affected by these changes.
Changes:
styleproperty is parsed asstyleOpt, in order to prevent confusion when passing the prop to a component (not doing so triggers an eslint warningStyle prop value must be an object)compatproperty and set the style for GroupBox EmbeddedDisplays to the default groupbox style. This should give the same appearance as before