Role of Component name

Offen
#355 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
45/100
Issue-Typ
Dokumentation
Klarheit
Größtenteils klar
Aktivitätsstatus
Veraltet
Tech-Stack
kotlin, typescript

Rechercherichtung

Start with the Compose Code Connect documentation linked in the issue and trace how the Composable function name is used in suggested imports and as the Figma component name. The issue asks for the suggested import to resolve correctly and for the component name's role to be explained; confirm the relevant documentation and suggestion behavior before deciding what change is needed.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

API question

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 = {},
        )
    }
}
Vorherrschende Sprache
TypeScript
Sterne
1.6k
Forks
126
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Entwicklungsumgebung

Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus figma/code-connect

Alle Issues in figma/code-connect

Ähnliche Issues

Weitere Issues zu TypeScript

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.