Conversation
WalkthroughThis pull request updates navigation components and the button component library across the blog application and UI packages. Changes include adding external link support to navigation menus, introducing UTM tracking to the web navigation, refactoring the Button component's type system from a single interface to a union type with href-based anchor rendering, and correcting button props in MDX content. A Next.js image optimization setting is removed from the blog configuration. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
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. Comment |
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
Actionable comments posted: 3
🧹 Nitpick comments (1)
apps/eclipse/content/design-system/components/button.mdx (1)
239-248: Documentation updates accurately reflect the new Button API.The changes correctly document:
- Eight variants (including new
success)- The
hrefprop for anchor rendering- Removal of
asChildguidanceOne potential inaccuracy: Line 248 states "Built on Radix UI primitives," but the refactored Button component no longer uses Radix (it renders native
<button>and<a>elements directly). Consider updating this line if Radix is no longer a dependency of this component.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@apps/eclipse/content/design-system/components/button.mdx` around lines 239 - 248, The docs claim "Built on Radix UI primitives" is now inaccurate for the Button component; update the documentation in the Button MDX (the Features list) to remove or reword that line to reflect that Button now renders native <button> and <a> elements directly (or explicitly state the current implementation), and ensure any other references to Radix (e.g., guidance about asChild) are removed or adjusted to match the refactored Button component API.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@apps/blog/src/components/PostCard.tsx`:
- Line 5: The import statement in PostCard.tsx currently includes Button which
is never used; remove Button from the import list (leave Badge and Card) or, if
Button is intended to be used, add the intended usage inside the PostCard
component (reference symbol: Button) so the import is necessary; prefer removing
the unused Button import to clean up the file.
In `@packages/eclipse/src/components/button.tsx`:
- Around line 32-34: The asChild prop is declared in ButtonBaseProps and
destructured in the Button component but never used; remove it from the
ButtonBaseProps type and from any destructuring (e.g., where asChild is
referenced) and delete any related unused conditionals or imports so TypeScript
surfaces errors for consumers; if you intended to support Radix Slot-style
composition instead, implement it explicitly (wire Slot from
`@radix-ui/react-slot` into the Button render path) or otherwise remove asChild
everywhere in the file (including prop types, default props, and docs) so the
prop no longer exists.
In `@packages/ui/src/components/web-navigation.tsx`:
- Around line 103-109: The Login/Get started buttons render literal "undefined"
when the optional utm prop is absent; update the href construction in
web-navigation (the two Button elements inside NavigationMenuItem) to build the
query string only when utm is defined (e.g., compute a utmQuery = utm ?
`?utm_source=${utm.source}&utm_medium=${utm.medium}&utm_campaign=${...}` : '' or
use a small helper like buildUtmQuery(utm)) and append utmQuery to the base URLs
so both Login and signup links never include "undefined" values.
---
Nitpick comments:
In `@apps/eclipse/content/design-system/components/button.mdx`:
- Around line 239-248: The docs claim "Built on Radix UI primitives" is now
inaccurate for the Button component; update the documentation in the Button MDX
(the Features list) to remove or reword that line to reflect that Button now
renders native <button> and <a> elements directly (or explicitly state the
current implementation), and ensure any other references to Radix (e.g.,
guidance about asChild) are removed or adjusted to match the refactored Button
component API.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: a00145f3-426c-4289-9dd6-deb2932f8a21
📒 Files selected for processing (8)
apps/blog/content/blog/the-next-evolution-of-prisma-orm/index.mdxapps/blog/next.config.mjsapps/blog/src/app/(blog)/layout.tsxapps/blog/src/components/PostCard.tsxapps/eclipse/content/design-system/components/button.mdxpackages/eclipse/src/components/button.tsxpackages/ui/src/components/navigation-menu.tsxpackages/ui/src/components/web-navigation.tsx
💤 Files with no reviewable changes (1)
- apps/blog/next.config.mjs
Summary by CodeRabbit
New Features
Documentation
Refactor
Chores