Variable detaching itself from group layer property

Hi friends,

I have a boolean variable that I have attached to the layer visibility of a Group layer, which I turn on and off using radio buttons.

For some reason though, the variable detaches itself seemingly at random. I have not identified what is causing this and am hoping for a little help.

I am aware that variables are in Beta, but is this a known issue though?

Thank you.

Hey @Doug_Stackhouse – first, sorry for the late response! It’s hard for me to tell if this could be related to any existing issues that are being worked. I’d need to be able to look at the design you have to see if there may be a tiny detail that needs adjustment (or to verify it’s a bug).

Since I can’t accept or view files through the forum, I’d recommend submitting this form so someone in support can help via email: https://help.figma.com/hc/en-us/requests/new?ticket_form_id=360001744374

When you do submit, please share edit access to the file you’re working on (if you are able to). You can share edit access with support-share@figma.com. This is the official support email for file sharing, and allows us to try and replicate any issues.

There may be a delay in response due to the holiday, so apologies for any inconvenience.

1 Like

Hi @Ksn,

Thank you for your response. No worries. I completely understand.

Unfortunately, I am unable to share my Figma file because what I am working on is proprietary. If I manage to get some time over the next few weeks I’ll create a seperate file to see if I can replicate the behavior though and then share this.

Not hearing that this is a known bug does cause me to question if I am doing something incorrectly though. I am right clicking the eye icon in the image below and selecting my variable which is used to turn hide/show the layer. Does this approach seem correct to you?

Thank you.

image

@ksn, I found the issue.

If the layer visibility in the design panel is refencing a variable:
image

and the layer visibility is turned on or off in the layers panel:
image

the variable reference is removed:
image

So, my workaround will be to not use the layer visibility in the layers panel and to always use the variables to turn on/off a form once they are connected.

1 Like

Ty for the update @Doug_Stackhouse!

1 Like

@ksn,

Very welcome.

Is this considered a bug or by design?

Thank you.

At the moment, I believe it is expected behavior, but I’ll default to @Ryan_52 and his expertise on this – this is admittedly not my forte :sweat_smile:

Hi Guys,

Any thoughts @Ryan_52 ?

Thanks.

Hi @Doug_Stackhouse this is currently by design and expected with how our variable binding currently works.

Variables will automatically be unbound if you were to manually change the field. Variable values should remain the same (unless you’re setting new values in prototyping), so any manual changes would cause the variable value to be out of sync with the actual value.

This also happens for number variables as well. For example, if you have a border-radius variable bound to the border radius, but then you manually adjust that value, because we don’t update the border-radius variable value, we just unbind the variable.

I understand the UI can be misleading and so our team will be looking into improving this. Please let us know if you have any further questions.

Thank you. This clarification truly helps.

All the best.

EDIT: I should add, currently, I have approx. 75 variables that I cannot organize because I am unable to move them to a collection.

As a result, often I need to work on a layer that is hidden. Finding the variable slows me down considerably because there is no method to search for them. If I could quickly turn on a layer and “override” the variable this would be helpful, but is not the root cause of the issue.

Interesting thoughts. I love the variables and really feel this is the future of prototyping. Thanks again!