mcp-probe-kit 3.0.14 → 3.0.16
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/README.md +17 -11
- package/build/lib/__tests__/gitnexus-bridge.unit.test.js +9 -1
- package/build/lib/gitnexus-bridge.d.ts +1 -0
- package/build/lib/gitnexus-bridge.js +29 -1
- package/build/lib/skill-bridge.d.ts +31 -0
- package/build/lib/skill-bridge.js +100 -0
- package/build/resources/ui-ux-data/charts.json +302 -0
- package/build/resources/ui-ux-data/colors.json +1058 -0
- package/build/resources/ui-ux-data/icons.json +1102 -0
- package/build/resources/ui-ux-data/landing.json +262 -0
- package/build/resources/ui-ux-data/metadata.json +6 -0
- package/build/resources/ui-ux-data/products.json +1058 -0
- package/build/resources/ui-ux-data/react-performance.json +574 -0
- package/build/resources/ui-ux-data/stacks/astro.json +266 -0
- package/build/resources/ui-ux-data/stacks/flutter.json +626 -0
- package/build/resources/ui-ux-data/stacks/html-tailwind.json +662 -0
- package/build/resources/ui-ux-data/stacks/jetpack-compose.json +626 -0
- package/build/resources/ui-ux-data/stacks/nextjs.json +218 -0
- package/build/resources/ui-ux-data/stacks/nuxt-ui.json +14 -0
- package/build/resources/ui-ux-data/stacks/nuxtjs.json +182 -0
- package/build/resources/ui-ux-data/stacks/react-native.json +350 -0
- package/build/resources/ui-ux-data/stacks/react.json +530 -0
- package/build/resources/ui-ux-data/stacks/shadcn.json +566 -0
- package/build/resources/ui-ux-data/stacks/svelte.json +134 -0
- package/build/resources/ui-ux-data/stacks/swiftui.json +26 -0
- package/build/resources/ui-ux-data/stacks/vue.json +170 -0
- package/build/resources/ui-ux-data/styles.json +1610 -0
- package/build/resources/ui-ux-data/typography.json +743 -0
- package/build/resources/ui-ux-data/ui-reasoning.json +1431 -0
- package/build/resources/ui-ux-data/ux-guidelines.json +1190 -0
- package/build/resources/ui-ux-data/web-interface.json +389 -0
- package/build/schemas/ui-ux-schemas.js +1 -1
- package/build/tools/start_product.js +8 -1
- package/build/tools/start_ui.js +14 -3
- package/build/tools/ui-ux-tools.js +21 -17
- package/build/utils/ui-data-loader.d.ts +18 -2
- package/build/utils/ui-data-loader.js +74 -12
- package/docs/i18n/en.json +4 -2
- package/docs/i18n/ja.json +4 -2
- package/docs/i18n/ko.json +4 -2
- package/docs/i18n/zh-CN.json +4 -2
- package/docs/pages/getting-started.html +3 -0
- package/package.json +2 -1
|
@@ -0,0 +1,566 @@
|
|
|
1
|
+
[
|
|
2
|
+
{
|
|
3
|
+
"No": "1",
|
|
4
|
+
"Category": "Setup",
|
|
5
|
+
"Guideline": "Use CLI for installation",
|
|
6
|
+
"Description": "Install components via shadcn CLI for proper setup",
|
|
7
|
+
"Do": "npx shadcn@latest add component-name",
|
|
8
|
+
"Don't": "Manual copy-paste from docs",
|
|
9
|
+
"Code Good": "npx shadcn@latest add button",
|
|
10
|
+
"Code Bad": "Copy component code manually",
|
|
11
|
+
"Severity": "High",
|
|
12
|
+
"Docs URL": "https://ui.shadcn.com/docs/cli"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"No": "2",
|
|
16
|
+
"Category": "Setup",
|
|
17
|
+
"Guideline": "Initialize project properly",
|
|
18
|
+
"Description": "Run init command to set up components.json and globals.css",
|
|
19
|
+
"Do": "npx shadcn@latest init before adding components",
|
|
20
|
+
"Don't": "Skip init and add components directly",
|
|
21
|
+
"Code Good": "npx shadcn@latest init",
|
|
22
|
+
"Code Bad": "npx shadcn@latest add button (without init)",
|
|
23
|
+
"Severity": "High",
|
|
24
|
+
"Docs URL": "https://ui.shadcn.com/docs/installation"
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"No": "3",
|
|
28
|
+
"Category": "Setup",
|
|
29
|
+
"Guideline": "Configure path aliases",
|
|
30
|
+
"Description": "Set up proper import aliases in tsconfig and components.json",
|
|
31
|
+
"Do": "Use @/components/ui path aliases",
|
|
32
|
+
"Don't": "Relative imports like ../../components",
|
|
33
|
+
"Code Good": "import { Button } from \"@/components/ui/button\"",
|
|
34
|
+
"Code Bad": "import { Button } from \"../../components/ui/button\"",
|
|
35
|
+
"Severity": "Medium",
|
|
36
|
+
"Docs URL": "https://ui.shadcn.com/docs/installation"
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"No": "4",
|
|
40
|
+
"Category": "Theming",
|
|
41
|
+
"Guideline": "Use CSS variables for colors",
|
|
42
|
+
"Description": "Define colors as CSS variables in globals.css for theming",
|
|
43
|
+
"Do": "CSS variables in :root and .dark",
|
|
44
|
+
"Don't": "Hardcoded color values in components",
|
|
45
|
+
"Code Good": "bg-primary text-primary-foreground",
|
|
46
|
+
"Code Bad": "bg-blue-500 text-white",
|
|
47
|
+
"Severity": "High",
|
|
48
|
+
"Docs URL": "https://ui.shadcn.com/docs/theming"
|
|
49
|
+
},
|
|
50
|
+
{
|
|
51
|
+
"No": "5",
|
|
52
|
+
"Category": "Theming",
|
|
53
|
+
"Guideline": "Follow naming convention",
|
|
54
|
+
"Description": "Use semantic color names with foreground pattern",
|
|
55
|
+
"Do": "primary/primary-foreground secondary/secondary-foreground",
|
|
56
|
+
"Don't": "Generic color names",
|
|
57
|
+
"Code Good": "--primary --primary-foreground",
|
|
58
|
+
"Code Bad": "--blue --light-blue",
|
|
59
|
+
"Severity": "Medium",
|
|
60
|
+
"Docs URL": "https://ui.shadcn.com/docs/theming"
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
"No": "6",
|
|
64
|
+
"Category": "Theming",
|
|
65
|
+
"Guideline": "Support dark mode",
|
|
66
|
+
"Description": "Include .dark class styles for all custom CSS",
|
|
67
|
+
"Do": "Define both :root and .dark color schemes",
|
|
68
|
+
"Don't": "Only light mode colors",
|
|
69
|
+
"Code Good": ".dark { --background: 240 10% 3.9%; }",
|
|
70
|
+
"Code Bad": "No .dark class styles",
|
|
71
|
+
"Severity": "High",
|
|
72
|
+
"Docs URL": "https://ui.shadcn.com/docs/dark-mode"
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"No": "7",
|
|
76
|
+
"Category": "Components",
|
|
77
|
+
"Guideline": "Use component variants",
|
|
78
|
+
"Description": "Leverage cva variants for consistent styling",
|
|
79
|
+
"Do": "Use variant prop for different styles",
|
|
80
|
+
"Don't": "Inline conditional classes",
|
|
81
|
+
"Code Good": "<Button variant=\"destructive\">",
|
|
82
|
+
"Code Bad": "<Button className={isError ? \"bg-red-500\" : \"bg-blue-500\"}>",
|
|
83
|
+
"Severity": "Medium",
|
|
84
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/button"
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"No": "8",
|
|
88
|
+
"Category": "Components",
|
|
89
|
+
"Guideline": "Compose with className",
|
|
90
|
+
"Description": "Add custom classes via className prop for overrides",
|
|
91
|
+
"Do": "Extend with className for one-off customizations",
|
|
92
|
+
"Don't": "Modify component source directly",
|
|
93
|
+
"Code Good": "<Button className=\"w-full\">",
|
|
94
|
+
"Code Bad": "Edit button.tsx to add w-full",
|
|
95
|
+
"Severity": "Medium",
|
|
96
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/button"
|
|
97
|
+
},
|
|
98
|
+
{
|
|
99
|
+
"No": "9",
|
|
100
|
+
"Category": "Components",
|
|
101
|
+
"Guideline": "Use size variants consistently",
|
|
102
|
+
"Description": "Apply size prop for consistent sizing across components",
|
|
103
|
+
"Do": "size=\"sm\" size=\"lg\" for sizing",
|
|
104
|
+
"Don't": "Mix size classes inconsistently",
|
|
105
|
+
"Code Good": "<Button size=\"lg\">",
|
|
106
|
+
"Code Bad": "<Button className=\"text-lg px-8 py-4\">",
|
|
107
|
+
"Severity": "Medium",
|
|
108
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/button"
|
|
109
|
+
},
|
|
110
|
+
{
|
|
111
|
+
"No": "10",
|
|
112
|
+
"Category": "Components",
|
|
113
|
+
"Guideline": "Prefer compound components",
|
|
114
|
+
"Description": "Use provided sub-components for complex UI",
|
|
115
|
+
"Do": "Card + CardHeader + CardContent pattern",
|
|
116
|
+
"Don't": "Single component with many props",
|
|
117
|
+
"Code Good": "<Card><CardHeader><CardTitle>",
|
|
118
|
+
"Code Bad": "<Card title=\"x\" content=\"y\" footer=\"z\">",
|
|
119
|
+
"Severity": "Medium",
|
|
120
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/card"
|
|
121
|
+
},
|
|
122
|
+
{
|
|
123
|
+
"No": "11",
|
|
124
|
+
"Category": "Dialog",
|
|
125
|
+
"Guideline": "Use Dialog for modal content",
|
|
126
|
+
"Description": "Dialog component for overlay modal windows",
|
|
127
|
+
"Do": "Dialog for confirmations forms details",
|
|
128
|
+
"Don't": "Alert for modal content",
|
|
129
|
+
"Code Good": "<Dialog><DialogContent>",
|
|
130
|
+
"Code Bad": "<Alert> styled as modal",
|
|
131
|
+
"Severity": "High",
|
|
132
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/dialog"
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"No": "12",
|
|
136
|
+
"Category": "Dialog",
|
|
137
|
+
"Guideline": "Handle dialog state properly",
|
|
138
|
+
"Description": "Use open and onOpenChange for controlled dialogs",
|
|
139
|
+
"Do": "Controlled state with useState",
|
|
140
|
+
"Don't": "Uncontrolled with default open only",
|
|
141
|
+
"Code Good": "<Dialog open={open} onOpenChange={setOpen}>",
|
|
142
|
+
"Code Bad": "<Dialog defaultOpen={true}>",
|
|
143
|
+
"Severity": "Medium",
|
|
144
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/dialog"
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"No": "13",
|
|
148
|
+
"Category": "Dialog",
|
|
149
|
+
"Guideline": "Include proper dialog structure",
|
|
150
|
+
"Description": "Use DialogHeader DialogTitle DialogDescription",
|
|
151
|
+
"Do": "Complete semantic structure",
|
|
152
|
+
"Don't": "Missing title or description",
|
|
153
|
+
"Code Good": "<DialogHeader><DialogTitle><DialogDescription>",
|
|
154
|
+
"Code Bad": "<DialogContent><p>Content</p></DialogContent>",
|
|
155
|
+
"Severity": "High",
|
|
156
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/dialog"
|
|
157
|
+
},
|
|
158
|
+
{
|
|
159
|
+
"No": "14",
|
|
160
|
+
"Category": "Sheet",
|
|
161
|
+
"Guideline": "Use Sheet for side panels",
|
|
162
|
+
"Description": "Sheet component for slide-out panels and drawers",
|
|
163
|
+
"Do": "Sheet for navigation filters settings",
|
|
164
|
+
"Don't": "Dialog for side content",
|
|
165
|
+
"Code Good": "<Sheet side=\"right\">",
|
|
166
|
+
"Code Bad": "<Dialog> with slide animation",
|
|
167
|
+
"Severity": "Medium",
|
|
168
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/sheet"
|
|
169
|
+
},
|
|
170
|
+
{
|
|
171
|
+
"No": "15",
|
|
172
|
+
"Category": "Sheet",
|
|
173
|
+
"Guideline": "Specify sheet side",
|
|
174
|
+
"Description": "Set side prop for sheet slide direction",
|
|
175
|
+
"Do": "Explicit side=\"left\" or side=\"right\"",
|
|
176
|
+
"Don't": "Default side without consideration",
|
|
177
|
+
"Code Good": "<Sheet><SheetContent side=\"left\">",
|
|
178
|
+
"Code Bad": "<Sheet><SheetContent>",
|
|
179
|
+
"Severity": "Low",
|
|
180
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/sheet"
|
|
181
|
+
},
|
|
182
|
+
{
|
|
183
|
+
"No": "16",
|
|
184
|
+
"Category": "Form",
|
|
185
|
+
"Guideline": "Use Form with react-hook-form",
|
|
186
|
+
"Description": "Integrate Form component with react-hook-form for validation",
|
|
187
|
+
"Do": "useForm + Form + FormField pattern",
|
|
188
|
+
"Don't": "Custom form handling without Form",
|
|
189
|
+
"Code Good": "<Form {...form}><FormField control={form.control}>",
|
|
190
|
+
"Code Bad": "<form onSubmit={handleSubmit}>",
|
|
191
|
+
"Severity": "High",
|
|
192
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/form"
|
|
193
|
+
},
|
|
194
|
+
{
|
|
195
|
+
"No": "17",
|
|
196
|
+
"Category": "Form",
|
|
197
|
+
"Guideline": "Use FormField for inputs",
|
|
198
|
+
"Description": "Wrap inputs in FormField for proper labeling and errors",
|
|
199
|
+
"Do": "FormField + FormItem + FormLabel + FormControl",
|
|
200
|
+
"Don't": "Input without FormField wrapper",
|
|
201
|
+
"Code Good": "<FormField><FormItem><FormLabel><FormControl><Input>",
|
|
202
|
+
"Code Bad": "<Input onChange={...}>",
|
|
203
|
+
"Severity": "High",
|
|
204
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/form"
|
|
205
|
+
},
|
|
206
|
+
{
|
|
207
|
+
"No": "18",
|
|
208
|
+
"Category": "Form",
|
|
209
|
+
"Guideline": "Display form messages",
|
|
210
|
+
"Description": "Use FormMessage for validation error display",
|
|
211
|
+
"Do": "FormMessage after FormControl",
|
|
212
|
+
"Don't": "Custom error text without FormMessage",
|
|
213
|
+
"Code Good": "<FormControl><Input/></FormControl><FormMessage/>",
|
|
214
|
+
"Code Bad": "<Input/>{error && <span>{error}</span>}",
|
|
215
|
+
"Severity": "Medium",
|
|
216
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/form"
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"No": "19",
|
|
220
|
+
"Category": "Form",
|
|
221
|
+
"Guideline": "Use Zod for validation",
|
|
222
|
+
"Description": "Define form schema with Zod for type-safe validation",
|
|
223
|
+
"Do": "zodResolver with form schema",
|
|
224
|
+
"Don't": "Manual validation logic",
|
|
225
|
+
"Code Good": "zodResolver(formSchema)",
|
|
226
|
+
"Code Bad": "validate: (values) => { if (!values.email) }",
|
|
227
|
+
"Severity": "Medium",
|
|
228
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/form"
|
|
229
|
+
},
|
|
230
|
+
{
|
|
231
|
+
"No": "20",
|
|
232
|
+
"Category": "Select",
|
|
233
|
+
"Guideline": "Use Select for dropdowns",
|
|
234
|
+
"Description": "Select component for option selection",
|
|
235
|
+
"Do": "Select for choosing from list",
|
|
236
|
+
"Don't": "Native select element",
|
|
237
|
+
"Code Good": "<Select><SelectTrigger><SelectContent>",
|
|
238
|
+
"Code Bad": "<select><option>",
|
|
239
|
+
"Severity": "Medium",
|
|
240
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/select"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
"No": "21",
|
|
244
|
+
"Category": "Select",
|
|
245
|
+
"Guideline": "Structure Select properly",
|
|
246
|
+
"Description": "Include Trigger Value Content and Items",
|
|
247
|
+
"Do": "Complete Select structure",
|
|
248
|
+
"Don't": "Missing SelectValue or SelectContent",
|
|
249
|
+
"Code Good": "<SelectTrigger><SelectValue/></SelectTrigger><SelectContent><SelectItem>",
|
|
250
|
+
"Code Bad": "<Select><option>",
|
|
251
|
+
"Severity": "High",
|
|
252
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/select"
|
|
253
|
+
},
|
|
254
|
+
{
|
|
255
|
+
"No": "22",
|
|
256
|
+
"Category": "Command",
|
|
257
|
+
"Guideline": "Use Command for search",
|
|
258
|
+
"Description": "Command component for searchable lists and palettes",
|
|
259
|
+
"Do": "Command for command palette search",
|
|
260
|
+
"Don't": "Input with custom dropdown",
|
|
261
|
+
"Code Good": "<Command><CommandInput><CommandList>",
|
|
262
|
+
"Code Bad": "<Input><div className=\"dropdown\">",
|
|
263
|
+
"Severity": "Medium",
|
|
264
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/command"
|
|
265
|
+
},
|
|
266
|
+
{
|
|
267
|
+
"No": "23",
|
|
268
|
+
"Category": "Command",
|
|
269
|
+
"Guideline": "Group command items",
|
|
270
|
+
"Description": "Use CommandGroup for categorized items",
|
|
271
|
+
"Do": "CommandGroup with heading for sections",
|
|
272
|
+
"Don't": "Flat list without grouping",
|
|
273
|
+
"Code Good": "<CommandGroup heading=\"Suggestions\"><CommandItem>",
|
|
274
|
+
"Code Bad": "<CommandItem> without groups",
|
|
275
|
+
"Severity": "Low",
|
|
276
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/command"
|
|
277
|
+
},
|
|
278
|
+
{
|
|
279
|
+
"No": "24",
|
|
280
|
+
"Category": "Table",
|
|
281
|
+
"Guideline": "Use Table for data display",
|
|
282
|
+
"Description": "Table component for structured data",
|
|
283
|
+
"Do": "Table for tabular data display",
|
|
284
|
+
"Don't": "Div grid for table-like layouts",
|
|
285
|
+
"Code Good": "<Table><TableHeader><TableBody><TableRow>",
|
|
286
|
+
"Code Bad": "<div className=\"grid\">",
|
|
287
|
+
"Severity": "Medium",
|
|
288
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/table"
|
|
289
|
+
},
|
|
290
|
+
{
|
|
291
|
+
"No": "25",
|
|
292
|
+
"Category": "Table",
|
|
293
|
+
"Guideline": "Include proper table structure",
|
|
294
|
+
"Description": "Use TableHeader TableBody TableRow TableCell",
|
|
295
|
+
"Do": "Semantic table structure",
|
|
296
|
+
"Don't": "Missing thead or tbody",
|
|
297
|
+
"Code Good": "<TableHeader><TableRow><TableHead>",
|
|
298
|
+
"Code Bad": "<Table><TableRow> without header",
|
|
299
|
+
"Severity": "High",
|
|
300
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/table"
|
|
301
|
+
},
|
|
302
|
+
{
|
|
303
|
+
"No": "26",
|
|
304
|
+
"Category": "DataTable",
|
|
305
|
+
"Guideline": "Use DataTable for complex tables",
|
|
306
|
+
"Description": "Combine Table with TanStack Table for features",
|
|
307
|
+
"Do": "DataTable pattern for sorting filtering pagination",
|
|
308
|
+
"Don't": "Custom table implementation",
|
|
309
|
+
"Code Good": "useReactTable + Table components",
|
|
310
|
+
"Code Bad": "Custom sort filter pagination logic",
|
|
311
|
+
"Severity": "Medium",
|
|
312
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/data-table"
|
|
313
|
+
},
|
|
314
|
+
{
|
|
315
|
+
"No": "27",
|
|
316
|
+
"Category": "Tabs",
|
|
317
|
+
"Guideline": "Use Tabs for content switching",
|
|
318
|
+
"Description": "Tabs component for tabbed interfaces",
|
|
319
|
+
"Do": "Tabs for related content sections",
|
|
320
|
+
"Don't": "Custom tab implementation",
|
|
321
|
+
"Code Good": "<Tabs><TabsList><TabsTrigger><TabsContent>",
|
|
322
|
+
"Code Bad": "<div onClick={() => setTab(...)}",
|
|
323
|
+
"Severity": "Medium",
|
|
324
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/tabs"
|
|
325
|
+
},
|
|
326
|
+
{
|
|
327
|
+
"No": "28",
|
|
328
|
+
"Category": "Tabs",
|
|
329
|
+
"Guideline": "Set default tab value",
|
|
330
|
+
"Description": "Specify defaultValue for initial tab",
|
|
331
|
+
"Do": "defaultValue on Tabs component",
|
|
332
|
+
"Don't": "No default leaving first tab",
|
|
333
|
+
"Code Good": "<Tabs defaultValue=\"account\">",
|
|
334
|
+
"Code Bad": "<Tabs> without defaultValue",
|
|
335
|
+
"Severity": "Low",
|
|
336
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/tabs"
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"No": "29",
|
|
340
|
+
"Category": "Accordion",
|
|
341
|
+
"Guideline": "Use Accordion for collapsible",
|
|
342
|
+
"Description": "Accordion for expandable content sections",
|
|
343
|
+
"Do": "Accordion for FAQ settings panels",
|
|
344
|
+
"Don't": "Custom collapse implementation",
|
|
345
|
+
"Code Good": "<Accordion><AccordionItem><AccordionTrigger>",
|
|
346
|
+
"Code Bad": "<div onClick={() => setOpen(!open)}>",
|
|
347
|
+
"Severity": "Medium",
|
|
348
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/accordion"
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
"No": "30",
|
|
352
|
+
"Category": "Accordion",
|
|
353
|
+
"Guideline": "Choose accordion type",
|
|
354
|
+
"Description": "Use type=\"single\" or type=\"multiple\" appropriately",
|
|
355
|
+
"Do": "type=\"single\" for one open type=\"multiple\" for many",
|
|
356
|
+
"Don't": "Default type without consideration",
|
|
357
|
+
"Code Good": "<Accordion type=\"single\" collapsible>",
|
|
358
|
+
"Code Bad": "<Accordion> without type",
|
|
359
|
+
"Severity": "Low",
|
|
360
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/accordion"
|
|
361
|
+
},
|
|
362
|
+
{
|
|
363
|
+
"No": "31",
|
|
364
|
+
"Category": "Toast",
|
|
365
|
+
"Guideline": "Use Sonner for toasts",
|
|
366
|
+
"Description": "Sonner integration for toast notifications",
|
|
367
|
+
"Do": "toast() from sonner for notifications",
|
|
368
|
+
"Don't": "Custom toast implementation",
|
|
369
|
+
"Code Good": "toast(\"Event created\")",
|
|
370
|
+
"Code Bad": "setShowToast(true)",
|
|
371
|
+
"Severity": "Medium",
|
|
372
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/sonner"
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
"No": "32",
|
|
376
|
+
"Category": "Toast",
|
|
377
|
+
"Guideline": "Add Toaster to layout",
|
|
378
|
+
"Description": "Include Toaster component in root layout",
|
|
379
|
+
"Do": "<Toaster /> in app layout",
|
|
380
|
+
"Don't": "Toaster in individual pages",
|
|
381
|
+
"Code Good": "app/layout.tsx: <Toaster />",
|
|
382
|
+
"Code Bad": "page.tsx: <Toaster />",
|
|
383
|
+
"Severity": "High",
|
|
384
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/sonner"
|
|
385
|
+
},
|
|
386
|
+
{
|
|
387
|
+
"No": "33",
|
|
388
|
+
"Category": "Toast",
|
|
389
|
+
"Guideline": "Use toast variants",
|
|
390
|
+
"Description": "Apply toast.success toast.error for context",
|
|
391
|
+
"Do": "Semantic toast methods",
|
|
392
|
+
"Don't": "Generic toast for all messages",
|
|
393
|
+
"Code Good": "toast.success(\"Saved!\") toast.error(\"Failed\")",
|
|
394
|
+
"Code Bad": "toast(\"Saved!\") toast(\"Failed\")",
|
|
395
|
+
"Severity": "Medium",
|
|
396
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/sonner"
|
|
397
|
+
},
|
|
398
|
+
{
|
|
399
|
+
"No": "34",
|
|
400
|
+
"Category": "Popover",
|
|
401
|
+
"Guideline": "Use Popover for floating content",
|
|
402
|
+
"Description": "Popover for dropdown menus and floating panels",
|
|
403
|
+
"Do": "Popover for contextual actions",
|
|
404
|
+
"Don't": "Absolute positioned divs",
|
|
405
|
+
"Code Good": "<Popover><PopoverTrigger><PopoverContent>",
|
|
406
|
+
"Code Bad": "<div className=\"relative\"><div className=\"absolute\">",
|
|
407
|
+
"Severity": "Medium",
|
|
408
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/popover"
|
|
409
|
+
},
|
|
410
|
+
{
|
|
411
|
+
"No": "35",
|
|
412
|
+
"Category": "Popover",
|
|
413
|
+
"Guideline": "Handle popover alignment",
|
|
414
|
+
"Description": "Use align and side props for positioning",
|
|
415
|
+
"Do": "Explicit alignment configuration",
|
|
416
|
+
"Don't": "Default alignment for all",
|
|
417
|
+
"Code Good": "<PopoverContent align=\"start\" side=\"bottom\">",
|
|
418
|
+
"Code Bad": "<PopoverContent>",
|
|
419
|
+
"Severity": "Low",
|
|
420
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/popover"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"No": "36",
|
|
424
|
+
"Category": "DropdownMenu",
|
|
425
|
+
"Guideline": "Use DropdownMenu for actions",
|
|
426
|
+
"Description": "DropdownMenu for action lists and context menus",
|
|
427
|
+
"Do": "DropdownMenu for user menu actions",
|
|
428
|
+
"Don't": "Popover for action lists",
|
|
429
|
+
"Code Good": "<DropdownMenu><DropdownMenuTrigger><DropdownMenuContent>",
|
|
430
|
+
"Code Bad": "<Popover> for menu actions",
|
|
431
|
+
"Severity": "Medium",
|
|
432
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/dropdown-menu"
|
|
433
|
+
},
|
|
434
|
+
{
|
|
435
|
+
"No": "37",
|
|
436
|
+
"Category": "DropdownMenu",
|
|
437
|
+
"Guideline": "Group menu items",
|
|
438
|
+
"Description": "Use DropdownMenuGroup and DropdownMenuSeparator",
|
|
439
|
+
"Do": "Organized menu with separators",
|
|
440
|
+
"Don't": "Flat list of items",
|
|
441
|
+
"Code Good": "<DropdownMenuGroup><DropdownMenuItem><DropdownMenuSeparator>",
|
|
442
|
+
"Code Bad": "<DropdownMenuItem> without organization",
|
|
443
|
+
"Severity": "Low",
|
|
444
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/dropdown-menu"
|
|
445
|
+
},
|
|
446
|
+
{
|
|
447
|
+
"No": "38",
|
|
448
|
+
"Category": "Tooltip",
|
|
449
|
+
"Guideline": "Use Tooltip for hints",
|
|
450
|
+
"Description": "Tooltip for icon buttons and truncated text",
|
|
451
|
+
"Do": "Tooltip for additional context",
|
|
452
|
+
"Don't": "Title attribute for tooltips",
|
|
453
|
+
"Code Good": "<Tooltip><TooltipTrigger><TooltipContent>",
|
|
454
|
+
"Code Bad": "<button title=\"Delete\">",
|
|
455
|
+
"Severity": "Medium",
|
|
456
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/tooltip"
|
|
457
|
+
},
|
|
458
|
+
{
|
|
459
|
+
"No": "39",
|
|
460
|
+
"Category": "Tooltip",
|
|
461
|
+
"Guideline": "Add TooltipProvider",
|
|
462
|
+
"Description": "Wrap app or section in TooltipProvider",
|
|
463
|
+
"Do": "TooltipProvider at app level",
|
|
464
|
+
"Don't": "TooltipProvider per tooltip",
|
|
465
|
+
"Code Good": "<TooltipProvider><App/></TooltipProvider>",
|
|
466
|
+
"Code Bad": "<Tooltip><TooltipProvider>",
|
|
467
|
+
"Severity": "High",
|
|
468
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/tooltip"
|
|
469
|
+
},
|
|
470
|
+
{
|
|
471
|
+
"No": "40",
|
|
472
|
+
"Category": "Skeleton",
|
|
473
|
+
"Guideline": "Use Skeleton for loading",
|
|
474
|
+
"Description": "Skeleton component for loading placeholders",
|
|
475
|
+
"Do": "Skeleton matching content layout",
|
|
476
|
+
"Don't": "Spinner for content loading",
|
|
477
|
+
"Code Good": "<Skeleton className=\"h-4 w-[200px]\"/>",
|
|
478
|
+
"Code Bad": "<Spinner/> for card loading",
|
|
479
|
+
"Severity": "Medium",
|
|
480
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/skeleton"
|
|
481
|
+
},
|
|
482
|
+
{
|
|
483
|
+
"No": "41",
|
|
484
|
+
"Category": "Skeleton",
|
|
485
|
+
"Guideline": "Match skeleton dimensions",
|
|
486
|
+
"Description": "Size skeleton to match loaded content",
|
|
487
|
+
"Do": "Skeleton same size as expected content",
|
|
488
|
+
"Don't": "Generic skeleton size",
|
|
489
|
+
"Code Good": "<Skeleton className=\"h-12 w-12 rounded-full\"/>",
|
|
490
|
+
"Code Bad": "<Skeleton/> without sizing",
|
|
491
|
+
"Severity": "Medium",
|
|
492
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/skeleton"
|
|
493
|
+
},
|
|
494
|
+
{
|
|
495
|
+
"No": "42",
|
|
496
|
+
"Category": "AlertDialog",
|
|
497
|
+
"Guideline": "Use AlertDialog for confirms",
|
|
498
|
+
"Description": "AlertDialog for destructive action confirmation",
|
|
499
|
+
"Do": "AlertDialog for delete confirmations",
|
|
500
|
+
"Don't": "Dialog for confirmations",
|
|
501
|
+
"Code Good": "<AlertDialog><AlertDialogTrigger><AlertDialogContent>",
|
|
502
|
+
"Code Bad": "<Dialog> for delete confirmation",
|
|
503
|
+
"Severity": "High",
|
|
504
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/alert-dialog"
|
|
505
|
+
},
|
|
506
|
+
{
|
|
507
|
+
"No": "43",
|
|
508
|
+
"Category": "AlertDialog",
|
|
509
|
+
"Guideline": "Include action buttons",
|
|
510
|
+
"Description": "Use AlertDialogAction and AlertDialogCancel",
|
|
511
|
+
"Do": "Standard confirm/cancel pattern",
|
|
512
|
+
"Don't": "Custom buttons in AlertDialog",
|
|
513
|
+
"Code Good": "<AlertDialogCancel>Cancel</AlertDialogCancel><AlertDialogAction>",
|
|
514
|
+
"Code Bad": "<Button>Cancel</Button><Button>Confirm</Button>",
|
|
515
|
+
"Severity": "Medium",
|
|
516
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/alert-dialog"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"No": "44",
|
|
520
|
+
"Category": "Sidebar",
|
|
521
|
+
"Guideline": "Use Sidebar for navigation",
|
|
522
|
+
"Description": "Sidebar component for app navigation",
|
|
523
|
+
"Do": "Sidebar for main app navigation",
|
|
524
|
+
"Don't": "Custom sidebar implementation",
|
|
525
|
+
"Code Good": "<SidebarProvider><Sidebar><SidebarContent>",
|
|
526
|
+
"Code Bad": "<div className=\"w-64 fixed\">",
|
|
527
|
+
"Severity": "Medium",
|
|
528
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/sidebar"
|
|
529
|
+
},
|
|
530
|
+
{
|
|
531
|
+
"No": "45",
|
|
532
|
+
"Category": "Sidebar",
|
|
533
|
+
"Guideline": "Wrap in SidebarProvider",
|
|
534
|
+
"Description": "Use SidebarProvider for sidebar state management",
|
|
535
|
+
"Do": "SidebarProvider at layout level",
|
|
536
|
+
"Don't": "Sidebar without provider",
|
|
537
|
+
"Code Good": "<SidebarProvider><Sidebar></SidebarProvider>",
|
|
538
|
+
"Code Bad": "<Sidebar> without provider",
|
|
539
|
+
"Severity": "High",
|
|
540
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/sidebar"
|
|
541
|
+
},
|
|
542
|
+
{
|
|
543
|
+
"No": "46",
|
|
544
|
+
"Category": "Sidebar",
|
|
545
|
+
"Guideline": "Use SidebarTrigger",
|
|
546
|
+
"Description": "Include SidebarTrigger for mobile toggle",
|
|
547
|
+
"Do": "SidebarTrigger for responsive toggle",
|
|
548
|
+
"Don't": "Custom toggle button",
|
|
549
|
+
"Code Good": "<SidebarTrigger/>",
|
|
550
|
+
"Code Bad": "<Button onClick={() => toggleSidebar()}>",
|
|
551
|
+
"Severity": "Medium",
|
|
552
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/sidebar"
|
|
553
|
+
},
|
|
554
|
+
{
|
|
555
|
+
"No": "47",
|
|
556
|
+
"Category": "Chart",
|
|
557
|
+
"Guideline": "Use Chart for data viz",
|
|
558
|
+
"Description": "Chart component with Recharts integration",
|
|
559
|
+
"Do": "Chart component for dashboards",
|
|
560
|
+
"Don't": "Direct Recharts without wrapper",
|
|
561
|
+
"Code Good": "<ChartContainer config={chartConfig}>",
|
|
562
|
+
"Code Bad": "<ResponsiveContainer><BarChart>",
|
|
563
|
+
"Severity": "Medium",
|
|
564
|
+
"Docs URL": "https://ui.shadcn.com/docs/components/chart"
|
|
565
|
+
}
|
|
566
|
+
]
|