Open timothyfroehlich opened 1 week ago
I don't think we should restrict access to enterprise users. If the request for variables returns because the Figma API key doesn't have access, we can log the error (logcat, Design Switcher, or maybe something even more visible?), but don't fail live update completely.
A second improvement can be that before making the variables API request, we can check to see if the document uses any variables, and if not, don't perform the request.
Lastly, if the file does in fact use variables but the Figma API key does not have access, there might be an issue where we try to use the variable values but can't find them, so we use the default, and incorrect, values (black/white colors, 0 corner radius, etc). I'm not sure what will happen here, but if this is the case we may need to make a change to use the node's direct values instead of the variable value since we don't have access to it. If this is complex we can make a separate ticket for it.
@johnoneil just found this out. I don't think we'd realized this before and we'll need to update documentation to note that users will need their token to have both file read and variable read.