You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
At my organization, we have our Design System architected a different way in Figma. Our library is a part of an entire team that includes features as well. So we aren't able to fetch components / styles at a team level. We have three different files for each platform (Web, iOS, and Android).
With that said, I am getting the components and styles without using figmaCalculator's loadComponents and loadStyles since we need to get these via the file endpoints. Then I am passing allStyles and components with these returned responses into the processTree arguments.
// These functions match 1:1 to the figmaCalculator methods and corresponding API helpers.
// The only differences are the endpoints.
const components = await getLibraryComponents(libraryId);
const styles = await getLibraryStyles(libraryId);
for (const file of files) {
const processedNodes = figmaCalculator.processTree(page, {
allStyles: styles,
components
});
}
I am getting this error
Cannot read properties of undefined (reading ${companyName}SansVF<->31)
When I fork the code and optionally chain this if check, the error resolves and I can get the team breakdown. However, I want to make sure I am not missing something and potentially getting inaccurate usage counts.
Another metric we are trying to get is detachments. We've implemented a signature component to all of our library components in order to track detachments. I was hoping to be able to pass in a callback of some sort to have other conditions / outputs to the processTree. I noticed that processTree has an onProcessNode argument, but I am not sure if we can leverage that. Maybe we will just need to recurse through the page nodes again to get this metric outside of using figmaCalculator. 🤔
I still need to dig in more, but I wonder if you all have any ideas that come to mind.
The text was updated successfully, but these errors were encountered:
At my organization, we have our Design System architected a different way in Figma. Our library is a part of an entire team that includes features as well. So we aren't able to fetch components / styles at a team level. We have three different files for each platform (Web, iOS, and Android).
With that said, I am getting the components and styles without using
figmaCalculator
'sloadComponents
andloadStyles
since we need to get these via thefile
endpoints. Then I am passingallStyles
andcomponents
with these returned responses into theprocessTree
arguments.I am getting this error
on this line of code.
When I fork the code and optionally chain this if check, the error resolves and I can get the team breakdown. However, I want to make sure I am not missing something and potentially getting inaccurate usage counts.
Another metric we are trying to get is detachments. We've implemented a signature component to all of our library components in order to track detachments. I was hoping to be able to pass in a callback of some sort to have other conditions / outputs to the
processTree
. I noticed thatprocessTree
has anonProcessNode
argument, but I am not sure if we can leverage that. Maybe we will just need to recurse through the page nodes again to get this metric outside of using figmaCalculator. 🤔I still need to dig in more, but I wonder if you all have any ideas that come to mind.
The text was updated successfully, but these errors were encountered: