feat: update gradient mask classes for consistency across components#78
feat: update gradient mask classes for consistency across components#78
Conversation
📝 WalkthroughWalkthroughThis PR updates Tailwind CSS mask utilities across multiple hero components to use the newer arbitrary value syntax format, and implements concurrent fetch prevention with Changes
Sequence DiagramsequenceDiagram
participant User
participant Page as Posts/Projects Page
participant State as Local State
participant API
User->>Page: Click "Load More"
Page->>State: Check isFetchingRef.current
alt Already Fetching or No More Data
State-->>Page: Return (abort)
Page-->>User: No action
else Safe to Fetch
Page->>State: Set isFetchingRef.current = true
Page->>API: Fetch posts (currentPage)
API-->>Page: Return data + hasMore
Page->>State: Append new posts, increment page
Page->>State: Update hasMore from API
Page->>State: Set isFetchingRef.current = false
Page-->>User: Posts updated
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
📝 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 Tip You can validate your CodeRabbit configuration file in your editor.If your editor has YAML language server, you can enable auto-completion and validation by adding |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/app/projects/page.tsx (1)
153-153: Remove commented-out JSX instead of keeping dead UI fragments.Line 153 leaves stale commented markup in the render path. Prefer deleting it (or replacing with an explicit accessible label if needed) to keep the component clean.
✂️ Minimal cleanup
- {/* <p className="text-xs font-medium">Tag: </p> */}🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/app/projects/page.tsx` at line 153, Remove the dead commented JSX fragment ("{/* <p className=\"text-xs font-medium\">Tag: </p> */}") from the render in the projects page component (page.tsx) to clean up stale markup; if an accessible label is required, replace the comment with an explicit element (e.g., a visible or visually-hidden <p> or <span>) tied to the related UI instead of leaving commented-out JSX.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/app/projects/page.tsx`:
- Line 153: Remove the dead commented JSX fragment ("{/* <p className=\"text-xs
font-medium\">Tag: </p> */}") from the render in the projects page component
(page.tsx) to clean up stale markup; if an accessible label is required, replace
the comment with an explicit element (e.g., a visible or visually-hidden <p> or
<span>) tied to the related UI instead of leaving commented-out JSX.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: b6701fff-61fc-4d12-99e7-df0c44269f2e
📒 Files selected for processing (7)
src/app/contact/page.tsxsrc/app/posts/page.tsxsrc/app/projects/page.tsxsrc/components/heros/contact-hero.tsxsrc/components/heros/home-hero.tsxsrc/components/heros/posts-hero.tsxsrc/components/heros/project-hero.tsx
This pull request introduces several improvements to the infinite scroll functionality for both the posts and projects pages, as well as minor UI and code cleanup adjustments. The most significant changes are the addition of a fetch guard to prevent duplicate requests, dynamic import optimization for the projects hero component, and consistent UI updates across hero components.
Infinite Scroll Improvements
isFetchingRefguard in bothPostsContentandProjectsContentto prevent overlapping fetch requests, ensuring that only one fetch is active at a time and improving performance and reliability. [1] [2] [3] [4]Dynamic Import Optimization
ProjectHeroinsrc/app/projects/page.tsxto a dynamic import withssr: false, improving client-side rendering performance for the projects page.UI Consistency and Cleanup
[mask-image:radial-gradient(...)]tomask-[radial-gradient(...)]in multiple hero components for improved Tailwind CSS compatibility and visual consistency. [1] [2] [3] [4] [5]ProjectHero: changed gradient class, adjusted z-index, added padding, and improved the back button layout for better appearance and accessibility. [1] [2]Summary by CodeRabbit
Bug Fixes
Style
Chores