Skip to content

chore: www packages page#542

Merged
softmarshmallow merged 2 commits intomainfrom
canary
Feb 17, 2026
Merged

chore: www packages page#542
softmarshmallow merged 2 commits intomainfrom
canary

Conversation

@softmarshmallow
Copy link
Copy Markdown
Member

@softmarshmallow softmarshmallow commented Feb 17, 2026

Summary by CodeRabbit

  • New Features
    • Introduced a new @grida/refig package page with comprehensive documentation, key features, interactive demo, quick start code samples, and npm links.
    • Updated package directory to include the new package for improved discoverability.

- Introduced the @grida/refig package, a headless Figma renderer for generating images and PDFs from Figma documents.
- Updated the packages list and sitemap to include the new package.
- Created a dedicated page for @grida/refig with detailed features, usage examples, and a demo video for user engagement.
@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 17, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
docs Ready Ready Preview, Comment Feb 17, 2026 5:52pm
grida Ready Ready Preview, Comment Feb 17, 2026 5:52pm
5 Skipped Deployments
Project Deployment Actions Updated (UTC)
code Ignored Ignored Feb 17, 2026 5:52pm
legacy Ignored Ignored Feb 17, 2026 5:52pm
backgrounds Skipped Skipped Feb 17, 2026 5:52pm
blog Skipped Skipped Feb 17, 2026 5:52pm
viewer Skipped Skipped Feb 17, 2026 5:52pm

Request Review

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 17, 2026

Walkthrough

The PR introduces a new @grida/refig package page with marketing content and registry entries, refactors NavigationMenu components to use forwardRef patterns with updated type signatures, and updates the header navigation to use the refactored NavigationMenu.

Changes

Cohort / File(s) Summary
New @grida/refig Package Page
editor/app/(tools)/(packages)/packages/[%40grida]/refig/page.tsx, editor/app/(tools)/(packages)/packages/data.ts, editor/app/(tools)/(packages)/packages/sitemap.ts
Adds marketing page for @grida/refig with overview, demo video, key features, and quick start guide; registers package in data array and sitemap with monthly update frequency and 0.8 priority.
NavigationMenu Component Refactor
editor/components/ui/navigation-menu.tsx
Converts NavigationMenu, NavigationMenuList, NavigationMenuTrigger, NavigationMenuContent, NavigationMenuViewport, and NavigationMenuIndicator from function components to forwardRef wrappers with explicit type signatures; exports previously internal components and introduces navigationMenuTriggerStyle utility; updates icon from ChevronDownIcon to ChevronDown.
Header Navigation Updates
editor/www/header.tsx
Refactors Pricing navigation item to use asChild pattern with NavigationMenuLink; adds DrawerTitle with screen-reader-only styling to mobile drawer navigation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Suggested labels

ux

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'chore: www packages page' is vague and generic. It uses non-descriptive terms that don't clearly convey what was actually changed—adding a new package page for @grida/refig, updating package listings, and refactoring navigation components. Use a more specific title like 'feat: add @grida/refig package page and update navigation components' to clearly describe the main changes in this PR.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch canary

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (3)
editor/app/(tools)/(packages)/packages/[%40grida]/refig/page.tsx (2)

64-88: Features list is duplicated from data.ts.

These features are hardcoded here but already defined in data.ts. Consider importing from the shared data source to keep them in sync.

♻️ Suggested approach
import { packages } from "../../../data";

const refigPkg = packages.find((p) => p.name === "@grida/refig")!;

Then render refigPkg.features.map(...) instead of the hardcoded list.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@editor/app/`(tools)/(packages)/packages/[%40grida]/refig/page.tsx around
lines 64 - 88, The hardcoded "Key Features" list is duplicated from data.ts;
import the shared packages array (packages) from the data module, find the
package entry for "@grida/refig" (e.g., const refigPkg = packages.find(p =>
p.name === "@grida/refig")!), and render the list by mapping refigPkg.features
(refigPkg.features.map(...)) instead of the hardcoded <li> elements so the UI
stays in sync with data.ts.

49-61: Use Tailwind utilities instead of inline styles and deprecated attributes.

  • The inline style={{ paddingBottom: "56.25%", position: "relative" }} can be replaced with Tailwind's aspect-video utility (or relative pb-[56.25%]).
  • frameBorder="0" is a deprecated HTML attribute; use the border-0 class instead.
♻️ Proposed fix
-            <div
-              className="rounded-lg overflow-hidden border bg-muted"
-              style={{ paddingBottom: "56.25%", position: "relative" }}
-            >
+            <div className="rounded-lg overflow-hidden border bg-muted relative aspect-video">
               <iframe
                 src="https://player.vimeo.com/video/1165652748?badge=0&autopause=0&player_id=0&app_id=58479&autoplay=0&muted=0&loop=0"
                 className="absolute top-0 left-0 w-full h-full"
-                frameBorder="0"
+                className="absolute top-0 left-0 w-full h-full border-0"
                 allow="autoplay; fullscreen; picture-in-picture; clipboard-write; encrypted-media; web-share"
                 referrerPolicy="strict-origin-when-cross-origin"
                 title="refig (headless figma renderer) demo"
               />
             </div>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@editor/app/`(tools)/(packages)/packages/[%40grida]/refig/page.tsx around
lines 49 - 61, The JSX block rendering the video uses inline styles and a
deprecated iframe attribute; replace the outer div's style={{ paddingBottom:
"56.25%", position: "relative" }} with Tailwind utilities (e.g., use
className="rounded-lg overflow-hidden border bg-muted relative aspect-video" or
className="rounded-lg overflow-hidden border bg-muted relative pb-[56.25%]") and
remove the deprecated frameBorder="0" on the iframe, instead add the Tailwind
class border-0 to the iframe's className; update the iframe and outer div in the
page.tsx component (the div wrapping the iframe and the iframe element with
title "refig (headless figma renderer) demo") accordingly.
editor/components/ui/navigation-menu.tsx (1)

8-23: Note: NavigationMenuViewport is always rendered inside NavigationMenu.

NavigationMenuViewport is rendered at line 21 inside the NavigationMenu wrapper, but it's also exported separately (line 127). This is the standard shadcn/ui pattern, but consumers should be aware that using the NavigationMenu wrapper already includes a viewport — rendering an additional NavigationMenuViewport outside would be redundant.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@editor/components/ui/navigation-menu.tsx` around lines 8 - 23, The
NavigationMenu always renders NavigationMenuViewport internally which makes
rendering a separate exported NavigationMenuViewport redundant; add an optional
boolean prop (e.g. disableViewport or hideViewport) to the NavigationMenu
component's props and use it to conditionally render NavigationMenuViewport
inside NavigationMenu (update the forwardRef generic/type to include this prop
and check it where NavigationMenuViewport is currently rendered), and add a
short JSDoc comment near NavigationMenu and the exported NavigationMenuViewport
explaining that the viewport is included by default and consumers should set
disableViewport to true if they intend to render the viewport separately.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@editor/app/`(tools)/(packages)/packages/[%40grida]/refig/page.tsx:
- Around line 96-106: The code block inside the JSX <pre> / <code> is using an
indented template literal which preserves leading whitespace; hoist the template
literal out of the JSX into a top-level constant (e.g., nodeSnippet) and pass it
into <code>{nodeSnippet}</code> to remove the JSX indentation, or run a dedent
utility on the existing template literal before rendering (target the template
literal currently inside the <code> element and the <pre
className="bg-muted..."> wrapper).

---

Nitpick comments:
In `@editor/app/`(tools)/(packages)/packages/[%40grida]/refig/page.tsx:
- Around line 64-88: The hardcoded "Key Features" list is duplicated from
data.ts; import the shared packages array (packages) from the data module, find
the package entry for "@grida/refig" (e.g., const refigPkg = packages.find(p =>
p.name === "@grida/refig")!), and render the list by mapping refigPkg.features
(refigPkg.features.map(...)) instead of the hardcoded <li> elements so the UI
stays in sync with data.ts.
- Around line 49-61: The JSX block rendering the video uses inline styles and a
deprecated iframe attribute; replace the outer div's style={{ paddingBottom:
"56.25%", position: "relative" }} with Tailwind utilities (e.g., use
className="rounded-lg overflow-hidden border bg-muted relative aspect-video" or
className="rounded-lg overflow-hidden border bg-muted relative pb-[56.25%]") and
remove the deprecated frameBorder="0" on the iframe, instead add the Tailwind
class border-0 to the iframe's className; update the iframe and outer div in the
page.tsx component (the div wrapping the iframe and the iframe element with
title "refig (headless figma renderer) demo") accordingly.

In `@editor/components/ui/navigation-menu.tsx`:
- Around line 8-23: The NavigationMenu always renders NavigationMenuViewport
internally which makes rendering a separate exported NavigationMenuViewport
redundant; add an optional boolean prop (e.g. disableViewport or hideViewport)
to the NavigationMenu component's props and use it to conditionally render
NavigationMenuViewport inside NavigationMenu (update the forwardRef generic/type
to include this prop and check it where NavigationMenuViewport is currently
rendered), and add a short JSDoc comment near NavigationMenu and the exported
NavigationMenuViewport explaining that the viewport is included by default and
consumers should set disableViewport to true if they intend to render the
viewport separately.

Comment on lines +96 to +106
<pre className="bg-muted rounded-lg p-4 text-sm overflow-x-auto">
<code>{`import { writeFileSync } from "node:fs";
import { FigmaDocument, FigmaRenderer } from "@grida/refig";

const doc = FigmaDocument.fromFile("./design.fig");
const renderer = new FigmaRenderer(doc);

const { data } = await renderer.render("1:23", { format: "png", scale: 2 });
writeFileSync("out.png", data);
renderer.dispose();`}</code>
</pre>
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

Code blocks render with extra leading whitespace due to JSX indentation.

Template literals inside JSX <code> elements preserve all whitespace, including the indentation from the surrounding JSX. Each line of the code sample will have leading spaces matching the JSX nesting level, which renders poorly. Consider dedenting the template literal or using a separate constant.

🛠️ One approach — hoist to a constant
const nodeSnippet = `import { writeFileSync } from "node:fs";
import { FigmaDocument, FigmaRenderer } from "@grida/refig";

const doc = FigmaDocument.fromFile("./design.fig");
const renderer = new FigmaRenderer(doc);

const { data } = await renderer.render("1:23", { format: "png", scale: 2 });
writeFileSync("out.png", data);
renderer.dispose();`;

Then use <code>{nodeSnippet}</code> without additional indentation.

Also applies to: 111-117

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@editor/app/`(tools)/(packages)/packages/[%40grida]/refig/page.tsx around
lines 96 - 106, The code block inside the JSX <pre> / <code> is using an
indented template literal which preserves leading whitespace; hoist the template
literal out of the JSX into a top-level constant (e.g., nodeSnippet) and pass it
into <code>{nodeSnippet}</code> to remove the JSX indentation, or run a dedent
utility on the existing template literal before rendering (target the template
literal currently inside the <code> element and the <pre
className="bg-muted..."> wrapper).

@softmarshmallow softmarshmallow changed the title chore chore: www packages page Feb 17, 2026
@softmarshmallow softmarshmallow merged commit 089f7b1 into main Feb 17, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant