Skip to content

Commit 2f144f3

Browse files
committed
fix(docs): address release review findings
1 parent f44c4a5 commit 2f144f3

20 files changed

Lines changed: 136 additions & 59 deletions

‎apps/www/app/docs/page.tsx‎

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ import { componentsList } from "@/config/components";
22
import { codeToHtml } from "shiki";
33
import { escapeHtml } from "@/lib/escape-html";
44
import ClientCopyButton from "@/components/client-copy-button";
5+
import DocsAiCta from "@/components/docs-ai-cta";
56
import Link from "next/link";
67
import {
78
Terminal,
@@ -291,22 +292,7 @@ export default function Hero() {
291292
</section>
292293

293294
{/* ── Use with AI CTA ── */}
294-
<div className="animate-fade-in-up animate-delay-300 rounded-2xl border border-neutral-200 dark:border-neutral-800 bg-neutral-50 dark:bg-neutral-900/40 p-8 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-6">
295-
<div className="space-y-1">
296-
<p className="font-semibold text-neutral-900 dark:text-white">Use with AI</p>
297-
<p className="text-sm text-neutral-500 dark:text-neutral-400">
298-
Install components from Cursor or Claude Code via the shadcn MCP server, plus{" "}
299-
<code className="font-mono text-xs">llms.txt</code> endpoints for agent context.
300-
</p>
301-
</div>
302-
<Link
303-
href="/docs/ai"
304-
className="shrink-0 flex items-center gap-2 px-5 py-2.5 rounded-xl font-medium text-sm border border-neutral-200 bg-white text-neutral-900 hover:bg-neutral-100 dark:border-neutral-800 dark:bg-neutral-900 dark:text-white dark:hover:bg-neutral-800 transition-colors"
305-
>
306-
Set up MCP
307-
<ArrowRight className="w-4 h-4" />
308-
</Link>
309-
</div>
295+
<DocsAiCta />
310296

311297
{/* ── Theming CTA ── */}
312298
<div className="animate-fade-in-up animate-delay-300 rounded-2xl border border-neutral-200 dark:border-neutral-800 bg-neutral-50 dark:bg-neutral-900/40 p-8 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-6">
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
"use client";
2+
3+
import Link from "next/link";
4+
import { ArrowRight } from "lucide-react";
5+
6+
export default function DocsAiCta() {
7+
return (
8+
<div className="animate-fade-in-up animate-delay-300 rounded-2xl border border-neutral-200 dark:border-neutral-800 bg-neutral-50 dark:bg-neutral-900/40 p-8 flex flex-col sm:flex-row items-start sm:items-center justify-between gap-6">
9+
<div className="space-y-1">
10+
<p className="font-semibold text-neutral-900 dark:text-white">Use with AI</p>
11+
<p className="text-sm text-neutral-500 dark:text-neutral-400">
12+
Install components from Cursor or Claude Code via the shadcn MCP server, plus{" "}
13+
<code className="font-mono text-xs">llms.txt</code> endpoints for agent context.
14+
</p>
15+
</div>
16+
<Link
17+
href="/docs/ai"
18+
className="shrink-0 flex items-center gap-2 px-5 py-2.5 rounded-xl font-medium text-sm border border-neutral-200 bg-white text-neutral-900 hover:bg-neutral-100 dark:border-neutral-800 dark:bg-neutral-900 dark:text-white dark:hover:bg-neutral-800 transition-colors"
19+
>
20+
Set up MCP
21+
<ArrowRight className="w-4 h-4" />
22+
</Link>
23+
</div>
24+
);
25+
}

‎apps/www/config/components.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2169,7 +2169,7 @@ const componentDefinitions = [
21692169
{
21702170
"slug": "morphing-card-stack",
21712171
"name": "Morphing Card Stack",
2172-
"description": "An interactive collection of cards that smoothly layout-morphs between Stack, Grid, and List configurations using Framer Motion springs.",
2172+
"description": "An interactive collection of cards that smoothly layout-morphs between Stack, Grid, and List configurations using motion/react springs.",
21732173
"icon": "Layers",
21742174
"category": "Cards",
21752175
"props": [

‎apps/www/config/demos.tsx‎

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -2234,7 +2234,7 @@ export const componentDemos: Record<string, DemoComponent> = {
22342234
{ id: "team", header: "Team", accessor: (row: Row) => row.team, width: 140 },
22352235
{ id: "email", header: "Email", accessor: (row: Row) => row.email, width: 250 },
22362236
{ id: "region", header: "Region", accessor: (row: Row) => row.region, width: 180 },
2237-
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `${row.revenue.toFixed(2)}` },
2237+
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `$${row.revenue.toFixed(2)}` },
22382238
{ id: "status", header: "Status", accessor: (row: Row) => row.status, width: 130 },
22392239
{ id: "actions", header: "Actions", accessor: (row: Row) => row.actions, width: 130 }
22402240
]}
@@ -2265,7 +2265,7 @@ export const componentDemos: Record<string, DemoComponent> = {
22652265
{ id: "team", header: "Team", accessor: (row: Row) => row.team, width: 140 },
22662266
{ id: "email", header: "Email", accessor: (row: Row) => row.email, width: 250 },
22672267
{ id: "region", header: "Region", accessor: (row: Row) => row.region, width: 180 },
2268-
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `${row.revenue.toFixed(2)}` },
2268+
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `$${row.revenue.toFixed(2)}` },
22692269
{ id: "status", header: "Status", accessor: (row: Row) => row.status, width: 130 },
22702270
{ id: "actions", header: "Actions", accessor: (row: Row) => row.actions, width: 130, freeze: "right" }
22712271
]}
@@ -2296,7 +2296,7 @@ export const componentDemos: Record<string, DemoComponent> = {
22962296
{ id: "team", header: "Team", accessor: (row: Row) => row.team, width: 140, freeze: "left" },
22972297
{ id: "email", header: "Email", accessor: (row: Row) => row.email, width: 250 },
22982298
{ id: "region", header: "Region", accessor: (row: Row) => row.region, width: 180 },
2299-
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `${row.revenue.toFixed(2)}` },
2299+
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `$${row.revenue.toFixed(2)}` },
23002300
{ id: "status", header: "Status", accessor: (row: Row) => row.status, width: 130 },
23012301
{ id: "actions", header: "Actions", accessor: (row: Row) => row.actions, width: 130 }
23022302
]}
@@ -2327,7 +2327,7 @@ export const componentDemos: Record<string, DemoComponent> = {
23272327
{ id: "team", header: "Team", accessor: (row: Row) => row.team, width: 140 },
23282328
{ id: "email", header: "Email", accessor: (row: Row) => row.email, width: 250 },
23292329
{ id: "region", header: "Region", accessor: (row: Row) => row.region, width: 180 },
2330-
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `${row.revenue.toFixed(2)}` },
2330+
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `$${row.revenue.toFixed(2)}` },
23312331
{ id: "status", header: "Status", accessor: (row: Row) => row.status, width: 130, freeze: "right" },
23322332
{ id: "actions", header: "Actions", accessor: (row: Row) => row.actions, width: 130, freeze: "right" }
23332333
]}
@@ -2358,7 +2358,7 @@ export const componentDemos: Record<string, DemoComponent> = {
23582358
{ id: "team", header: "Team", accessor: (row: Row) => row.team, width: 140, freeze: "left" },
23592359
{ id: "email", header: "Email", accessor: (row: Row) => row.email, width: 250 },
23602360
{ id: "region", header: "Region", accessor: (row: Row) => row.region, width: 180 },
2361-
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `${row.revenue.toFixed(2)}` },
2361+
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `$${row.revenue.toFixed(2)}` },
23622362
{ id: "status", header: "Status", accessor: (row: Row) => row.status, width: 130, freeze: "right" },
23632363
{ id: "actions", header: "Actions", accessor: (row: Row) => row.actions, width: 130, freeze: "right" }
23642364
]}
@@ -2389,7 +2389,7 @@ export const componentDemos: Record<string, DemoComponent> = {
23892389
{ id: "team", header: "Team", accessor: (row: Row) => row.team, width: 140, freeze: "left" },
23902390
{ id: "email", header: "Email", accessor: (row: Row) => row.email, width: 250 },
23912391
{ id: "region", header: "Region", accessor: (row: Row) => row.region, width: 180 },
2392-
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `${row.revenue.toFixed(2)}` },
2392+
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `$${row.revenue.toFixed(2)}` },
23932393
{ id: "status", header: "Status", accessor: (row: Row) => row.status, width: 130, freeze: "right" },
23942394
{ id: "actions", header: "Actions", accessor: (row: Row) => row.actions, width: 130, freeze: "right" }
23952395
]}
@@ -2415,7 +2415,7 @@ export const componentDemos: Record<string, DemoComponent> = {
24152415
<DataTable data={rows} getRowId={(row: Row) => row.id}
24162416
sortable
24172417
stickyHeader maxHeight={320} border theme={theme}
2418-
columns={[ { id: "identity", header: "Identity", accessor: () => null, freeze: "left", columns: [{ id: "name", header: "Name", accessor: (row: Row) => row.name, width: 150, freeze: "left" }, { id: "team", header: "Team", accessor: (row: Row) => row.team, width: 140, freeze: "left" }] }, { id: "email", header: "Email", accessor: (row: Row) => row.email, width: 250 }, { id: "region", header: "Region", accessor: (row: Row) => row.region, width: 180 }, { id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `${row.revenue.toFixed(2)}` }, { id: "workflow", header: "Workflow", accessor: () => null, freeze: "right", columns: [{ id: "status", header: "Status", accessor: (row: Row) => row.status, width: 130, freeze: "right" }, { id: "actions", header: "Actions", accessor: (row: Row) => row.actions, width: 130, freeze: "right" }] } ]}
2418+
columns={[ { id: "identity", header: "Identity", accessor: () => null, freeze: "left", columns: [{ id: "name", header: "Name", accessor: (row: Row) => row.name, width: 150, freeze: "left" }, { id: "team", header: "Team", accessor: (row: Row) => row.team, width: 140, freeze: "left" }] }, { id: "email", header: "Email", accessor: (row: Row) => row.email, width: 250 }, { id: "region", header: "Region", accessor: (row: Row) => row.region, width: 180 }, { id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `$${row.revenue.toFixed(2)}` }, { id: "workflow", header: "Workflow", accessor: () => null, freeze: "right", columns: [{ id: "status", header: "Status", accessor: (row: Row) => row.status, width: 130, freeze: "right" }, { id: "actions", header: "Actions", accessor: (row: Row) => row.actions, width: 130, freeze: "right" }] } ]}
24192419
/>
24202420
</div>
24212421
);
@@ -2443,7 +2443,7 @@ export const componentDemos: Record<string, DemoComponent> = {
24432443
{ id: "team", header: "Team", accessor: (row: Row) => row.team, width: 140 },
24442444
{ id: "email", header: "Email", accessor: (row: Row) => row.email, width: 250 },
24452445
{ id: "region", header: "Region", accessor: (row: Row) => row.region, width: 180 },
2446-
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `${row.revenue.toFixed(2)}` },
2446+
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `$${row.revenue.toFixed(2)}` },
24472447
{ id: "status", header: "Status", accessor: (row: Row) => row.status, width: 130 },
24482448
{ id: "actions", header: "Actions", accessor: (row: Row) => row.actions, width: 130, freeze: "right" }
24492449
]}
@@ -2476,7 +2476,7 @@ export const componentDemos: Record<string, DemoComponent> = {
24762476
{ id: "team", header: "Team", accessor: (row: Row) => row.team, width: 140 },
24772477
{ id: "email", header: "Email", accessor: (row: Row) => row.email, width: 250 },
24782478
{ id: "region", header: "Region", accessor: (row: Row) => row.region, width: 180 },
2479-
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `${row.revenue.toFixed(2)}` },
2479+
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `$${row.revenue.toFixed(2)}` },
24802480
{ id: "status", header: "Status", accessor: (row: Row) => row.status, width: 130 },
24812481
{ id: "actions", header: "Actions", accessor: (row: Row) => row.actions, width: 130 }
24822482
]}
@@ -2507,7 +2507,7 @@ export const componentDemos: Record<string, DemoComponent> = {
25072507
{ id: "team", header: "Team", accessor: (row: Row) => row.team, width: 140 },
25082508
{ id: "email", header: "Email", accessor: (row: Row) => row.email, width: 250 },
25092509
{ id: "region", header: "Region", accessor: (row: Row) => row.region, width: 180 },
2510-
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `${row.revenue.toFixed(2)}` },
2510+
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `$${row.revenue.toFixed(2)}` },
25112511
{ id: "status", header: "Status", accessor: (row: Row) => row.status, width: 130 },
25122512
{ id: "actions", header: "Actions", accessor: (row: Row) => row.actions, width: 130 }
25132513
]}
@@ -2538,7 +2538,7 @@ export const componentDemos: Record<string, DemoComponent> = {
25382538
{ id: "team", header: "Team", accessor: (row: Row) => row.team, width: 140 },
25392539
{ id: "email", header: "Email", accessor: (row: Row) => row.email, width: 250 },
25402540
{ id: "region", header: "Region", accessor: (row: Row) => row.region, width: 180 },
2541-
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `${row.revenue.toFixed(2)}` },
2541+
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `$${row.revenue.toFixed(2)}` },
25422542
{ id: "status", header: "Status", accessor: (row: Row) => row.status, width: 130 },
25432543
{ id: "actions", header: "Actions", accessor: (row: Row) => row.actions, width: 130 }
25442544
]}
@@ -2569,7 +2569,7 @@ export const componentDemos: Record<string, DemoComponent> = {
25692569
{ id: "team", header: "Team", accessor: (row: Row) => row.team, width: 140 },
25702570
{ id: "email", header: "Email", accessor: (row: Row) => row.email, width: 250 },
25712571
{ id: "region", header: "Region", accessor: (row: Row) => row.region, width: 180 },
2572-
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `${row.revenue.toFixed(2)}` },
2572+
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `$${row.revenue.toFixed(2)}` },
25732573
{ id: "status", header: "Status", accessor: (row: Row) => row.status, width: 130 },
25742574
{ id: "actions", header: "Actions", accessor: (row: Row) => row.actions, width: 130 }
25752575
]}
@@ -2600,7 +2600,7 @@ export const componentDemos: Record<string, DemoComponent> = {
26002600
{ id: "team", header: "Team", accessor: (row: Row) => row.team, width: 140 },
26012601
{ id: "email", header: "Email", accessor: (row: Row) => row.email, width: 250 },
26022602
{ id: "region", header: "Region", accessor: (row: Row) => row.region, width: 180 },
2603-
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `${row.revenue.toFixed(2)}` },
2603+
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `$${row.revenue.toFixed(2)}` },
26042604
{ id: "status", header: "Status", accessor: (row: Row) => row.status, width: 130 },
26052605
{ id: "actions", header: "Actions", accessor: (row: Row) => row.actions, width: 130 }
26062606
]}
@@ -2631,7 +2631,7 @@ export const componentDemos: Record<string, DemoComponent> = {
26312631
{ id: "team", header: "Team", accessor: (row: Row) => row.team, width: 140 },
26322632
{ id: "email", header: "Email", accessor: (row: Row) => row.email, width: 250 },
26332633
{ id: "region", header: "Region", accessor: (row: Row) => row.region, width: 180 },
2634-
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `${row.revenue.toFixed(2)}` },
2634+
{ id: "revenue", header: "Revenue", accessor: (row: Row) => row.revenue, width: 140, align: "right", cell: (row: Row) => `$${row.revenue.toFixed(2)}` },
26352635
{ id: "status", header: "Status", accessor: (row: Row) => row.status, width: 130 },
26362636
{ id: "actions", header: "Actions", accessor: (row: Row) => row.actions, width: 130 }
26372637
]}

‎apps/www/e2e/data-table.smoke.spec.ts‎

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,15 @@ test("multiple pinned rows remain stacked below the header", async ({ page }) =>
5757
await viewport.scrollIntoViewIfNeeded();
5858
await viewport.evaluate((el) => { el.scrollTop = 350; el.scrollLeft = 200; });
5959
await expect.poll(async () => {
60-
const rows = await viewport.locator("[data-pinned-row]").evaluateAll((els) => els.map((el) => {
61-
const box = el.getBoundingClientRect();
62-
return { top: box.top, bottom: box.bottom };
63-
}));
64-
return Math.abs(rows[1].top - rows[0].bottom);
60+
return viewport.evaluate((el) => {
61+
const headerBottom = Math.max(...Array.from(el.querySelectorAll("thead th"),
62+
(cell) => cell.getBoundingClientRect().bottom));
63+
const rows = Array.from(el.querySelectorAll("[data-pinned-row]"),
64+
(row) => row.getBoundingClientRect());
65+
return Math.max(
66+
Math.abs(rows[0].top - headerBottom),
67+
Math.abs(rows[1].top - rows[0].bottom),
68+
);
69+
});
6570
}).toBeLessThan(2);
6671
});

‎apps/www/e2e/smoke.spec.ts‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ function trackFatalConsoleErrors(page: Page): string[] {
2828
}
2929

3030
test.describe("smoke", () => {
31+
test("/docs keeps the animated AI setup link available", async ({ page }) => {
32+
const fatal = trackFatalConsoleErrors(page);
33+
const response = await page.goto("/docs");
34+
expect(response?.status()).toBe(200);
35+
await expect(page.getByRole("link", { name: "Set up MCP" })).toHaveAttribute("href", "/docs/ai");
36+
expect(fatal).toEqual([]);
37+
});
38+
3139
test("shared links use the public origin for social preview images", async ({ page }) => {
3240
await page.goto("/");
3341
for (const selector of ['meta[property="og:image"]', 'meta[name="twitter:image"]']) {

‎apps/www/public/llms-full.txt‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4223,7 +4223,7 @@ export default function Report() {
42234223

42244224
## Morphing Card Stack (`morphing-card-stack`)
42254225

4226-
An interactive collection of cards that smoothly layout-morphs between Stack, Grid, and List configurations using Framer Motion springs.
4226+
An interactive collection of cards that smoothly layout-morphs between Stack, Grid, and List configurations using motion/react springs.
42274227

42284228
- Docs: https://uniqueui-platform.vercel.app/components/morphing-card-stack
42294229
- Install: `npx uniqueui add morphing-card-stack`

0 commit comments

Comments
 (0)