Skip to main content
orkhanjafarovr
November 24, 2021
Question

How to find detached nodes?

  • November 24, 2021
  • 19 replies
  • 2358 views

Is there way to find all detached nodes in the file ?

This topic has been closed for replies.

19 replies

Gleb
Power Member
November 24, 2021

No, detached instances become regular frames, they don’t contain any info about their previous state of being instances.

The only thing that comes to mind is you can use version history for that, but if instance creation and detachment happened within one version, then it won’t be possible to detect.

HonzaTmnProductboard
November 29, 2021

There was a nice tip from Uber’s team on the last Config – adding Signature pixel to each component, that stays there also if the component is detached. Check it here. It could help for what you want to achieve.

orkhanjafarovr
December 1, 2021

That’s exactly how we do this. But I was looking for something built-in for the components without any trackers inside. Thank you!

Daniel_Golden1
December 8, 2021

Is there anywhere to read up on how how Uber did this? I’m trying to implement the same thing for our our design system at New Relic.

orkhanjafarovr
December 8, 2021

It’s about keeping a node with specific name, when you can scan these nodes and check if they are in instance or not to mark it as detached.
Check youtube video " Using Figma to go beyond Figma - Dylan Babbs, Vietanh Nguyen (Config 2021)" (can’t use links in the forum 😢)

We have a similar way, but a bit more advanced

Daniel_Golden1
December 8, 2021

I’ve been watching that video on repeat this morning trying to discern how they did it. As far as I can tell, you’d need to be able to access and get the contents of every file in the organization to make this work, but the Figma only allow you to access files that you have the fileID for, right? I’m hoping I’m incorrect about that, but that’s the best I can see.

Has your team written up anything about how you pull this off?


Edit: I think I got it. You get all files of a project by providing the team_id then you get all of the files in that project.

Daniel_Golden
January 19, 2022

Have you run into the issue where the file your scanning for detached components is too big and your API request times out? If so, how have you gotten around this?

Amogh_Srivastava
New Member
September 29, 2024

I can see that Figma shows that an instance was detached and it can also be traced back by going to main component

Even in analytics the components leave some breadcrumbs behind by showing detached.

How can we use this to scan a frame/page/files for detached components? 🤔

Gleb
Power Member
September 29, 2024

I made a plugin that can help you find detached instances:

https://dominate.design/detached

It’s free to use to find them but if you wish to reattach them using smart Master plugin algorithms it’s paid.

Bala_Sivagnanam
New Participant
October 1, 2024

Is there a way to do this instead of tracking hidden pixels? or any other alternatives?