Role of Component name

Đang mở
#355 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
45/100
Loại issue
Tài liệu
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
kotlin, typescript

Hướng nghiên cứu

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.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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 = {},
        )
    }
}
Ngôn ngữ chính
TypeScript
Star
1.6k
Fork
126
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của figma/code-connect

Tất cả issue của figma/code-connect

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.