{"id":"l-fig-3-5","courseId":"figma-ui-design","lang":"ar","kind":"lesson","summary":"اجمع مجموعة Steady المصغّرة في مكتبة موثّقة قابلة للنشر، فيها الأساسيات والـ components والأوصاف وقائمة فحص للجودة يجب أن يجتازها كل component.","html":"<p>المجموعة الموجودة في رأسك فقط ليست مجموعة. اختبار صوفيا بسيط: سلّم الملف لمصمّم لم يرَ Steady من قبل، واطلب منه بناء شاشة Settings، وراقب. إذا سأل «أيّ زر أستخدم؟» أو «هل هذا هو التركوازي الحقيقي؟»، فقد فشلت المجموعة، مهما كانت الـ components مصقولة.</p>\n<p>هذا الدرس يحوّل القطع من الدروس 3.1 إلى 3.4 إلى شيء يجتاز ذلك الاختبار.</p>\n<h2 id=\"sec-1\" tabindex=\"-1\">ما الذي يدخل في مجموعة Steady</h2>\n<p>ابدأ من الشاشات، لا من قائمة components لدى تطبيقات أخرى. تصفّح شاشات Today وHabit detail وNew habit، وسجّل كل عنصر يظهر أكثر من مرة أو له حالات. هذا الجرد هو المجموعة:</p>\n<div class=\"table-wrap\" role=\"region\" aria-label=\"جدول قابل للتمرير\" tabindex=\"0\"><table><thead>\n<tr>\n<th>الـ Component</th>\n<th>الـ Variant properties</th>\n<th>خصائص أخرى</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Button</td>\n<td>Type، State، Size</td>\n<td>Label (text)، Show icon (boolean)، Icon (instance swap)</td>\n</tr>\n<tr>\n<td>Check button</td>\n<td>State: To do، Done، Missed</td>\n<td>لا يوجد</td>\n</tr>\n<tr>\n<td>Habit icon</td>\n<td>لا يوجد</td>\n<td>Glyph (instance swap)</td>\n</tr>\n<tr>\n<td>Habit row</td>\n<td>State: To do، Done، Missed</td>\n<td>Name (text)، Show streak (boolean)، Icon (instance swap)</td>\n</tr>\n<tr>\n<td>Chip</td>\n<td>Selected: true، false</td>\n<td>Label (text)</td>\n</tr>\n<tr>\n<td>Text field</td>\n<td>State: Default، Focused، Error، Disabled</td>\n<td>Label، Hint (text)</td>\n</tr>\n<tr>\n<td>Tab bar</td>\n<td>Active: Today، Stats، Settings</td>\n<td>لا يوجد</td>\n</tr>\n</tbody>\n</table></div><p>سبعة components تغطّي الشاشات الثلاث. قاوم إضافة المزيد حتى تحتاجه شاشة. فكل component تضيفه يجب إبقاؤه متزامنًا مع الـ variables والـ modes والتسمية إلى الأبد.</p>\n<h2 id=\"sec-2\" tabindex=\"-1\">هيكلة الملف</h2>\n<p>ضع المجموعة في ملف مستقل، <code dir=\"ltr\">Steady Kit</code>، فيه بضع صفحات:</p>\n<ul>\n<li><strong>Cover</strong>: اسم المجموعة، ومسؤول عنها، وحالتها (“In progress” أو “Stable”)، وتاريخ آخر نشر.</li>\n<li><strong>Foundations</strong>: عيّنات لكل لون دلالي في الوضعين الفاتح والداكن، وسلّم أحجام الخط، وسلّما المسافات ونصف قطر الزوايا. هذه توثيق بصري للـ variables، فيرى الناس النظام بنظرة واحدة.</li>\n<li><strong>Components</strong>: ‏section لكل component، يضمّ الـ component set، وبضع instances كأمثلة في استخدام واقعي، وملاحظات استخدام قصيرة بنص عادي (“Use Ghost buttons for low-priority actions next to a Primary”).</li>\n<li><strong>Playground</strong>: مساحة تجارب يجرّب فيها الناس الـ instances دون لمس الـ components.</li>\n</ul>\n<p>ويحصل كل component أيضًا على <strong>وصف</strong> في لوحة خصائصه: جملة أو جملتان عن متى يُستخدم، مع رابط إلى توثيق أكمل إن وُجد. يظهر الوصف حين يمرّر الناس المؤشّر فوق الـ component في لوحة Assets، وحين يفحصه المطوّرون في Dev Mode، فيرافق الـ component أينما ذهب.</p>\n<h2 id=\"sec-3\" tabindex=\"-1\">قائمة فحص الـ component</h2>\n<p>قبل أن يُعتبر أي component منتهيًا، يجتاز الفحوص نفسها. كتابتها هي ما يحوّل الذوق الشخصي إلى معيار للفريق:</p>\n<div class=\"code-block\" dir=\"ltr\" data-lang=\"text\" data-index=\"0\"><div class=\"code-head\"><span class=\"code-title\">Text</span><span class=\"code-actions\"><button type=\"button\" class=\"code-btn\" data-action=\"copy\" aria-label=\"نسخ الكود\"><svg class=\"icon \" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><rect width=\"14\" height=\"14\" x=\"8\" y=\"8\" rx=\"2\" ry=\"2\"/><path d=\"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2\"/></svg><span>نسخ</span></button></span></div><pre class=\"shiki\" tabindex=\"0\"><code>[ ] Built with auto layout; no hand-placed children\n[ ] Every color, spacing and radius bound to a semantic variable\n[ ] All states designed: default, pressed, focused, disabled (and error for inputs)\n[ ] Checked in Light and Dark modes, contrast re-measured in both\n[ ] Tested with extreme content: long label, empty value, larger text\n[ ] Resized to its minimum and maximum sensible widths\n[ ] Properties and values named by meaning, matching the code where possible\n[ ] Description written; usage example placed on the Components page</code></pre></div>\n<p>في خطتي Organization وEnterprise، وقت كتابة هذا الدرس، تستطيع ميزة <strong>Check designs</strong> في Figma فحص تحديد ما بحثًا عن قيم مكتوبة يدويًا يجب أن تكون variables، واقتراح بدائل من المكتبة. وفي الخطط الأخرى، حدّد component واقرأ التعبئات وقيم الـ gap والـ padding في الشريط الجانبي الأيمن: رمز hex خام أو رقم غير مرتبط يلفت النظر فورًا.</p>\n<aside class=\"callout callout-mistake\" role=\"note\"><p class=\"callout-title\"><svg class=\"icon \" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"m21.73 18-8-14a2 2 0 0 0-3.48 0l-8 14A2 2 0 0 0 4 21h16a2 2 0 0 0 1.73-3\"/><path d=\"M12 9v4\"/><path d=\"M12 17h.01\"/></svg><span><span class=\"callout-kind\">خطأ شائع</span><span class=\"callout-sep\" aria-hidden=\"true\"> · </span>أسماء تنحرف</span></p>\n<p><code dir=\"ltr\">Primary button</code>، و<code dir=\"ltr\">btn/secondary</code>، وخاصية اسمها <code dir=\"ltr\">state</code> بقيمتين <code dir=\"ltr\">on</code> و<code dir=\"ltr\">Disabled</code>: كلٌّ منها مقبول وحده، لكنها مجتمعةً مثيرة للجنون. اختر اصطلاحًا، مثل Title Case للـ components والخصائص والقيم، وأصلح التناقضات قبل النشر، لأن إعادة التسمية لاحقًا تكسر كل مرجع اعتاده الناس.</p>\n</aside>\n<h2 id=\"sec-4\" tabindex=\"-1\">نشر المكتبة</h2>\n<p>النشر يجعل الـ components والـ styles والـ variables في المجموعة متاحة للملفات الأخرى في فريقك أو مؤسستك. وقت كتابة هذا الدرس، تنشر من خيارات المكتبة في لوحة Assets، والمكتبات تتطلّب خطة مدفوعة أو خطة Education. كل نشر يطلب وصفًا للتغييرات. اكتبه للشخص الذي سيتلقّاه: “Habit row padding is now 12/16 to match the 8-point scale; no action needed” أفضل من “updates”.</p>\n<figure class=\"diagram\"><svg class=\"diagram-svg\" focusable=\"false\" viewBox=\"0 0 680 220\" role=\"img\" aria-labelledby=\"l-fig-3-5-t1\"><defs><marker id=\"arrow-l-fig-3-5-1\" viewBox=\"0 0 10 10\" refX=\"9\" refY=\"5\" markerWidth=\"7\" markerHeight=\"7\" orient=\"auto-start-reverse\"><path d=\"M0 0 L10 5 L0 10 z\" class=\"d-arrowhead\"/></marker></defs>\n  <title id=\"l-fig-3-5-t1\">ملف Steady Kit ينشر إلى مكتبة الفريق. ملفان مشتركان، Steady Screens وSteady Marketing، يتلقّيان إشعارًا بالتحديث ويقبلانه كلٌّ حسب جدوله.</title>\n  <rect class=\"d-box-primary\" x=\"20\" y=\"80\" width=\"160\" height=\"60\" rx=\"12\"/>\n  <text class=\"d-label-strong\" x=\"100\" y=\"106\" text-anchor=\"middle\">Steady Kit</text>\n  <text class=\"d-label-muted\" x=\"100\" y=\"126\" text-anchor=\"middle\">main components</text>\n  <path class=\"d-arrow\" d=\"M182 110 L258 110\" marker-end=\"url(#arrow-l-fig-3-5-1)\"/>\n  <text class=\"d-label-muted\" x=\"220\" y=\"100\" text-anchor=\"middle\">نشر</text>\n  <rect class=\"d-box\" x=\"260\" y=\"80\" width=\"150\" height=\"60\" rx=\"12\"/>\n  <text class=\"d-label\" x=\"335\" y=\"115\" text-anchor=\"middle\">مكتبة الفريق</text>\n  <path class=\"d-arrow\" d=\"M412 100 L488 50\" marker-end=\"url(#arrow-l-fig-3-5-1)\"/>\n  <path class=\"d-arrow\" d=\"M412 120 L488 170\" marker-end=\"url(#arrow-l-fig-3-5-1)\"/>\n  <rect class=\"d-box-accent\" x=\"490\" y=\"22\" width=\"170\" height=\"56\" rx=\"12\"/>\n  <text class=\"d-label\" x=\"575\" y=\"46\" text-anchor=\"middle\">Steady Screens</text>\n  <text class=\"d-label-muted\" x=\"575\" y=\"66\" text-anchor=\"middle\">يراجع ويقبل</text>\n  <rect class=\"d-box-accent\" x=\"490\" y=\"142\" width=\"170\" height=\"56\" rx=\"12\"/>\n  <text class=\"d-label\" x=\"575\" y=\"166\" text-anchor=\"middle\">Steady Marketing</text>\n  <text class=\"d-label-muted\" x=\"575\" y=\"186\" text-anchor=\"middle\">يقبل لاحقًا</text>\n</svg><figcaption>المكتبة تنشر التغييرات؛ والملفات المشتركة تراجعها وتقبلها</figcaption></figure>\n<p>الملفات التي تستخدم المكتبة ترى أن هناك تحديثات متاحة وتقبلها حين تكون جاهزة، فلا يصل أي تغيير في المجموعة بصمت في منتصف عمل أحدهم. ولهذا أيضًا تستحقّ التغييرات الكاسرة (breaking changes)، مثل إعادة تسمية خاصية، تحذيرًا واضحًا في ملاحظات النشر.</p>\n<aside class=\"callout callout-tip\" role=\"note\"><p class=\"callout-title\"><svg class=\"icon \" viewBox=\"0 0 24 24\" fill=\"none\" stroke=\"currentColor\" stroke-width=\"2\" stroke-linecap=\"round\" stroke-linejoin=\"round\" aria-hidden=\"true\" focusable=\"false\"><path d=\"M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5\"/><path d=\"M9 18h6\"/><path d=\"M10 22h4\"/></svg><span><span class=\"callout-kind\">نصيحة</span><span class=\"callout-sep\" aria-hidden=\"true\"> · </span>أدِر نسخ المجموعة كما تُدار نسخ البرمجيات</span></p>\n<p>احتفظ بسجلّ تغييرات (changelog) قصير في صفحة Cover: التاريخ، وما الذي تغيّر، وهل يحتاج أحد إلى فعل شيء. حين يسأل مطوّر «منذ متى صار للـ chip حدّ أدنى للعرض؟»، تستغرق الإجابة عشر ثوانٍ.</p>\n</aside>\n<p>اكتمل القسم 3: لدى Steady مجموعة صغيرة موثّقة بثيمات. القسم 4 يجعلها تتحرّك بالـ prototype، ويتأكّد من أن الجميع يستطيع استخدامها، ويضعها في أيدي المطوّرين.</p>\n","toc":[{"id":"sec-1","text":"ما الذي يدخل في مجموعة Steady","level":2},{"id":"sec-2","text":"هيكلة الملف","level":2},{"id":"sec-3","text":"قائمة فحص الـ component","level":2},{"id":"sec-4","text":"نشر المكتبة","level":2}],"takeaways":["تكون المجموعة (kit) مفيدة حين يستطيع شخص آخر أن يجد الـ component ويفهمه ويستخدمه دون أن يسألك، لذا تهمّ البنية والتوثيق بقدر ما تهمّ الـ components نفسها.","ابنِ المجموعة من الأنماط التي تتكرّر فعلًا في الشاشات، ولا تضف component إلا حين تحتاجه شاشة حقيقية.","يجب أن يجتاز كل component قائمة الفحص نفسها، التي تغطّي الـ Auto layout والـ variables والحالات والوضعين الفاتح والداكن والمحتوى المتطرّف والوصف.","نشر المكتبة يتيح للملفات الأخرى استخدام المجموعة، ويجب أن يشرح كل نشر ما الذي تغيّر ليستطيع المشتركون مراجعة التحديثات.","الأسماء واجهة استخدام؛ اختر اصطلاحًا واحدًا لتسمية الـ components والخصائص والقيم واستخدمه في كل مكان."],"further":[{"title":"Lesson 3, Build your design system (Figma)","url":"https://help.figma.com/hc/en-us/articles/14548865734679-Lesson-3-Build-your-design-system"},{"title":"Guide to libraries in Figma","url":"https://help.figma.com/hc/en-us/articles/360041051154-Guide-to-libraries-in-Figma"},{"title":"Check designs in Figma","url":"https://help.figma.com/hc/en-us/articles/39592284074263-Check-designs-in-Figma"}],"quiz":[{"q":"<p>يقترح مصمّم بناء Carousel وData table وDate range picker لمجموعة Steady «لنكون مستعدّين». لا تستخدمها أي شاشة في Steady. ماذا يجب أن تقول صوفيا؟</p>","options":[{"text":"ابنِها الآن، لأن إضافة الـ components لاحقًا مكلفة.","why":"الـ components المبنية دون استخدام حقيقي تكون غالبًا خاطئة حين يأتي الاستخدام الحقيقي، وتحتاج صيانة في الأثناء."},{"text":"ابنِها لكن أخفِها من المكتبة.","why":"مخفية أو لا، فهي تكلّف وقتًا لصنعها وإبقائها متزامنة مع الـ variables والـ modes."},{"text":"انتظر حتى تحتاجها شاشة، ثم ابنِها من ذلك الاستخدام الحقيقي.","why":"صحيح. المجموعة تنمو من الأنماط المتكرّرة في الشاشات الحقيقية، وهذا يُبقيها صغيرة ويجعل لكل component مبرّرًا."},{"text":"انسخها من مجموعة في Figma Community لتوفير الوقت.","why":"الـ components المستعارة تجلب tokens شخص آخر وأسماءه وافتراضاته، فنادرًا ما تناسب دون إعادة عمل."}],"answer":2},{"q":"<p>تنشر تحديثًا لمجموعة Steady يغيّر الـ padding في صف العادة. ماذا يحدث في ملف شاشات يستخدم المكتبة؟</p>","options":[{"text":"تتغيّر الـ instances في ذلك الملف فورًا دون أي إشعار.","why":"تحديثات المكتبة تُعرض على الملفات المشتركة للمراجعة، ولا تُطبَّق بصمت."},{"text":"يتلقّى الملف إشعارًا بوجود تحديثات، ويراجعها أحدهم ويقبلها.","why":"صحيح. يرى المشتركون أن هناك تحديثات متاحة ويختارون متى يقبلونها، ولهذا تهمّ ملاحظات النشر."},{"text":"لا شيء، لأن الـ instances القادمة من المكتبات لا تتحدّث أبدًا.","why":"تتحدّث فعلًا بمجرّد أن يقبل الملف تحديث المكتبة. هذا هو الهدف من المكتبة أصلًا."},{"text":"يُكرَّر ملف الشاشات للاحتفاظ بالنسخة القديمة.","why":"لا يكرّر Figma الملفات عند تحديثات المكتبة. سجلّ النسخ (version history) يغطّي التراجع."}],"answer":1},{"q":"<p>أيّ بند ينتمي إلى قائمة فحص الـ components في Steady لأنه يلتقط أكبر عدد من الأخطاء قبل التسليم؟</p>","options":[{"text":"الـ component يبدو جيدًا بحجمه الافتراضي في الوضع الفاتح.","why":"هناك صُمّم أصلًا، فهو ينجح في الغالب. الأخطاء تكمن عند الأطراف."},{"text":"للـ component ظلّ.","why":"الظلال اختيار جمالي، لا فحص جودة."},{"text":"الـ component يستخدم أحدث ميزة متاحة في Figma.","why":"الميزات الأحدث ليست تلقائيًا أفضل لمن يستخدمون المجموعة."},{"text":"الـ component اختُبر بمحتوى متطرّف، وفي الوضعين الفاتح والداكن، وبأضيق عرض وأعرضه.","why":"صحيح. التسميات الطويلة والوضع الداكن وتغيير الحجم هي حيث تنكسر الـ components، لذا تفرض القائمة هذه الاختبارات."}],"answer":3}],"exercise":{"kind":"spot-bug","language":"text","code":"Components page\n  Section: Buttons\n    Button               component set   Type: Primary | Secondary | Ghost\n                                         State: Default | Pressed | Disabled\n                                         Label: text   Show icon: boolean   Icon: instance swap\n    Button 2             component       copy of Button/Primary with an icon\n  Section: Controls\n    Check button         component set   State: To do | Done | Missed\n    Chip                 component set   Selected: true | false   Label: text\n    Toggle               component set   State: Teal | Grey\n  Section: Rows\n    Habit row            component set   State: To do | Done | Missed\n                                         Name: text   Show streak: boolean\n      Row background     fill: #FFFFFF\n    Text field           component set   State: Default | Focused | Error | Disabled","bugLines":[6,10,14],"title":"دقّق المجموعة قبل النشر","prompt":"<p>قبل أول نشر لـ Steady Kit، تطلب منك صوفيا تدقيق صفحة Components. ها هي مكتوبة كنص. افحصها مقابل قائمة فحص الـ component من الدرس، مع التركيز على التكرار والتسمية والـ variables (فالحالات لها مراجعة خاصة في الدرس 4.2)، وحدّد كل سطر يجب أن يوقف النشر.</p>\n","hints":["ابحث عن أي شيء يكرّر component موجودًا بدل أن يستخدم خصائصه.","تحقّق من أن القيم مسمّاة حسب المعنى، وأن الألوان تأتي من الـ variables.","ثلاثة أسطر: main component شبه مكرّر، وقيم مسمّاة حسب المظهر، وتعبئة مكتوبة يدويًا."],"explanation":"<p>السطر 6: ‏<code dir=\"ltr\">Button 2</code> هو main component ثانٍ يكرّر Button مع أيقونة. لدى Button بالفعل boolean باسم <strong>Show icon</strong> وinstance swap باسم <strong>Icon</strong>، فاحذف النسخة واستخدم الخاصية؛ وإلا فسيجب إجراء كل إصلاح مرّتين. السطر 10: قيمتا Toggle ‏<code dir=\"ltr\">Teal | Grey</code> تصفان <strong>المظهر</strong>؛ وفي الوضع الداكن أو بعد تغيير الهوية البصرية تصبحان مضلّلتين. استخدم <code dir=\"ltr\">On | Off</code>. السطر 14: خلفية الصف لها تعبئة <strong>مكتوبة يدويًا</strong> <code dir=\"ltr\">#FFFFFF</code>، فستبقى بيضاء في الوضع الداكن. اربطها بـ <code dir=\"ltr\">color/surface/default</code>.</p>\n","checkLabels":{}},"words":632,"readMinutes":4}