بنقرة واحدة
react-component-library-usage
Guidelines for using the Commonplace Design System in React components
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
القائمة
Guidelines for using the Commonplace Design System in React components
التثبيت باستخدام Codex أو Claude انسخ هذا Prompt والصقه في Codex أو Claude أو مساعد آخر ليراجع صفحة Skill ويثبّتها لك.
استنادا إلى تصنيف SOC المهني
Advanced Jest test modes in the Commons monorepo — /local/ tests, watch mode, live console output, multi-file batching, and test-failure troubleshooting. For routine "run the test for this file" resolution, call the nx-project-for-file tool instead.
Use Graphite CLI (gt) for stacked PRs and branch management. Use when creating branches, committing changes, submitting PRs, syncing with trunk, or managing stacked pull requests.
Investigate data-integrity / "why does this data look wrong" questions in the Commons codebase (mismatched IDs, orphaned rows, cross-entity divergence, unexpected duplicates, values that don't agree across tables). Use when a ticket or user asks WHY a piece of data is in a surprising state and you must trace it to a root cause through code + production data. Pairs with the commons-sql-query skill for the SQL itself.
Advanced lint/format modes in the Commons monorepo — git-affected linting across a stack, auto-fix, and the full-CI lint pipeline. For routine "lint this file's project" resolution, call the nx-project-for-file tool instead.
Build administrative CRUD interfaces in the Commons admin panel following established patterns for list, create, and edit views.
Create job files in the Commons monorepo. Use when the user wants to create a new job, backfill script, cache job, export job, sync job, bulk operation, cron task, or any background task that runs via HTTP POST endpoint.
| name | react-component-library-usage |
| description | Guidelines for using the Commonplace Design System in React components |
This project uses the Commonplace Design System, Cityblock's comprehensive library of consistent, accessible, and well-tested components.
commons-packages/commonplace/@cityblock/commonplacecommonplace.ts and associated .stories.tsx files// Good - Using Commonplace components with slots
import { Card, VerticalStack, Text, Row, Tag, Button } from '$commons/app/shared/commonplace';
<Card
title="Patient information"
actions={<Button text="Edit" />}
leftContent={<Tag text="Active" />}
titleRowContent={<Tag text="High priority" />}
>
<VerticalStack gap="medium">
<Text element="p" text="Patient details content" />
<Text element="p" text="Event description" />
</VerticalStack>
</Card>
// Avoid - Custom styling, custom classes
<div style={{ padding: '16px', backgroundColor: '#f5f5f5' }}>
<h2 style={{ fontSize: '18px' }}>Title</h2>
<p class="mt-6">Content</p>
</div>
Only add custom CSS if the Commonplace component doesn't provide a prop to achieve the desired styling. Use existing CSS variables instead of custom px, em, rem, or hex values. For example:
// component.tsx
import { Text } from '$commons/app/shared/commonplace';
import styles from './css/component.css'
<Text element="p" text="Item details" className={styles.details} />
// component.css
.details {
color: var(--color-text-light);
font-size: var(--font-size-body-sm);
line-height: var(--line-height-body-sm);
}