Skip to content

fix(site): minor nits#7771

Merged
mhartington merged 1 commit intomainfrom
nits
Apr 2, 2026
Merged

fix(site): minor nits#7771
mhartington merged 1 commit intomainfrom
nits

Conversation

@mhartington
Copy link
Copy Markdown
Member

@mhartington mhartington commented Apr 2, 2026

Summary by CodeRabbit

  • Performance Improvements

    • Critical images and videos throughout the site now load eagerly instead of on-demand, improving perceived performance and initial page display
    • Video player component now supports eager loading configuration for time-sensitive content
  • Updates

    • Numeric statistics throughout the site now display without animation effects for clearer, more immediate data presentation

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 2, 2026

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

Project Deployment Actions Updated (UTC)
blog Ready Ready Preview, Comment Apr 2, 2026 8:07pm
docs Ready Ready Preview, Comment Apr 2, 2026 8:07pm
eclipse Ready Ready Preview, Comment Apr 2, 2026 8:07pm
site Ready Ready Preview, Comment Apr 2, 2026 8:07pm

Request Review

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 2, 2026

Walkthrough

The PR updates image and iframe loading behavior from lazy to eager across multiple components, adds a React key prop for list rendering, replaces FontAwesome script injection method, removes the animated numbers library in favor of plain spans, and extends the YouTubePlayer component with a configurable loading prop.

Changes

Cohort / File(s) Summary
Image & Iframe Loading Optimization
apps/site/src/components/homepage/bento.tsx, apps/site/src/components/postgres.tsx, apps/site/src/app/orm/page.tsx
Changed next/image and YouTubePlayer loading attribute from "lazy" to "eager", affecting six image variants and iframe load timing.
YouTubePlayer Component Enhancement
packages/ui/src/components/youtube-player.tsx
Added optional loading prop with type `"eager"
Script & Animation Refactoring
apps/site/src/app/layout.tsx, apps/site/src/components/orm/info-stats.tsx
Replaced next/script component with raw <script> tag for FontAwesome injection; removed react-animated-numbers dependency, replacing with plain <span> element and shared CSS properties.
React List Rendering
apps/site/src/components/ecosystem/grid.tsx
Added React key={filter} prop to mapped container div; updated Tailwind z-index syntax from after:z-[10000] to after:z-10000.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 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 'fix(site): minor nits' is too vague and generic, using the non-descriptive term 'nits' without clarifying the actual changes across six files. Revise the title to reflect the primary change—consider 'fix(site): improve image loading and component optimization' or similar to better summarize the substantive updates.
✅ 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.


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.

@argos-ci
Copy link
Copy Markdown

argos-ci bot commented Apr 2, 2026

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No changes detected - Apr 2, 2026, 8:14 PM

Copy link
Copy Markdown
Contributor

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
apps/site/src/components/postgres.tsx (1)

67-116: ⚠️ Potential issue | 🟠 Major

Eager-load only the visible image variant, not all six.

With CSS display:none or hidden, Next.js Image will still download the image if loading="eager" is set. Since only one variant is visible at a time based on viewport and theme, you're unnecessarily fetching 5 extra image files per tab. If there are multiple tabs, this multiplies: a 5-tab component loads 30 images eagerly instead of 6, consuming bandwidth and delaying critical resources.

Use loading="lazy" for all variants (or set eager conditionally only for the active tab's visible variant) to prevent over-fetching.

Suggested fix

Replace all six instances of loading="eager" (lines 72, 80, 88, 98, 106, 114) with loading="lazy":

-                            loading="eager"
+                            loading="lazy"

Or, for maximum control: conditionally set loading="eager" only when the tab is active and the viewport/theme matches the image variant (requires state tracking).

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

In `@apps/site/src/components/postgres.tsx` around lines 67 - 116, The Image
elements rendering theme/viewport variants (the <Image> instances using
src={`${body.image}...`} and the loading prop) are all set to loading="eager",
causing all six variants to be downloaded even when hidden; change each
variant's loading prop to "lazy" (or implement logic to set loading="eager" only
for the currently active tab/visible variant) so only the visible image is
eagerly fetched—locate the <Image> usages that reference body.image,
body.image_tablet, body.image_mobile and their _light counterparts and update
the loading attribute accordingly.
🧹 Nitpick comments (2)
apps/site/src/app/layout.tsx (1)

152-155: Consider adding async to prevent render-blocking.

Switching from next/script to a raw <script> tag without async or defer makes this script render-blocking—the browser will pause HTML parsing until FontAwesome fully loads and executes. This can hurt your Largest Contentful Paint (LCP) and First Contentful Paint (FCP) metrics.

FontAwesome kit scripts are designed to work asynchronously. Unless there's a specific need for synchronous loading (e.g., icons must be visible before first paint), adding async is recommended:

⚡ Proposed fix to add async loading
        <script
+         async
          src={WebFA}
          crossOrigin="anonymous" 
          data-auto-add-css="false" />

Alternatively, if you moved away from next/script due to compatibility issues with the data-auto-add-css attribute, you could also use next/script with strategy="afterInteractive" or strategy="lazyOnload" for better loading orchestration:

<Script
  src={WebFA}
  crossOrigin="anonymous"
  data-auto-add-css="false"
  strategy="afterInteractive"
/>
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@apps/site/src/app/layout.tsx` around lines 152 - 155, The FontAwesome script
included via the raw JSX <script ... /> using the WebFA variable is
render-blocking; update the script element in layout.tsx to load asynchronously
by adding the async attribute to the <script src={WebFA} crossOrigin="anonymous"
data-auto-add-css="false" /> tag (or replace it with next/script's <Script
src={WebFA} crossOrigin="anonymous" data-auto-add-css="false"
strategy="afterInteractive" /> if you prefer Next.js loading strategies) so the
kit does not block HTML parsing and improves FCP/LCP.
apps/site/src/components/orm/info-stats.tsx (1)

