Skip to content

feat: Update shadcn ui 4#691

Draft
aXenDeveloper wants to merge 4 commits into
canaryfrom
update-shadcn-4
Draft

feat: Update shadcn ui 4#691
aXenDeveloper wants to merge 4 commits into
canaryfrom
update-shadcn-4

Conversation

@aXenDeveloper
Copy link
Copy Markdown
Owner

Improving Documentation

Description

What?

Why?

@vercel
Copy link
Copy Markdown

vercel Bot commented May 17, 2026

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

Project Deployment Actions Updated (UTC)
vitnode-docs Ready Ready Preview, Comment May 23, 2026 7:49pm

@github-actions github-actions Bot added the 💡 Feature A new feature label May 17, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request overhauls the UI component library by adding new components like Carousel and Chart, and updating existing ones to a new design style using Radix UI primitives and OKLCH color variables. The review identified a critical logic error in the Field component where an async function is incorrectly passed to useMemo, which will lead to incorrect rendering behavior. Additionally, several hardcoded strings in the Pagination and Sidebar components should be externalized to the translation files to ensure proper internationalization support.

Comment on lines +184 to +185
// eslint-disable-next-line react-hooks/use-memo, @eslint-react/use-memo
const content = useMemo(async () => {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

critical

The useMemo callback is marked as async, which is invalid. useMemo expects a synchronous function that returns a value. An async function returns a Promise, which cannot be rendered directly in a client component and will cause the if (!content) check on line 213 to always be false (as a Promise object is truthy). Since the logic inside the callback is synchronous, the async keyword should be removed.

References
  1. React hooks like useMemo must have synchronous callbacks to return the computed value immediately for rendering.

Comment thread packages/vitnode/src/components/ui/pagination.tsx
Comment thread packages/vitnode/src/components/ui/pagination.tsx
Comment thread packages/vitnode/src/components/ui/sidebar.tsx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

💡 Feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant