Boolean variable gets removed from component variant between files when publishing update

Hi,

I’m running into a weird issue with the usage of a boolean variable inside my component.

Current situation

  • I have 2 files: library and work file.
  • In the library, there is a button component with variants.
  • The button component has a mode switch between text and icon, for which I use variables.
    • The mode changes spacing, but most important, it has a boolean in it that shows/hides the text.
    • The boolean ‘Text visibility’ has been applied to the text layer
    • It works 100% right now in the library and work file. Both show ‘Text visibility’ applied to the text layer.

The issue

  • It goes wrong when I try to add a new variant to the button.
  • When I add a variant (by clicks + or duplicating), the new variant doesn’t have the boolean ‘Text visibility’ to the layer.
    • I apply ‘Text visibility’ manually, which allows the modes to work again.
  • I publish the button component and this is where it starts getting weird.
    • The library version still works as intended.
    • The boolean ‘Text visibility’ gets removed from the text layer in my work file from all buttons that I update.
  • Even if I remove the new variants and republish, the issue persists. Only when I restore the library to before publishing (and re-publish that button version), only than the issue will go away.

Images
Overview of issue
overview

Library - Boolean variable

Library - Boolean applied
library - boolean applied

Workfile after update - Layer panel
workfile after update - layer panel

I’ve tried everything, but I can’t seem to fix it. Most issue I found on the forum are about prototyping or boolean properties.

Does anybody know how to fix this?

Same issue here! Boolean visibility variables that are in the same file as the component to which they are applied are missing if an instance of that component is placed in another file.



It’s good to hear that I’m at least not the only one. Which makes it less likely it’s my files and more likely it’s a bug. I’ve reported it in Figma to the team. Hopefully they will get in contact with me.

Yesterday I also created a dedicated bug report for this issue and received an answer 2 hours ago :slight_smile:

This is Anju from Figma. Thank you for reaching out!

It appears you have encountered a known issue with the variables feature that our engineers are investigating further and we apologize for the inconvenience.

I have added your case to our open bug report while the team continues investigating.
In the interim, the only workarounds we can recommend at this time would be to consider:

  • Detaching the text style in the component
  • Reattaching the variable binding on the instances created in the subscribed file

Our engineers are releasing a fix for this soon, and I will let you know once this is out.

Hi @Maiken @MarioKpler

Thanks for your patience and our apology for the issue.

Our engineering team confirmed this should be resolved now, but to see this fix for existing components in the file, please do the following to republish them:

  1. Go to each of the main components with the issue, apply a small change to a property of the components. For example, change the description - just something small that’s easy for you to remember and undo afterwards if you wish.

  2. Publish the change

  3. Go to a the files with the instances, accept library updates and then attempt to insert an instance of that component. See if the issue is resolved

  4. Go back to the main component and reverse whatever test change was applied.

If there are still any issues with this after trying those steps please do let us know.

Thanks again,
Toku