2-2: Remove react-animated-numbers from apps/site/package.json.

This dependency is no longer used in the codebase. Eliminating it reduces unnecessary supply-chain surface and keeps your dependency graph lean.

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

In `@apps/site/src/components/orm/info-stats.tsx` at line 2, Remove the unused
dependency "react-animated-numbers" from the site app's package.json by deleting
its entry from dependencies/devDependencies, then run your package manager
(npm/yarn/pnpm) to update the lockfile and node_modules; also search the
codebase for any remaining imports or references (e.g., in info-stats.tsx) and
remove them so the project builds/tests cleanly after the package removal.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@apps/site/src/components/postgres.tsx`:
- Around line 67-116: The Image elements rendering theme/viewport variants (the
<Image> instances using src={`${body.image}...`} and the loading prop) are all
set to loading="eager", causing all six variants to be downloaded even when
hidden; change each variant's loading prop to "lazy" (or implement logic to set
loading="eager" only for the currently active tab/visible variant) so only the
visible image is eagerly fetched—locate the <Image> usages that reference
body.image, body.image_tablet, body.image_mobile and their _light counterparts
and update the loading attribute accordingly.

---

Nitpick comments:
In `@apps/site/src/app/layout.tsx`:
- Around line 152-155: The FontAwesome script included via the raw JSX <script
... /> using the WebFA variable is render-blocking; update the script element in
layout.tsx to load asynchronously by adding the async attribute to the <script
src={WebFA} crossOrigin="anonymous" data-auto-add-css="false" /> tag (or replace
it with next/script's <Script src={WebFA} crossOrigin="anonymous"
data-auto-add-css="false" strategy="afterInteractive" /> if you prefer Next.js
loading strategies) so the kit does not block HTML parsing and improves FCP/LCP.

In `@apps/site/src/components/orm/info-stats.tsx`:
- Line 2: Remove the unused dependency "react-animated-numbers" from the site
app's package.json by deleting its entry from dependencies/devDependencies, then
run your package manager (npm/yarn/pnpm) to update the lockfile and
node_modules; also search the codebase for any remaining imports or references
(e.g., in info-stats.tsx) and remove them so the project builds/tests cleanly
after the package removal.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: dbdfab4a-b91d-498d-b386-b82172f676cb

📥 Commits

Reviewing files that changed from the base of the PR and between 34ad32b and f21173a.

📒 Files selected for processing (7)
  • apps/site/src/app/layout.tsx
  • apps/site/src/app/orm/page.tsx
  • apps/site/src/components/ecosystem/grid.tsx
  • apps/site/src/components/homepage/bento.tsx
  • apps/site/src/components/orm/info-stats.tsx
  • apps/site/src/components/postgres.tsx
  • packages/ui/src/components/youtube-player.tsx

@mhartington mhartington merged commit 52a04ba into main Apr 2, 2026
18 checks passed
@mhartington mhartington deleted the nits branch April 2, 2026 21:05
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