-
Notifications
You must be signed in to change notification settings - Fork 403
Enhance About Us page with animations and layout #2701
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Added intersection observer for animations and improved layout with responsive design.
|
@sarangmenon947 is attempting to deploy a commit to the Vivek Prajapati's projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThe AboutUs component is refactored to implement visibility-triggered animations using IntersectionObserver. React hooks (useState, useEffect) manage animation state and observer lifecycle. Content is reorganized into responsive, animated sections with gradient styling and improved accessibility attributes. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/User/pages/AboutUs/Aboutus.jsx (1)
32-44: Consider extracting a reusable animated wrapper component.The animation pattern (lines 32-44, 47-55, 69-77, etc.) is repeated throughout the file with minor variations in direction and delay. A reusable component could reduce duplication:
🔎 Example refactor
// AnimatedSection.jsx const AnimatedSection = ({ id, isVisible, direction = 'up', delay = 0, children }) => { const directionClasses = { up: 'translate-y-10', down: '-translate-y-10', left: '-translate-x-10', right: 'translate-x-10', }; return ( <div id={id} data-animate className={`transition-all duration-1000 ${delay ? `delay-${delay}` : ''} ${ isVisible[id] ? 'opacity-100 translate-x-0 translate-y-0' : `opacity-0 ${directionClasses[direction]}` }`} > {children} </div> ); };This would simplify usage to:
<AnimatedSection id="mission-title" isVisible={isVisible} direction="up"> <h1>...</h1> </AnimatedSection>
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/User/pages/AboutUs/Aboutus.jsx
🔇 Additional comments (2)
src/User/pages/AboutUs/Aboutus.jsx (2)
9-26: IntersectionObserver implementation looks good.The observer correctly:
- Sets up on mount after DOM elements are available
- Uses a reasonable 0.1 threshold for triggering animations
- Cleans up properly with
disconnect()on unmountThe one-way animation (visibility only transitions to
true, never back tofalse) is appropriate for this "animate on first scroll into view" pattern.
81-90: Good accessibility and performance practices on the iframe.The embedded video includes:
loading="lazy"for deferred loadingaria-labelfor screen reader context- Muted autoplay which respects browser autoplay policies
- Proper
referrerPolicyfor security
| : "opacity-0 -translate-x-10" | ||
| }`} | ||
| > | ||
| <div className="rounded-2xl overflow-hidden shadow-2xl hover:shadow-3xl transition-all duration-300 hover:scale-105"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🧩 Analysis chain
🏁 Script executed:
# Find Tailwind configuration files
fd -t f "tailwind.config" --type fileRepository: codervivek5/VigyBag
Length of output: 81
🏁 Script executed:
# Also check for tailwind.config.ts which is common
fd -t f -e js -e ts | grep -i tailwind | head -20Repository: codervivek5/VigyBag
Length of output: 81
🏁 Script executed:
# Look at package.json to understand Tailwind version
cat package.json 2>/dev/null | grep -A 2 -B 2 tailwindcssRepository: codervivek5/VigyBag
Length of output: 189
🏁 Script executed:
# Examine the actual file mentioned in the review
head -n 270 src/User/pages/AboutUs/Aboutus.jsx | tail -n +120Repository: codervivek5/VigyBag
Length of output: 7168
🏁 Script executed:
# Read the tailwind.config.js file to check for shadow-3xl definition
cat tailwind.config.jsRepository: codervivek5/VigyBag
Length of output: 698
Define shadow-3xl in Tailwind config or use hover:shadow-2xl.
shadow-3xl is not a default Tailwind utility class and is not defined in your tailwind.config.js. This class (used on lines 127, 226, and 267) will have no effect unless defined. Either define it as a custom utility in tailwind.config.js or replace with hover:shadow-2xl, the largest built-in shadow.
🤖 Prompt for AI Agents
In src/User/pages/AboutUs/Aboutus.jsx around lines 127, 226, and 267, the class
"hover:shadow-3xl" is not a default Tailwind utility and therefore has no
effect; fix by either (A) replacing "hover:shadow-3xl" with the built-in
"hover:shadow-2xl" on those lines, or (B) add a custom shadow entry under
theme.extend.boxShadow in tailwind.config.js (give it a name like "3xl" and a
valid box-shadow value) and rebuild so "hover:shadow-3xl" becomes available.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll look onto it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@sarangmenon947, sounds good! Let me know if you need any clarification on the fix. 👍
| <div className="bg-gradient-to-r from-blue-50 to-white rounded-xl p-6 shadow-lg hover:shadow-xl transition-all duration-300 border-l-4 border-blue-500"> | ||
| <h3 className="font-bold text-2xl text-blue-600 mb-3">Transparency</h3> | ||
| <p className="text-lg text-slate-700 leading-relaxed"> | ||
| We believe in being open and honest with our customers. You can trust that when you shop with <span className="text-green-700 font-bold">VigyBag</span> you're getting authentic, high-quality products made with care. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor: Missing comma in text.
The sentence should have a comma after "VigyBag":
- You can trust that when you shop with <span className="text-green-700 font-bold">VigyBag</span> you're getting authentic
+ You can trust that when you shop with <span className="text-green-700 font-bold">VigyBag</span>, you're getting authentic📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| We believe in being open and honest with our customers. You can trust that when you shop with <span className="text-green-700 font-bold">VigyBag</span> you're getting authentic, high-quality products made with care. | |
| We believe in being open and honest with our customers. You can trust that when you shop with <span className="text-green-700 font-bold">VigyBag</span>, you're getting authentic, high-quality products made with care. |
🤖 Prompt for AI Agents
In src/User/pages/AboutUs/Aboutus.jsx around line 304, the displayed sentence is
missing a comma after "VigyBag"; update the JSX text to insert a comma so it
reads "...shop with VigyBag, you're getting..." ensuring spacing and punctuation
are correct within the surrounding string/JSX element.
Added intersection observer for animations and improved layout with responsive design.
Fixes Issue
Changes proposed
Screenshots
Note to reviewers
Summary by CodeRabbit
New Features
Style
✏️ Tip: You can customize this high-level summary in your review settings.