Skip to content

Conversation

@abigailalexander
Copy link
Collaborator

Current implementation of the Symbol widget in cs-web-lib was based off the MultiStateMonitor widget in CSStudio. The Phoebus Symbol widget implementation was not applied.

I've now updated this widget to behave like the Phoebus widget. Tests and snapshots have also been updated. We check whether the symbol should behave like MultiStateMonitor or Symbol, so both opi and bob file behaviours are preserved.

@rjwills28
Copy link
Collaborator

I have tested this with both an OPI and BOB file using a MultiStateSymbolMonitor and a Symbol widget respectively. The CSS MultiStateSymbolMonitor is still displayed correctly and now the Phoebus Symbol is correctly displayed (instead of getting an error of unknown widget).

Two things I did notice were related to the rotation property:

  1. In the OPI file, the rotation is applied (<degree>45</degree>) but it is cut off as it doesn't fit in the box it is rendered in - see image below with cs-web-lib left and cs-studio right.
    Screenshot from 2024-12-06 15-30-34
  2. No rotation is applied to the image from the BOB file when specified, i.e. with <rotation>45.0</rotation>. I guess this property is just ignored as it has a different tag name to the CSS property.

Not sure whether we want to fix this here or as a separate issue? Perhaps depends on how complicated it is as this PR certainly addresses the implementation of the BOB symbol.

@abigailalexander
Copy link
Collaborator Author

I hadn't noticed those issues, thank for pointing them out! I'll have a look into them, and if they seem to be a separate issue that would be difficult to fix, I can do it as a separate PR.

Copy link
Collaborator

@rjwills28 rjwills28 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look great - thanks for identifying that that was the issue.

@abigailalexander abigailalexander merged commit 2b3cbf2 into master Dec 10, 2024
2 checks passed
@abigailalexander abigailalexander deleted the update-symbol-widget branch December 10, 2024 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants