Skip to content

Conversation

@NiallJoeMaher
Copy link
Contributor

Also replace Children.toArray with Array.from for loading components

@NiallJoeMaher NiallJoeMaher requested a review from a team as a code owner December 28, 2025 09:17
@vercel
Copy link

vercel bot commented Dec 28, 2025

@NiallJoeMaher is attempting to deploy a commit to the Codú Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 28, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Replaced React.Children.toArray with explicit Array.from/map rendering (adding keys) for loading placeholders across components; added serverExternalPackages: ["jsdom", "isomorphic-dompurify"] to Next.js config; updated next-env.d.ts import to ./.next/dev/types/routes.d.ts.

Changes

Cohort / File(s) Summary
App loading placeholders
app/(app)/articles/_client.tsx, app/(app)/notifications/_client.tsx, app/(app)/saved/_client.tsx
Removed React.Children import and Children.toArray(...); use Array.from / array map to render 7 loading placeholders with explicit key props.
Shared component skeletons
components/SideBar/SideBarSavedPosts.tsx, components/TrendingPosts/TrendingPostsLoading.tsx
Replaced Children.toArray with direct mapping (Array.from/map) to render loading skeletons; removed Children import and added stable key values.
Next.js configuration
next.config.js
Added serverExternalPackages: ["jsdom", "isomorphic-dompurify"] to exclude these packages from server bundling.
Type declarations
next-env.d.ts
Changed import path from ./.next/types/routes.d.ts to ./.next/dev/types/routes.d.ts.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • Add jsdom to external packages #1315 — Makes the same replacements of React.Children.toArray with Array.from across components and adds jsdom/isomorphic-dompurify to serverExternalPackages.

Suggested labels

hacktoberfest-accepted, hacktoberfest

Poem

🐇 I hopped through components, tidy and spry,
Replaced Children wraps with Array.from — oh my!
Keys now in place, placeholders hum,
Config and types nudged, the build stays calm. 🥕

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The PR description is incomplete and does not follow the provided template structure; it lacks required sections like issue reference, detailed PR details, breaking changes, and screenshots. Update the description to follow the template: include issue reference (Fixes #...), detailed bullet-point description of changes, explicit breaking changes statement, and screenshot/gif sections.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add jsdom to external packages' accurately summarizes one main change (adding jsdom to next.config.js), but the PR also makes equally significant changes across multiple files by replacing React.Children.toArray with Array.from.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3496bad and 88606c5.

📒 Files selected for processing (5)
  • app/(app)/articles/_client.tsx
  • app/(app)/notifications/_client.tsx
  • app/(app)/saved/_client.tsx
  • next-env.d.ts
  • next.config.js

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.

@vercel
Copy link

vercel bot commented Dec 28, 2025

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

Project Deployment Review Updated (UTC)
codu Ready Ready Preview, Comment Dec 28, 2025 9:19am

pkspyder007
pkspyder007 previously approved these changes Dec 28, 2025
@NiallJoeMaher NiallJoeMaher merged commit 775b5c8 into codu-code:develop Dec 28, 2025
4 of 5 checks passed
@NiallJoeMaher NiallJoeMaher deleted the bugfix/broken-article-pages branch December 28, 2025 09:23
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.

2 participants