`figma connect preview` support for nested components props
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 54/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Tranquilla
- Stack tecnologico
- figma, typescript
- Ambito
- developer-experience
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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.
- Lingua principale
- TypeScript
- Stelle
- 1.6k
- Fork
- 126
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di figma/code-connect
-
normalizePropName strips `#` characters from Figma property names instead of only the `#id` suffixAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
figma/code-connect#419 ·
-
feature request
Difficoltà 2/5 1-3 ore Idoneità per principianti 66/100
figma/code-connect#403 ·
-
feature request
Difficoltà 5/5 Più di una settimana Idoneità per principianti 38/100
figma/code-connect#414 ·
-
feature request
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
figma/code-connect#413 · 1 commento ·
-
API question
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
figma/code-connect#408 · 3 commenti ·
Tutte le issue di figma/code-connect
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
-
bug
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
jeanibarz/knowledge-base-mcp-server#1268 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
Koenkk/zigbee-herdsman-converters#13820 ·
I maintainer di solito rispondono entro 2 giorni
-
A live recovery copy treats a large whole number and text with the same digits as the same valueApertabug sharing & sync
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
I maintainer di solito rispondono entro 1 giorno
-
[prefer-expect-resolves] autofix leaves a stray ")" when the awaited expression is parenthesizedAperta
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
jest-community/eslint-plugin-jest#2052 ·