style: redesign blog page with grid outline and serif typography#6
Conversation
…d precision schematics
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
📝 WalkthroughWalkthroughThe blog index page ( ChangesBlog Page UI Refactor
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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 |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
apps/blogs/app/page.tsx (1)
466-471: ⚡ Quick winReplace raw
<img>with Next.js<Image>for avatar rendering.Both avatar blocks use
<img>, which bypasses Next.js image optimization and can hurt LCP/bandwidth on this page. Prefernext/imagewith explicit sizing andsizes; if these URLs are external, verifyimages.remotePatternsinnext.config.*.Suggested diff
+import Image from 'next/image'; -<img - src={activeArticle.author.avatarUrl} - alt={activeArticle.author.name} - className="object-cover w-full h-full" - referrerPolicy="no-referrer" -/> +<Image + src={activeArticle.author.avatarUrl} + alt={activeArticle.author.name} + width={40} + height={40} + sizes="40px" + className="object-cover w-full h-full" + referrerPolicy="no-referrer" +/> -<img - src={post.author.avatarUrl} - alt={post.author.name} - className="object-cover w-full h-full" - referrerPolicy="no-referrer" -/> +<Image + src={post.author.avatarUrl} + alt={post.author.name} + width={32} + height={32} + sizes="32px" + className="object-cover w-full h-full" + referrerPolicy="no-referrer" +/>Also applies to: 671-676
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@apps/blogs/app/page.tsx` around lines 466 - 471, Replace the raw `<img>` tags used for rendering `activeArticle.author.avatarUrl` (occurring at both avatar blocks around lines 466-471 and 671-676) with the Next.js `<Image>` component from next/image. Import `Image` from next/image and replace the img elements with Image components, ensuring you add explicit width and height attributes (e.g., width={40} height={40}), a sizes prop appropriate for the layout, and keep the alt text from `activeArticle.author.name`. If the avatarUrl is an external URL, verify that images.remotePatterns is properly configured in next.config.js to allow that domain. Adjust or remove the referrerPolicy attribute as needed since it may not be directly supported on the Image component (handle it at the parent level if necessary).Source: Linters/SAST tools
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In `@apps/blogs/app/page.tsx`:
- Around line 466-471: Replace the raw `<img>` tags used for rendering
`activeArticle.author.avatarUrl` (occurring at both avatar blocks around lines
466-471 and 671-676) with the Next.js `<Image>` component from next/image.
Import `Image` from next/image and replace the img elements with Image
components, ensuring you add explicit width and height attributes (e.g.,
width={40} height={40}), a sizes prop appropriate for the layout, and keep the
alt text from `activeArticle.author.name`. If the avatarUrl is an external URL,
verify that images.remotePatterns is properly configured in next.config.js to
allow that domain. Adjust or remove the referrerPolicy attribute as needed since
it may not be directly supported on the Image component (handle it at the parent
level if necessary).
This PR redesigns the Blog index layout to use a modern grid outline system, Instrument Serif display typography, and high-fidelity schematic blueprint drawings. Closes HAL-332
Summary by CodeRabbit