Dashboard Component: Puzzling Widget Property Persistence

Hi all,

I'm utilizing the Dashboard component, and have been attempting to find a way to dynamically scale components in the widget rather than providing a small, medium, large option of the same component with properly scaled font size (and other things).

I explored exposing the widgets position properties to the instance using a change script but quickly abandoned the idea since the change script would be deleted with the instance.. or so I thought.

I noticed some interesting prints in my console while doing some testing and ended up finding the prints were coming from a change script on the position property of my 1st widget.

I've attached an image where there are no current widgets but the change script is still 'findable' when searching the project. My question is, is this behavior to be expected and would I be just in leveraging this or does this smell like something that will be "fixed" or removed in the future? I'm on 8.1.28.

Thanks in advance.

edit: After adding, deleting, and re-adding the first widget, the change script continues to persist.

Did you try right-clicking and selecting "Remove Change Script" on the widgets property?

image

I didn't do that when initially writing the script on the widget. I just deleted the widget, which to me, feels like it would "reset" all properties on widget[0] in that array. I wouldn't expect it to persist through creation and deletion of a new widget[0] but that is what is happening.

I would like to leverage this behavior to be able to expose position properties to instances of widgets with those change scripts, but I'd like to hear people weigh in on if this behavior is expected, and expected to stick around.... I don't want to go all in on it if people here also think the behavior is interesting and nod to the fact that it may be unintended..

I think this is just a bug, and I wouldn't be surprised if it's already fixed in a later version.

1 Like

Thanks Paul, but also bummer. I think part of me wanted this to be a legitimate path forward.