@atezer/figma-mcp-bridge 1.7.24 → 1.7.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +37 -0
- package/.cursor-plugin/plugin.json +21 -0
- package/README.md +4 -3
- package/agents/ds-auditor.md +29 -0
- package/agents/screen-builder.md +29 -0
- package/agents/token-syncer.md +26 -0
- package/assets/logo.png +0 -0
- package/commands/add-library.md +122 -0
- package/commands/ds-add.md +255 -0
- package/commands/ds-sync.md +314 -0
- package/commands/implement.md +43 -0
- package/commands/install-library.md +73 -0
- package/commands/setup.md +26 -0
- package/commands/test.md +39 -0
- package/commands/update.md +25 -0
- package/dist/core/response-guard.d.ts +1 -1
- package/dist/core/response-guard.js +1 -1
- package/dist/core/version.d.ts +1 -1
- package/dist/core/version.js +1 -1
- package/hooks/hooks.json +26 -0
- package/package.json +8 -1
- package/skills/BRAND_PROFILE_SCHEMA.md +113 -0
- package/skills/SKILL_INDEX.md +194 -0
- package/skills/TOOL_MAPPING.md +111 -0
- package/skills/ai-handoff-export/SKILL.md +254 -0
- package/skills/apply-figma-design-system/SKILL.md +104 -0
- package/skills/audit-figma-design-system/SKILL.md +278 -0
- package/skills/code-design-mapper/SKILL.md +370 -0
- package/skills/component-documentation/SKILL.md +190 -0
- package/skills/design-drift-detector/SKILL.md +407 -0
- package/skills/design-system-rules/SKILL.md +407 -0
- package/skills/design-token-pipeline/SKILL.md +619 -0
- package/skills/ds-impact-analysis/SKILL.md +266 -0
- package/skills/figjam-diagram-builder/SKILL.md +172 -0
- package/skills/figma-a11y-audit/SKILL.md +587 -0
- package/skills/figma-canvas-ops/SKILL.md +325 -0
- package/skills/figma-screen-analyzer/SKILL.md +235 -0
- package/skills/fix-figma-design-system-finding/SKILL.md +117 -0
- package/skills/fmcp-project-rules/SKILL.md +93 -0
- package/skills/generate-figma-library/SKILL.md +598 -0
- package/skills/generate-figma-screen/SKILL.md +689 -0
- package/skills/implement-design/SKILL.md +473 -0
- package/skills/ux-copy-guidance/SKILL.md +373 -0
- package/skills/visual-qa-compare/SKILL.md +166 -0
|
@@ -0,0 +1,473 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: implement-design
|
|
3
|
+
description: Figma tasarımlarını iOS (SwiftUI/UIKit), Android (Compose/XML) ve Web (React/Vue/legacy) platformlarına production-ready koda dönüştürür. Figma node ID paylaşıldığında, "implement design", "tasarımı kodla", "build this component", "bu ekranı implement et", "bu tasarımı kodla", "Figma'dan kod üret" ifadeleriyle tetiklenir. F-MCP Bridge plugin bağlantısı gerektirir.
|
|
4
|
+
metadata:
|
|
5
|
+
mcp-server: user-figma-mcp-bridge
|
|
6
|
+
personas:
|
|
7
|
+
- uidev
|
|
8
|
+
---
|
|
9
|
+
|
|
10
|
+
# Implement Design (Multi-Platform)
|
|
11
|
+
|
|
12
|
+
> **Design Token Kuralı:** Bu skill'deki kod örneklerinde geçen font adları, renk kodları, piksel boyutları yalnızca FORMAT gösterimidir. Çalışma anında tüm design token değerleri (font, renk, boyut, spacing, radius, gölge) kayıtlı kütüphaneden (`figma_get_variables`, `figma_get_styles`) veya kullanıcıdan okunmalıdır. Hardcoded token değeri kullanma. Detay: `project-context.md` → "Design Token Kuralı".
|
|
13
|
+
|
|
14
|
+
## Overview
|
|
15
|
+
|
|
16
|
+
Bu skill, Figma tasarımlarını **iOS, Android ve Web** platformlarına pixel-perfect doğrulukla koda dönüştürür. Aynı Figma design system'i 3 farklı platformda implement eden ekipler için tasarlanmıştır.
|
|
17
|
+
|
|
18
|
+
**Önemli:** Tüm veriler plugin bridge (WebSocket) üzerinden alınır. MCP araçları platform-agnostik tasarım verisi sağlar; platform-spesifik kod dönüşümü (SwiftUI, Compose, CSS vb.) AI agent tarafından yapılır.
|
|
19
|
+
|
|
20
|
+
**Desteklenen platformlar ve çıktı formatları:**
|
|
21
|
+
|
|
22
|
+
| Platform | Modern | Legacy |
|
|
23
|
+
|----------|--------|--------|
|
|
24
|
+
| **iOS** | SwiftUI | UIKit (Storyboard/XIB, programmatic) |
|
|
25
|
+
| **Android** | Jetpack Compose | XML Layout + View system |
|
|
26
|
+
| **Web** | React + Tailwind/CSS Modules | jQuery, vanilla JS, Handlebars, legacy CSS |
|
|
27
|
+
|
|
28
|
+
REST API veya Figma access token gerekmez; tüm veriler plugin bridge üzerinden alınır.
|
|
29
|
+
|
|
30
|
+
## Prerequisites
|
|
31
|
+
|
|
32
|
+
- F-MCP Bridge plugin Figma'da çalışıyor ve bağlı olmalı
|
|
33
|
+
- Hedef platform belirlenmiş olmalı (iOS / Android / Web)
|
|
34
|
+
- Projenin platform-spesifik konvansiyonları bilinmeli
|
|
35
|
+
|
|
36
|
+
## F-MCP skill koordinasyonu
|
|
37
|
+
|
|
38
|
+
- **Önce:** **code-design-mapper** ve **design-token-pipeline** çıktıları varsa kullan; isteğe bağlı **ai-handoff-export**; tuvalde ham primitive’ler varsa **audit-figma-design-system** → **apply-figma-design-system** (veya tek bulgu için **fix-figma-design-system-finding**).
|
|
39
|
+
- **Sonra (tipik):** Kod üretildikten veya güncellendikten sonra **design-drift-detector** ile parity. Drift bulgusu Figma kaynaklıysa **fix-figma-design-system-finding** veya **apply-figma-design-system**; kod kaynaklıysa kodu düzeltip drift’i yeniden çalıştır.
|
|
40
|
+
|
|
41
|
+
## Required Workflow
|
|
42
|
+
|
|
43
|
+
**Bu adımları sırayla uygula. Adım atlama.**
|
|
44
|
+
|
|
45
|
+
### Step 1: Plugin Bağlantısını Doğrula
|
|
46
|
+
|
|
47
|
+
```
|
|
48
|
+
figma_get_status()
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
### Step 2: Hedef Platformu Belirle
|
|
52
|
+
|
|
53
|
+
Kullanıcıdan hedef platformu öğren. Birden fazla platform seçilebilir:
|
|
54
|
+
|
|
55
|
+
- **iOS** — SwiftUI mi UIKit mi? Minimum iOS versiyonu?
|
|
56
|
+
- **Android** — Compose mi XML mi? Minimum API level?
|
|
57
|
+
- **Web** — React/Vue/Svelte/Angular/vanilla? Tailwind/CSS Modules/Sass/legacy CSS?
|
|
58
|
+
|
|
59
|
+
Platform belirlenmemişse sor. "Tüm platformlar" denildiyse sırayla her platform için üret.
|
|
60
|
+
|
|
61
|
+
### Step 3: Node ID Belirle
|
|
62
|
+
|
|
63
|
+
Kullanıcı Figma URL paylaştıysa:
|
|
64
|
+
|
|
65
|
+
**URL formatı:** `https://figma.com/design/:fileKey/:fileName?node-id=1-2`
|
|
66
|
+
|
|
67
|
+
- `node-id=1-2` → `1:2` formatına çevir
|
|
68
|
+
|
|
69
|
+
Node ID verilmediyse dosya yapısını keşfet:
|
|
70
|
+
|
|
71
|
+
```
|
|
72
|
+
figma_get_file_data(depth=1, verbosity="summary")
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
### Step 4: Design Context Al (Chunked Metadata Stratejisi)
|
|
76
|
+
|
|
77
|
+
**Büyük ekranlar için parçalı okuma stratejisi uygula:**
|
|
78
|
+
|
|
79
|
+
1. **İlk çağrı — üst yapı:** `depth=1`, `verbosity="summary"` ile ekranın ana bölümlerini ve child ID'lerini al
|
|
80
|
+
2. **Bölüm bazlı detay:** Her ana bölümün ID'si ile ayrı `figma_get_design_context` çağrısı (`depth=2`, `verbosity="full"`)
|
|
81
|
+
3. **3 seviye sınırı:** Hiçbir çağrıda `depth` 3'ü geçmesin — timeout ve aşırı veri riski
|
|
82
|
+
|
|
83
|
+
```
|
|
84
|
+
figma_get_design_context(
|
|
85
|
+
nodeId="<NODE_ID>",
|
|
86
|
+
depth=1,
|
|
87
|
+
verbosity="summary"
|
|
88
|
+
)
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
Sonra her child bölüm için:
|
|
92
|
+
|
|
93
|
+
```
|
|
94
|
+
figma_get_design_context(
|
|
95
|
+
nodeId="<CHILD_NODE_ID>",
|
|
96
|
+
depth=2,
|
|
97
|
+
verbosity="full",
|
|
98
|
+
includeLayout=true,
|
|
99
|
+
includeVisual=true,
|
|
100
|
+
includeTypography=true,
|
|
101
|
+
includeCodeReady=true
|
|
102
|
+
)
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
`outputHint` parametresini platformla eşleştirme:
|
|
106
|
+
- Web projeleri: `outputHint="react"` veya `outputHint="tailwind"` — `layoutSummary` alanını kod-hazır formatta üretir
|
|
107
|
+
- iOS/Android: `outputHint` kullanma — `outputHint` yalnızca web formatlarını destekler (`react` ve `tailwind`). iOS/Android için ham layout/visual/typography verilerini al ve platform-native koda kendin çevir
|
|
108
|
+
|
|
109
|
+
Bu çağrı döner:
|
|
110
|
+
- Layout (Auto Layout → StackView/LinearLayout/Flexbox eşleşmesi için)
|
|
111
|
+
- Typography (font, size, weight → platform-spesifik font API'sine çevrilecek)
|
|
112
|
+
- Renkler (hex → UIColor/Color/SwiftUI Color, Android Color, CSS var)
|
|
113
|
+
- Component yapısı ve variant'lar
|
|
114
|
+
- roleHint / suiComponent
|
|
115
|
+
|
|
116
|
+
### Step 5: Screenshot Al
|
|
117
|
+
|
|
118
|
+
```
|
|
119
|
+
figma_capture_screenshot(nodeId="<NODE_ID>", format="PNG", scale=2)
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
### Step 6: Token ve Variable Verilerini Çek
|
|
123
|
+
|
|
124
|
+
```
|
|
125
|
+
figma_get_variables(verbosity="full")
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
```
|
|
129
|
+
figma_get_styles(verbosity="full")
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
`figma_get_variables` ham variable verisi döner: `name`, `resolvedType` (COLOR/FLOAT/STRING/BOOLEAN), `valuesByMode` (her mode için değer). Alias referansları `valuesByMode` içinde `type: "VARIABLE_ALIAS"` olarak gelir — bu durumda hedef variable'ın ID'si verilir, alias zincirini sen çözmelisin.
|
|
133
|
+
|
|
134
|
+
Bu verilerle:
|
|
135
|
+
- Variable'ların mode bazlı değerlerini oku (ör. Light mode: `#2563eb`, Dark mode: `#60a5fa`)
|
|
136
|
+
- Alias referanslarını takip ederek son değere ulaş
|
|
137
|
+
- Platform-spesifik token formatını belirle
|
|
138
|
+
|
|
139
|
+
### Step 7: Platform-Spesifik Implementasyon
|
|
140
|
+
|
|
141
|
+
#### iOS — SwiftUI
|
|
142
|
+
|
|
143
|
+
**Layout çevirisi:**
|
|
144
|
+
- Figma Auto Layout (vertical) → `VStack`
|
|
145
|
+
- Figma Auto Layout (horizontal) → `HStack`
|
|
146
|
+
- Figma Auto Layout (wrap) → `LazyVGrid` / `FlowLayout`
|
|
147
|
+
- Figma constraints → `.frame()` modifier'ları
|
|
148
|
+
- Figma padding → `.padding()` modifier'ları
|
|
149
|
+
|
|
150
|
+
**Renk çevirisi:**
|
|
151
|
+
- Figma hex → `Color(red:green:blue:)` veya Asset Catalog color
|
|
152
|
+
- Design token referansı → `Color("primaryColor")` (Asset Catalog'dan)
|
|
153
|
+
- Opacity → `.opacity()` modifier
|
|
154
|
+
|
|
155
|
+
**Typography çevirisi:**
|
|
156
|
+
- Figma font → `.font(.system(size:weight:))` veya custom font
|
|
157
|
+
- Line height → `.lineSpacing()`
|
|
158
|
+
- Letter spacing → `.tracking()`
|
|
159
|
+
|
|
160
|
+
**Component yapısı:**
|
|
161
|
+
```swift
|
|
162
|
+
struct ButtonComponent: View {
|
|
163
|
+
let variant: ButtonVariant
|
|
164
|
+
let size: ButtonSize
|
|
165
|
+
let title: String
|
|
166
|
+
|
|
167
|
+
var body: some View {
|
|
168
|
+
Text(title)
|
|
169
|
+
.font(size.font)
|
|
170
|
+
.foregroundColor(variant.textColor)
|
|
171
|
+
.padding(size.padding)
|
|
172
|
+
.background(variant.backgroundColor)
|
|
173
|
+
.cornerRadius(size.cornerRadius)
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
```
|
|
177
|
+
|
|
178
|
+
#### iOS — UIKit (Legacy)
|
|
179
|
+
|
|
180
|
+
**Layout çevirisi:**
|
|
181
|
+
- Auto Layout → `NSLayoutConstraint` veya SnapKit
|
|
182
|
+
- Stack → `UIStackView`
|
|
183
|
+
- Padding → `layoutMargins` veya constraint insets
|
|
184
|
+
|
|
185
|
+
**Component yapısı:**
|
|
186
|
+
```swift
|
|
187
|
+
class ButtonView: UIView {
|
|
188
|
+
private let titleLabel = UILabel()
|
|
189
|
+
|
|
190
|
+
func configure(variant: ButtonVariant, size: ButtonSize) {
|
|
191
|
+
titleLabel.font = size.uiFont
|
|
192
|
+
titleLabel.textColor = variant.uiTextColor
|
|
193
|
+
backgroundColor = variant.uiBackgroundColor
|
|
194
|
+
layer.cornerRadius = size.cornerRadius
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
```
|
|
198
|
+
|
|
199
|
+
#### Android — Jetpack Compose
|
|
200
|
+
|
|
201
|
+
**Layout çevirisi:**
|
|
202
|
+
- Figma Auto Layout (vertical) → `Column`
|
|
203
|
+
- Figma Auto Layout (horizontal) → `Row`
|
|
204
|
+
- Figma Auto Layout (wrap) → `FlowRow` / `LazyVerticalGrid`
|
|
205
|
+
- Figma padding → `Modifier.padding()`
|
|
206
|
+
- Figma constraints → `Modifier.fillMaxWidth()`, `.wrapContentHeight()`
|
|
207
|
+
|
|
208
|
+
**Renk çevirisi:**
|
|
209
|
+
- Figma hex → `Color(0xFF2563EB)` veya `MaterialTheme.colorScheme.primary`
|
|
210
|
+
- Design token → `AppTheme.colors.primary`
|
|
211
|
+
|
|
212
|
+
**Typography çevirisi:**
|
|
213
|
+
- Figma font → `TextStyle(fontSize = 14.sp, fontWeight = FontWeight.SemiBold)`
|
|
214
|
+
- Line height → `lineHeight = 20.sp`
|
|
215
|
+
- Letter spacing → `letterSpacing = 0.5.sp`
|
|
216
|
+
|
|
217
|
+
**Component yapısı:**
|
|
218
|
+
```kotlin
|
|
219
|
+
@Composable
|
|
220
|
+
fun ButtonComponent(
|
|
221
|
+
variant: ButtonVariant,
|
|
222
|
+
size: ButtonSize,
|
|
223
|
+
title: String,
|
|
224
|
+
onClick: () -> Unit
|
|
225
|
+
) {
|
|
226
|
+
Button(
|
|
227
|
+
onClick = onClick,
|
|
228
|
+
colors = ButtonDefaults.buttonColors(
|
|
229
|
+
containerColor = variant.backgroundColor
|
|
230
|
+
),
|
|
231
|
+
shape = RoundedCornerShape(size.cornerRadius),
|
|
232
|
+
contentPadding = size.contentPadding
|
|
233
|
+
) {
|
|
234
|
+
Text(
|
|
235
|
+
text = title,
|
|
236
|
+
style = size.textStyle,
|
|
237
|
+
color = variant.textColor
|
|
238
|
+
)
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
#### Android — XML Layout (Legacy)
|
|
244
|
+
|
|
245
|
+
**Layout çevirisi:**
|
|
246
|
+
- Auto Layout (vertical) → `LinearLayout android:orientation="vertical"` veya `ConstraintLayout`
|
|
247
|
+
- Auto Layout (horizontal) → `LinearLayout android:orientation="horizontal"`
|
|
248
|
+
- Padding → `android:padding`
|
|
249
|
+
- Spacing → `android:layout_marginTop` veya Space view
|
|
250
|
+
|
|
251
|
+
**Component yapısı:**
|
|
252
|
+
```xml
|
|
253
|
+
<com.google.android.material.button.MaterialButton
|
|
254
|
+
android:layout_width="wrap_content"
|
|
255
|
+
android:layout_height="wrap_content"
|
|
256
|
+
android:text="@string/button_text"
|
|
257
|
+
android:textSize="@dimen/text_size_md"
|
|
258
|
+
android:textColor="@color/button_text"
|
|
259
|
+
android:backgroundTint="@color/button_bg"
|
|
260
|
+
app:cornerRadius="@dimen/radius_md"
|
|
261
|
+
android:paddingHorizontal="@dimen/space_lg"
|
|
262
|
+
android:paddingVertical="@dimen/space_md" />
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
#### Web — Modern (React/Vue/Svelte)
|
|
266
|
+
|
|
267
|
+
- Figma MCP çıktısı genellikle React + Tailwind formatında gelir
|
|
268
|
+
- Projenin framework'üne çevir
|
|
269
|
+
- Mevcut component library'yi kullan
|
|
270
|
+
- Design token'ları CSS variables veya Tailwind config'den referans al
|
|
271
|
+
|
|
272
|
+
#### Web — Legacy
|
|
273
|
+
|
|
274
|
+
**Legacy altyapılarda:**
|
|
275
|
+
- jQuery plugin pattern'ı veya vanilla JS class'ı kullan
|
|
276
|
+
- Handlebars/EJS/Pug template'lerine çevir
|
|
277
|
+
- Legacy CSS (float-based layout, flexbox polyfill'ler)
|
|
278
|
+
- Bootstrap 3/4 grid system'ine uyarla
|
|
279
|
+
- IE11 / eski browser desteği için fallback'ler ekle
|
|
280
|
+
|
|
281
|
+
### Step 7b: Asset İndirme
|
|
282
|
+
|
|
283
|
+
Bileşende SVG/PNG asset gerekiyorsa:
|
|
284
|
+
|
|
285
|
+
```
|
|
286
|
+
figma_get_component_image(nodeId="<COMPONENT_ID>", format="SVG")
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
veya
|
|
290
|
+
|
|
291
|
+
```
|
|
292
|
+
figma_get_component_image(nodeId="<COMPONENT_ID>", format="PNG", scale=2)
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
İndirilen asset'leri platform dizinine yerleştir:
|
|
296
|
+
- **iOS:** `Assets.xcassets/` (1x, 2x, 3x)
|
|
297
|
+
- **Android:** `res/drawable-*dpi/`
|
|
298
|
+
- **Web:** `public/assets/` veya `src/assets/`
|
|
299
|
+
|
|
300
|
+
### Step 7c: Screenshot ile Görsel Doğrulama
|
|
301
|
+
|
|
302
|
+
Her platform çıktısı sonrası Figma screenshot'ı ile karşılaştır:
|
|
303
|
+
|
|
304
|
+
```
|
|
305
|
+
figma_capture_screenshot(nodeId="<NODE_ID>", format="PNG", scale=2)
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Üretilen kodu çalıştırıp ekran görüntüsünü al ve Figma screenshot'ı ile karşılaştır. Farklar varsa düzelt.
|
|
309
|
+
|
|
310
|
+
### Step 7d: Durum ve Etkileşim Kapsamı Kontrolü
|
|
311
|
+
|
|
312
|
+
Görsel doğrulamaya ek olarak, tüm durumlar ve etkileşimler implement edildi mi kontrol et:
|
|
313
|
+
|
|
314
|
+
| Kontrol | Açıklama |
|
|
315
|
+
|---------|----------|
|
|
316
|
+
| **Durum kapsamı** | Default, hover, active, disabled, loading, error, focus — handoff spec'te belirtilen tüm durumlar implement edildi mi? |
|
|
317
|
+
| **Etkileşim kontrolü** | Transition süreleri doğru mu? (handoff spec'teki ms + easing değerleri) |
|
|
318
|
+
| **Uç durum testi** | Min/max içerik test edildi mi? (3 kelimelik başlık vs 30 kelimelik başlık) |
|
|
319
|
+
| **Boş durum** | Empty state implement edildi mi? (copy için bkz. [ux-copy-guidance](../ux-copy-guidance/SKILL.md)) |
|
|
320
|
+
| **Yükleme durumu** | Skeleton/spinner implement edildi mi? |
|
|
321
|
+
| **Hata durumu** | Error state mesajı ve görünümü implement edildi mi? |
|
|
322
|
+
|
|
323
|
+
> **Kaynak:** ai-handoff-export skill'inin "Etkileşim Spesifikasyonları", "İçerik Spesifikasyonları" ve "Uç Durumlar" bölümleri bu kontrol için referanstır.
|
|
324
|
+
|
|
325
|
+
### Step 8: Design Parity Kontrolü
|
|
326
|
+
|
|
327
|
+
**Önemli sınırlama:** `figma_check_design_parity` yalnızca **token değerlerini** karşılaştırır (variables + styles). Belirli bir component'in layout, spacing veya typography'sini kontrol etmez. Component-level doğrulama için screenshot karşılaştırması kullan.
|
|
328
|
+
|
|
329
|
+
**Önemli:** `codeTokens` içindeki token isimleri Figma'daki variable isimleriyle **tam eşleşmeli**. Figma'da `color/primary` ise, `codeTokens`'ta da `color/primary` kullan, `primary` veya `--color-primary` değil.
|
|
330
|
+
|
|
331
|
+
```
|
|
332
|
+
figma_check_design_parity(
|
|
333
|
+
codeTokens='{"color/primary": "#2563eb", "spacing/md": 16}'
|
|
334
|
+
)
|
|
335
|
+
```
|
|
336
|
+
|
|
337
|
+
### Step 9: Platform-Spesifik Doğrulama Kontrol Listesi
|
|
338
|
+
|
|
339
|
+
**Tüm platformlar:**
|
|
340
|
+
- [ ] Layout eşleşiyor (spacing, alignment, sizing)
|
|
341
|
+
- [ ] Typography eşleşiyor (font, size, weight, line height)
|
|
342
|
+
- [ ] Renkler tam eşleşiyor
|
|
343
|
+
- [ ] Token'lar hardcoded değil, design system referansları kullanılıyor
|
|
344
|
+
|
|
345
|
+
**iOS ek kontroller:**
|
|
346
|
+
- [ ] Dynamic Type desteği (accessibility font scaling)
|
|
347
|
+
- [ ] Dark Mode desteği (UITraitCollection / @Environment colorScheme)
|
|
348
|
+
- [ ] Safe area inset'leri doğru uygulanmış
|
|
349
|
+
- [ ] VoiceOver erişilebilirliği
|
|
350
|
+
|
|
351
|
+
**Android ek kontroller:**
|
|
352
|
+
- [ ] Material Design 3 uyumu
|
|
353
|
+
- [ ] Dark Theme desteği (night qualifier veya isSystemInDarkTheme)
|
|
354
|
+
- [ ] Farklı ekran yoğunlukları (dp/sp birimleri doğru)
|
|
355
|
+
- [ ] TalkBack erişilebilirliği
|
|
356
|
+
- [ ] Minimum API level uyumu
|
|
357
|
+
|
|
358
|
+
**Web ek kontroller:**
|
|
359
|
+
- [ ] Responsive davranış
|
|
360
|
+
- [ ] WCAG AA erişilebilirlik
|
|
361
|
+
- [ ] Legacy browser desteği (gerekiyorsa)
|
|
362
|
+
- [ ] RTL (sağdan-sola) desteği (gerekiyorsa)
|
|
363
|
+
|
|
364
|
+
## Türkçe Karakter Kuralı (ZORUNLU)
|
|
365
|
+
|
|
366
|
+
Tüm Türkçe metin içeriklerinde (Figma text node, kod string, dokümantasyon) doğru Unicode karakterler kullanılmalıdır. ASCII karşılıkları YASAKTIR:
|
|
367
|
+
|
|
368
|
+
| Doğru | Yanlış | Doğru | Yanlış |
|
|
369
|
+
|-------|--------|-------|--------|
|
|
370
|
+
| ş | s | Ş | S |
|
|
371
|
+
| ı | i | İ | I |
|
|
372
|
+
| ö | o | Ö | O |
|
|
373
|
+
| ü | u | Ü | U |
|
|
374
|
+
| ç | c | Ç | C |
|
|
375
|
+
| ğ | g | Ğ | G |
|
|
376
|
+
|
|
377
|
+
Son adım: Üretilen tüm Türkçe metinleri karakter kontrolünden geçir.
|
|
378
|
+
|
|
379
|
+
## Cross-Platform Tutarlılık
|
|
380
|
+
|
|
381
|
+
Aynı component'i birden fazla platformda implement ederken:
|
|
382
|
+
|
|
383
|
+
1. **Tek Figma kaynağı** — Tüm platformlar aynı Figma node'dan beslenir
|
|
384
|
+
2. **Aynı token değerleri** — Renkler, spacing, radius her platformda aynı sayısal değeri kullanmalı
|
|
385
|
+
3. **Platform-native davranış** — Görünüm aynı olmalı ama interaction pattern'ları platforma özgü olmalı (ör. iOS haptic feedback, Android ripple effect, Web hover state)
|
|
386
|
+
|
|
387
|
+
**Gesture Platform Mapping Tablosu:**
|
|
388
|
+
|
|
389
|
+
| Gesture | iOS (SwiftUI/UIKit) | Android (Compose/View) | Web (React/HTML) |
|
|
390
|
+
|---------|---------------------|----------------------|------------------|
|
|
391
|
+
| Tap | `onTapGesture` / `UITapGestureRecognizer` | `Modifier.clickable` / `OnClickListener` | `onClick` |
|
|
392
|
+
| Swipe | `swipeActions` / `UISwipeGestureRecognizer` | `SwipeToDismissBox` / `ItemTouchHelper` | `onTouchStart/Move/End` + threshold |
|
|
393
|
+
| Long-press | `onLongPressGesture` / `UILongPressGestureRecognizer` | `Modifier.combinedClickable` / `OnLongClickListener` | `onContextMenu` / `pointerdown` + timer |
|
|
394
|
+
| Pinch | `MagnifyGesture` / `UIPinchGestureRecognizer` | `detectTransformGestures` / `ScaleGestureDetector` | `wheel` event / `touch` iki parmak |
|
|
395
|
+
| Pull-to-refresh | `refreshable` / `UIRefreshControl` | `pullRefresh` / `SwipeRefreshLayout` | Custom scroll listener |
|
|
396
|
+
| Drag & drop | `draggable` / `UIDragInteraction` | `Modifier.dragAndDropSource` / `DragShadowBuilder` | HTML5 Drag API / `onDragStart` |
|
|
397
|
+
|
|
398
|
+
Gesture implementasyonunda erişilebilirlik alternatiflerini unutma (bkz. figma-a11y-audit 7a)
|
|
399
|
+
4. **Naming tutarlılığı** — Token isimleri platformlar arası eşleşmeli:
|
|
400
|
+
- Figma: `color/primary/500`
|
|
401
|
+
- iOS: `Color.primary500` veya `Asset Catalog: primary-500`
|
|
402
|
+
- Android: `@color/primary_500` veya `AppColors.Primary500`
|
|
403
|
+
- Web: `--color-primary-500` veya `colors.primary.500`
|
|
404
|
+
|
|
405
|
+
## Examples
|
|
406
|
+
|
|
407
|
+
### Örnek 1: Button — 3 Platform
|
|
408
|
+
|
|
409
|
+
Kullanıcı: "Bu butonu iOS, Android ve Web için implement et, nodeId: 42:15"
|
|
410
|
+
|
|
411
|
+
**Akış:**
|
|
412
|
+
|
|
413
|
+
1. `figma_get_status()` → bağlı
|
|
414
|
+
2. `figma_get_design_context(nodeId="42:15", ...)` → Button, variant: primary/secondary, padding: 16x24, radius: 8, font: Inter 14/600
|
|
415
|
+
3. `figma_capture_screenshot(nodeId="42:15")`
|
|
416
|
+
4. `figma_get_variables(verbosity="full")` → primary=#2563eb, radius-md=8
|
|
417
|
+
5. Sırayla 3 platform çıktısı üret:
|
|
418
|
+
- **iOS (SwiftUI):** `ButtonComponent.swift` — `Color("primary")`, `.cornerRadius(8)`, `.font(.system(size: 14, weight: .semibold))`
|
|
419
|
+
- **Android (Compose):** `ButtonComponent.kt` — `Color(0xFF2563EB)`, `RoundedCornerShape(8.dp)`, `fontSize = 14.sp`
|
|
420
|
+
- **Web (React):** `Button.tsx` — `var(--color-primary)`, `border-radius: 8px`, `font-size: 14px`
|
|
421
|
+
6. `figma_check_design_parity(...)` → doğrulama
|
|
422
|
+
|
|
423
|
+
### Örnek 2: Legacy Web Desteğiyle Ekran
|
|
424
|
+
|
|
425
|
+
Kullanıcı: "Bu login ekranını Bootstrap 4 ile implement et, nodeId: 10:5"
|
|
426
|
+
|
|
427
|
+
**Akış:**
|
|
428
|
+
|
|
429
|
+
1. Design context + screenshot al
|
|
430
|
+
2. Auto Layout → Bootstrap grid (`row`, `col-md-6`)
|
|
431
|
+
3. Figma spacing → Bootstrap spacing utilities (`p-3`, `mt-4`)
|
|
432
|
+
4. Figma renkler → Bootstrap variables veya custom CSS
|
|
433
|
+
5. jQuery form validation pattern'ı kullan
|
|
434
|
+
6. IE11 flexbox fallback'leri ekle
|
|
435
|
+
|
|
436
|
+
## Common Issues and Solutions
|
|
437
|
+
|
|
438
|
+
### Sorun: Auto Layout → platform-native layout eşleşmiyor
|
|
439
|
+
|
|
440
|
+
**Çözüm:** Auto Layout'un axis, spacing, padding değerlerini al; her platform için native eşdeğerini kullan. Web'de `outputHint="react"` kullandıysan `layoutSummary` alanını referans al. iOS/Android'de `includeLayout=true` ile gelen raw layout verisinden `layoutMode`, `itemSpacing`, `paddingLeft/Right/Top/Bottom` alanlarını oku.
|
|
441
|
+
|
|
442
|
+
### Sorun: Büyük dosyada design context çok büyük
|
|
443
|
+
|
|
444
|
+
**Çözüm:** `depth=1` kullan, child node ID'lerini belirle, her birini ayrı `figma_get_design_context` çağrısıyla çek. `verbosity="summary"` ile başlayıp detay gerektikçe `"full"` kullan.
|
|
445
|
+
|
|
446
|
+
### Sorun: `figma_search_components` timeout veriyor
|
|
447
|
+
|
|
448
|
+
**Çözüm:** Varsayılan `currentPageOnly=true`; büyük dosyalarda `currentPageOnly=false` timeout'a neden olabilir. Önce `currentPageOnly=true` ile dene; sonuç yoksa dikkatli şekilde `false` kullan.
|
|
449
|
+
|
|
450
|
+
### Sorun: Font Figma'da custom, platformda yok
|
|
451
|
+
|
|
452
|
+
**Çözüm:** Custom font'u platforma ekle (iOS: Info.plist + bundle, Android: res/font, Web: @font-face). Font yoksa en yakın system font'u öner ve kullanıcıya bildir.
|
|
453
|
+
|
|
454
|
+
### Sorun: Platform-spesifik component karşılığı yok
|
|
455
|
+
|
|
456
|
+
**Çözüm:** Figma component'i platform-native parçalara böl. Örneğin Figma'da tek bir "SegmentedControl", iOS'ta `Picker`, Android'de `TabLayout`, Web'de custom component olabilir.
|
|
457
|
+
|
|
458
|
+
### Sorun: Legacy altyapıda modern Figma tasarımı implement edilemiyor
|
|
459
|
+
|
|
460
|
+
**Çözüm:** Progressive enhancement uygula. Temel görünüm legacy CSS ile, gelişmiş özellikler (animasyon, blur, gradient) modern browser'lar için ekle.
|
|
461
|
+
|
|
462
|
+
## Marka Profili Entegrasyonu
|
|
463
|
+
|
|
464
|
+
`.fmcp-brand-profile.json` varsa:
|
|
465
|
+
- `targetPlatforms` → Hedef platform listesi otomatik belirlenir (kullanıcıya sorma)
|
|
466
|
+
- `typography` → Font seçim kararları referans alınır
|
|
467
|
+
|
|
468
|
+
## Evolution Triggers
|
|
469
|
+
|
|
470
|
+
- Bridge'e yeni design context parametreleri eklendiğinde Step 4 güncellenmeli
|
|
471
|
+
- `figma_get_component_image` formatları genişletilirse asset indirme adımı güncellenmeli
|
|
472
|
+
- Yeni platform desteği (Flutter, .NET MAUI, Kotlin Multiplatform) eklenirse platform çevirme bölümleri genişletilmeli
|
|
473
|
+
- `outputHint` iOS/Android desteği eklenir eklenirse ilgili not kaldırılmalı
|