Skip to content

.executeTemplate() returning the executed template for the wrong label #369

@adbutterfield

Description

@adbutterfield

We noticed a bug in Figma. For Figma components where we have connected multiple labels (React and SwiftUI) the Code Connect panel does not show the correct code for SwiftUI, but the pop ups do (after clicking either "View connection" or "Explore component behavior").

I added some logs, and it turns out for SwiftUI .executeTemplate() on an instance swap prop is returning the React template, not the SwiftUI template. I'm not sure about the source of the bug any deeper than that.

You can see in the screenshot in the pop up we get the correct output, in the panel it has undefined.

Image

This seems to only affect Figma in the browser, not the Figma desktop app.

@figma/code-connect version: 1.4.1
Parser: custom
Platform: macOS

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions