`figma connect preview` support for nested components props
還沒有人認領這個 Issue。
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 54/100
- Issue 類型
- 功能
- 描述清晰度
- 基本清楚
- 活躍度
- 冷清
- 技術堆疊
- figma, typescript
研究方向
Start by locating the figma connect preview command and the code that builds the --inspect and --output json property lists. Check how nested component instances are represented in the Figma data and compare that with the current boolean output for “Assistive text.” Done means both preview formats report nested component properties accurately so they can be used to test templates.
由索引模型根據 Issue 內容生成。
描述
Recently I started to experiment with the CLI preview feature and notice it can only receive props that belong strictly to the component.
Often my team designers share components that rely on nested instances. See in the image below the "Assistive text" nested component:
As you can see in the image below, the nested component value is a relevant prop for the component code:
When I run the preview command with the --inspect flag, Assistive text is represented as a boolean, which is not the case - it's a nested component.
● components.figma.batch.json (198:33673)
Name Type Options Default
------------------------ ------- ------------------------------------------- ---------
[𝐓] Label Text "Label"
Trailing label (Default) Boolean true | false true
Assistive text Boolean true | false false
Leading label Boolean true | false false
Selection Variant None | Selected | Partial "None"
State Variant Default | Hover | Active | Focus | Disabled "Default"
Error Variant True | False "False"
Similar output is generated with --output json:
[
{
"filePath": "components.figma.batch.json",
"nodeId": "198:33673",
"availableProperties": [
{
"name": "[𝐓] Label",
"type": "TEXT",
"default": "Label"
},
{
"name": "Trailing label (Default)",
"type": "BOOLEAN",
"default": true
},
{
"name": "Assistive text",
"type": "BOOLEAN",
"default": false
},
{
"name": "Leading label",
"type": "BOOLEAN",
"default": false
},
{
"name": "Selection",
"type": "VARIANT",
"variantOptions": [
"None", "Selected",
"Partial"
],
"default": "None"
},
{
"name": "State",
"type": "VARIANT",
"variantOptions": [
"Default",
"Hover",
"Active",
"Focus",
"Disabled"
],
"default": "Default"
},
{
"name": "Error",
"type": "VARIANT",
"variantOptions": [
"True",
"False"
],
"default": "False"
} ]
}
]
Being able to test the templates with the nested component values is quite relevant for our team to ensure these are working as we designed them.
- 主要語言
- TypeScript
- 星號
- 1.6k
- 分支
- 126
- PR 合併指標
- 30 天內沒有已合併 PR
環境準備
這個專案沒有提供開發容器、Dockerfile 或貢獻指南,環境需要你自己搭建:先看它的 README,通用步驟見我們的新手貢獻指南。
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
figma/code-connect 的其他 Issue
-
normalizePropName strips `#` characters from Figma property names instead of only the `#id` suffix未關閉
難度 2/5 1-3 小時 新手友好度 72/100
figma/code-connect#419 ·
-
feature request
難度 2/5 1-3 小時 新手友好度 66/100
figma/code-connect#403 ·
-
feature request
難度 5/5 一週以上 新手友好度 38/100
figma/code-connect#414 ·
-
feature request
難度 4/5 3-5 天 新手友好度 48/100
figma/code-connect#413 · 1 則留言 ·
-
API question
難度 4/5 3-5 天 新手友好度 48/100
figma/code-connect#408 · 3 則留言 ·
查看 figma/code-connect 的全部 Issue
相似的 Issue
-
bug parity
難度 2/5 1-3 小時 新手友好度 70/100
WenyuChiou/agent-board#1489 ·
維護者通常 1 天內回覆
-
area: bazaar bug complexity: medium
難度 2/5 1-3 小時 新手友好度 74/100
accensa/x402-facilitator-stellar#779 ·
維護者通常 1 天內回覆
-
bug good first issue P4 size:S web-ui
難度 2/5 半天 新手友好度 85/100
josephfung/curia#2600 ·
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 62/100
cloudflare/partykit#444 ·