Skip to content

Role of Component name #355

@sebastienrouif

Description

@sebastienrouif

I realised that the name of the function annotated with @composable is used in two places :

  • in the import inside suggest code (see screenshot)
  • as the component name (I'm not sure what the component name is used for anyway in Compose)
Image

The import in the suggested code should be fixed, and point to the real import
The role of the component name in Figma should be better explained in https://developers.figma.com/docs/code-connect/compose/

Please provide:

  • Code Connect CLI version 1.3.13
  • Operating system MacOS 26.2
  • Code Connect file
@file:Suppress("unused")

package com.mycomapny.designsystem

import androidx.compose.runtime.Composable
import com.figma.code.connect.FigmaConnect
import com.figma.code.connect.FigmaVariant
import com.navico.argonsdk.compose.slider.Slider

@FigmaConnect(url = "https://www.figma.com/design/4Lp9RNH2jS1KmFqwFNJlXZ/TestFile?node-id=1-35&t=gFRxObRkPosXZapP-4")
@FigmaVariant("Style", "Horizontal")
private class TestFigma {

    @Composable
    fun Slider1() {
        Slider.Horizontal(
            value = 1f,
            onValueChange = {},
        )
    }
}

@FigmaConnect(url = "https://www.figma.com/design/4Lp9RNH2jS1KmFqwFNJlXZ/TestFile?node-id=1-35&t=gFRxObRkPosXZapP-4")
@FigmaVariant("Style", "Vertical")
private class TestVerticalFigma {

    @Composable
    fun Slider2() {
        Slider.Horizontal(
            value = 1f,
            onValueChange = {},
        )
    }
}

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