code-connect icon indicating copy to clipboard operation
code-connect copied to clipboard

Confused about "What is the URL of the Figma file containing your design system library?"

Open mrlubos opened this issue 1 year ago • 5 comments

Hey! I am trying to test out Code Connect and I got stuck on this question. Is the expectation that there's a single large file containing the whole design library? A lot of large companies will have a separate documentation (read: file) per component/pattern, so I am not sure what's the expected value here? You can see in https://github.com/figma/code-connect/issues/125 I tried a single Button component design. I have many many more files with different components/patterns. Does Code Connect make assumptions about the underlying design structure?

mrlubos avatar Aug 12 '24 18:08 mrlubos

(Sorry! I was sure I replied to this one on monday!)

Right now the figma connect assistant only accepts a single URL for each run. But you should be able to run it several times with different urls for each part of your design system.

ptomas-figma avatar Aug 14 '24 10:08 ptomas-figma

Thanks @ptomas-figma! I didn't dig into this yet as I had the other issue preventing me from trying it out... how does it know which page my components are on? Is there anywhere a rough overview of the architecture behind this integration?

mrlubos avatar Aug 14 '24 10:08 mrlubos

The assistant will check for all the components on all the pages of the file. We're considering adding ways to filter that to a specific page or frame. What do you think it would be useful for your use case?

ptomas-figma avatar Aug 14 '24 12:08 ptomas-figma

Specific page would definitely help, not sure about frames. Our pages always follow the same naming pattern, e.g. Discovery, Design, Archive. The main concern I have at the moment is whether design must be aware of not renaming certain elements as that could break the links?

mrlubos avatar Aug 14 '24 12:08 mrlubos

Renaming pages shouldn't be a problem as the links are based on the node id and not the names.

ptomas-figma avatar Aug 14 '24 13:08 ptomas-figma