-
Notifications
You must be signed in to change notification settings - Fork 62
footer section improvement #189
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
base: main
Are you sure you want to change the base?
footer section improvement #189
Conversation
WalkthroughReplaces Footer.tsx with a responsive two-column grid layout, gradient overlays/accents, branded GitHub block, quick links using anchor tags, lucide-react icons (Github, Mail, Info), decorative divider, and updated copyright line; component signature and default export unchanged. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Assessment against linked issues
Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. CodeRabbit Commands (Invoked using PR/Issue comments)Type Other keywords and placeholders
CodeRabbit Configuration File (
|
✅ Deploy Preview for github-spy ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
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: 1
🧹 Nitpick comments (3)
src/components/Footer.tsx (3)
103-110: Consider reducing animation complexity for accessibilityThe animated dots with staggered delays might be distracting for users with attention disorders or those sensitive to motion. Consider adding a reduced motion check.
Apply this diff to respect user's motion preferences:
{[...Array(3)].map((_, i) => ( <div key={i} - className="w-1 h-1 rounded-full bg-blue-500 animate-pulse" + className="w-1 h-1 rounded-full bg-blue-500 motion-safe:animate-pulse" style={{ animationDelay: `${i * 0.2}s` }} ></div> ))}
115-116: Remove or reduce decorative animations for better performanceThe floating animated elements don't add functional value and may impact performance on lower-end devices. Consider removing them or making them static.
Consider removing these purely decorative animated elements:
- {/* Floating elements */} - <div className="absolute top-4 right-4 w-2 h-2 rounded-full bg-blue-400/30 animate-ping"></div> - <div className="absolute bottom-4 left-4 w-1 h-1 rounded-full bg-purple-400/40 animate-pulse"></div>Or if you want to keep them, make them respect motion preferences:
- <div className="absolute top-4 right-4 w-2 h-2 rounded-full bg-blue-400/30 animate-ping"></div> - <div className="absolute bottom-4 left-4 w-1 h-1 rounded-full bg-purple-400/40 animate-pulse"></div> + <div className="absolute top-4 right-4 w-2 h-2 rounded-full bg-blue-400/30 motion-safe:animate-ping"></div> + <div className="absolute bottom-4 left-4 w-1 h-1 rounded-full bg-purple-400/40 motion-safe:animate-pulse"></div>
94-94: Remove bouncing animation from copyright symbolThe bouncing copyright symbol is unnecessary and might be perceived as unprofessional. Static text would be more appropriate for legal notices.
- <span className="inline-block animate-bounce mr-1">©</span> + <span className="mr-1">©</span>
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/Footer.tsx(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/components/Footer.tsx (1)
src/App.tsx (1)
App(8-42)
🔇 Additional comments (1)
src/components/Footer.tsx (1)
6-121: Excellent implementation of footer redesign objectivesThe new footer successfully addresses all the requirements from issue #188:
- Modern gradient backgrounds and hover effects create an attractive, professional look
- Typography hierarchy with proper font weights and sizes improves readability
- Color palette aligns well with the theme using gradient text and backgrounds
- Grid layout with proper spacing creates clean organization
- Social/GitHub links included in Brand and Connect sections
- Responsive grid (grid-cols-1 to md:grid-cols-[1.5fr_1fr_1fr]) ensures mobile compatibility
- Visual separation achieved through borders, gradient dividers, and section spacing
The component maintains its export signature and integrates seamlessly with the existing layout.
| { href: '/about', icon: Info, text: 'About Us' }, | ||
| { href: '/contact', icon: Mail, text: 'Contact' }, | ||
| ].map((link, index) => ( | ||
| <a | ||
| key={index} | ||
| href={link.href} | ||
| className="group flex items-center space-x-2 text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-all duration-300 transform hover:translate-x-1" | ||
| > | ||
| <link.icon className="h-4 w-4 group-hover:scale-110 transition-transform duration-200" /> | ||
| <span className="relative"> | ||
| {link.text} | ||
| <div className="absolute -bottom-0.5 left-0 w-0 h-0.5 bg-blue-500 group-hover:w-full transition-all duration-300"></div> | ||
| </span> | ||
| </a> | ||
| ))} | ||
| </div> |
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.
Fix broken internal navigation links
The Quick Links section uses regular anchor tags (<a href="/about">, <a href="/contact">) for internal navigation, which will cause full page reloads in a React Router application. Based on the App.tsx file showing React Router is in use, these should be using React Router's Link component for client-side navigation.
Apply this diff to fix the navigation:
-import React from 'react';
-import { Github, Mail, Info } from 'lucide-react';
+import React from 'react';
+import { Github, Mail, Info } from 'lucide-react';
+import { Link } from 'react-router-dom';- {[
- { href: '/about', icon: Info, text: 'About Us' },
- { href: '/contact', icon: Mail, text: 'Contact' },
- ].map((link, index) => (
- <a
- key={index}
- href={link.href}
- className="group flex items-center space-x-2 text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-all duration-300 transform hover:translate-x-1"
- >
+ {[
+ { to: '/about', icon: Info, text: 'About Us' },
+ { to: '/contact', icon: Mail, text: 'Contact' },
+ ].map((link, index) => (
+ <Link
+ key={index}
+ to={link.to}
+ className="group flex items-center space-x-2 text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-all duration-300 transform hover:translate-x-1"
+ >
<link.icon className="h-4 w-4 group-hover:scale-110 transition-transform duration-200" />
<span className="relative">
{link.text}
<div className="absolute -bottom-0.5 left-0 w-0 h-0.5 bg-blue-500 group-hover:w-full transition-all duration-300"></div>
</span>
- </a>
+ </Link>
))}📝 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.
| { href: '/about', icon: Info, text: 'About Us' }, | |
| { href: '/contact', icon: Mail, text: 'Contact' }, | |
| ].map((link, index) => ( | |
| <a | |
| key={index} | |
| href={link.href} | |
| className="group flex items-center space-x-2 text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-all duration-300 transform hover:translate-x-1" | |
| > | |
| <link.icon className="h-4 w-4 group-hover:scale-110 transition-transform duration-200" /> | |
| <span className="relative"> | |
| {link.text} | |
| <div className="absolute -bottom-0.5 left-0 w-0 h-0.5 bg-blue-500 group-hover:w-full transition-all duration-300"></div> | |
| </span> | |
| </a> | |
| ))} | |
| </div> | |
| // src/components/Footer.tsx | |
| import React from 'react'; | |
| import { Github, Mail, Info } from 'lucide-react'; | |
| import { Link } from 'react-router-dom'; | |
| … | |
| <div className="space-y-2"> | |
| {[ | |
| { to: '/about', icon: Info, text: 'About Us' }, | |
| { to: '/contact', icon: Mail, text: 'Contact' }, | |
| ].map((link, index) => ( | |
| <Link | |
| key={index} | |
| to={link.to} | |
| className="group flex items-center space-x-2 text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-all duration-300 transform hover:translate-x-1" | |
| > | |
| <link.icon className="h-4 w-4 group-hover:scale-110 transition-transform duration-200" /> | |
| <span className="relative"> | |
| {link.text} | |
| <div className="absolute -bottom-0.5 left-0 w-0 h-0.5 bg-blue-500 group-hover:w-full transition-all duration-300"></div> | |
| </span> | |
| </Link> | |
| ))} | |
| </div> |
🤖 Prompt for AI Agents
In src/components/Footer.tsx around lines 44 to 59, the Quick Links currently
render internal anchors which trigger full page reloads; replace the <a> tags
with React Router's Link component (use the "to" prop instead of "href"), keep
the same className, child icon and span structure, and preserve key={index};
also add an import for Link from "react-router-dom" at the top of the file (or
extend the existing import) so the component uses client-side navigation.
|
@Vidhi-Ajmera16355 : padding and margin looks big. Please reduce 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.
Actionable comments posted: 3
♻️ Duplicate comments (1)
src/components/Footer.tsx (1)
1-2: Use React Router’s Link for internal navigation (prevents full page reloads) and add semantic list structure for a11y.Internal anchors will trigger full page reloads in a React Router app. Replace them with Link, and wrap the list in nav/ul/li for improved semantics and keyboard navigation.
Apply this diff:
import React from 'react'; -import { Github, Mail, Info } from 'lucide-react'; +import { Github, Mail, Info } from 'lucide-react'; +import { Link } from 'react-router-dom';- {/* Quick Links */} - <div className="space-y-3"> - <h3 className="font-semibold tracking-wide text-gray-900 dark:text-white border-b border-gray-200 dark:border-gray-700 pb-1"> - Quick Links - </h3> - <div className="space-y-1"> - {[ - { href: '/about', icon: Info, text: 'About Us' }, - { href: '/contact', icon: Mail, text: 'Contact' }, - ].map((link, index) => ( - <a - key={index} - href={link.href} - className="flex items-center space-x-2 text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-300" - > - <link.icon className="h-4 w-4" /> - <span>{link.text}</span> - </a> - ))} - </div> - </div> + {/* Quick Links */} + <nav aria-label="Quick links" className="space-y-3"> + <h3 className="font-semibold tracking-wide text-gray-900 dark:text-white border-b border-gray-200 dark:border-gray-700 pb-1"> + Quick Links + </h3> + <ul className="space-y-1"> + {[ + { to: '/about', icon: Info, text: 'About Us' }, + { to: '/contact', icon: Mail, text: 'Contact' }, + ].map((link, index) => ( + <li key={index}> + <Link + to={link.to} + className="flex items-center space-x-2 text-gray-600 dark:text-gray-400 hover:text-blue-600 dark:hover:text-blue-400 transition-colors duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-gray-900 rounded" + > + <link.icon className="h-4 w-4" /> + <span>{link.text}</span> + </Link> + </li> + ))} + </ul> + </nav>Also applies to: 40-52
🧹 Nitpick comments (3)
src/components/Footer.tsx (3)
16-28: Remove redundant wrapper div with unused “group” class.This wrapper adds DOM with no stylistic effect.
- <div className="group"> - <a + <a href="https://github.com/GitMetricsLab/github_tracker" target="_blank" rel="noopener noreferrer" className="inline-flex items-center space-x-3 text-lg font-bold text-gray-900 dark:text-white hover:text-blue-600 dark:hover:text-blue-400 transition-all duration-300" > <Github className="h-7 w-7" /> <span className="bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"> GitHub Tracker </span> - </a> - </div> + </a>
4-6: Micro: compute the year once per render.Avoids re-allocating Date on each reconciliation.
function Footer() { - return ( + const year = new Date().getFullYear(); + return (- © {new Date().getFullYear()}{' '} + © {year}{' '}Also applies to: 70-70
34-38: Clarify scope of “Connect/Social” vs Issue #188 objective.The linked issue asks to include social icons, but a reviewer requested removing the “connect” section. Confirm product decision: omit socials for minimalism, or re-introduce a compact, unobtrusive social row under the brand block.
If you opt to re-introduce socials, I can provide a minimal Tailwind snippet (GitHub/Twitter/LinkedIn) aligned with your spacing constraints. Do you want me to generate it?
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/components/Footer.tsx(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
src/components/Footer.tsx (2)
src/pages/About/About.tsx (2)
div(22-85)feature(67-80)src/components/Features.tsx (1)
features(3-78)
| {/* Gradient overlay */} | ||
| <div className="absolute inset-0 bg-gradient-to-r from-blue-50/50 via-transparent to-purple-50/50 dark:from-blue-900/10 dark:via-transparent dark:to-purple-900/10"></div> |
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.
🛠️ Refactor suggestion
Mark decorative overlay as non-interactive and hidden from assistive tech.
Prevents accidental click interception and reduces SR noise.
- <div className="absolute inset-0 bg-gradient-to-r from-blue-50/50 via-transparent to-purple-50/50 dark:from-blue-900/10 dark:via-transparent dark:to-purple-900/10"></div>
+ <div
+ className="absolute inset-0 pointer-events-none bg-gradient-to-r from-blue-50/50 via-transparent to-purple-50/50 dark:from-blue-900/10 dark:via-transparent dark:to-purple-900/10"
+ aria-hidden="true"
+ ></div>📝 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.
| {/* Gradient overlay */} | |
| <div className="absolute inset-0 bg-gradient-to-r from-blue-50/50 via-transparent to-purple-50/50 dark:from-blue-900/10 dark:via-transparent dark:to-purple-900/10"></div> | |
| {/* Gradient overlay */} | |
| <div | |
| className="absolute inset-0 pointer-events-none bg-gradient-to-r from-blue-50/50 via-transparent to-purple-50/50 dark:from-blue-900/10 dark:via-transparent dark:to-purple-900/10" | |
| aria-hidden="true" | |
| ></div> |
🤖 Prompt for AI Agents
In src/components/Footer.tsx around lines 7 to 8, the decorative gradient
overlay should be made non-interactive and hidden from assistive tech: add
aria-hidden="true" and role="presentation" to the overlay div, ensure it cannot
receive pointer events by adding the Tailwind class pointer-events-none, and
make it unfocusable by setting tabIndex={-1}; keep it purely decorative with no
meaningful DOM change otherwise.
| <div className="relative w-full max-w-7xl mx-auto px-4 py-6 md:py-8"> | ||
| {/* Main Footer Content */} | ||
| <div className="grid grid-cols-1 md:grid-cols-[1.5fr_1fr] gap-8 mb-6 items-start"> |
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.
🛠️ Refactor suggestion
Apply reviewer feedback: tighten vertical rhythm (padding/gap).
Reduces excessive whitespace per feedback while keeping clarity.
- <div className="relative w-full max-w-7xl mx-auto px-4 py-6 md:py-8">
+ <div className="relative w-full max-w-7xl mx-auto px-4 py-4 md:py-6">
{/* Main Footer Content */}
- <div className="grid grid-cols-1 md:grid-cols-[1.5fr_1fr] gap-8 mb-6 items-start">
+ <div className="grid grid-cols-1 md:grid-cols-[1.5fr_1fr] gap-6 mb-4 items-start">📝 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.
| <div className="relative w-full max-w-7xl mx-auto px-4 py-6 md:py-8"> | |
| {/* Main Footer Content */} | |
| <div className="grid grid-cols-1 md:grid-cols-[1.5fr_1fr] gap-8 mb-6 items-start"> | |
| <div className="relative w-full max-w-7xl mx-auto px-4 py-4 md:py-6"> | |
| {/* Main Footer Content */} | |
| <div className="grid grid-cols-1 md:grid-cols-[1.5fr_1fr] gap-6 mb-4 items-start"> |
🤖 Prompt for AI Agents
In src/components/Footer.tsx around lines 10 to 12, the footer vertical spacing
is too large; reduce padding and grid gap to tighten the vertical rhythm: change
the container padding from px-4 py-6 md:py-8 to something smaller (for example
px-4 py-4 md:py-6) and reduce the grid gap from gap-8 mb-6 to gap-6 mb-4 so the
footer keeps clarity but with less vertical whitespace.
| className="inline-flex items-center space-x-3 text-lg font-bold text-gray-900 dark:text-white hover:text-blue-600 dark:hover:text-blue-400 transition-all duration-300" | ||
| > | ||
| <Github className="h-7 w-7" /> | ||
| <span className="bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"> | ||
| GitHub Tracker | ||
| </span> | ||
| </a> |
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.
🛠️ Refactor suggestion
Add focus-visible styles to external link for keyboard accessibility.
- className="inline-flex items-center space-x-3 text-lg font-bold text-gray-900 dark:text-white hover:text-blue-600 dark:hover:text-blue-400 transition-all duration-300"
+ className="inline-flex items-center space-x-3 text-lg font-bold text-gray-900 dark:text-white hover:text-blue-600 dark:hover:text-blue-400 transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-gray-900 rounded"📝 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.
| className="inline-flex items-center space-x-3 text-lg font-bold text-gray-900 dark:text-white hover:text-blue-600 dark:hover:text-blue-400 transition-all duration-300" | |
| > | |
| <Github className="h-7 w-7" /> | |
| <span className="bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"> | |
| GitHub Tracker | |
| </span> | |
| </a> | |
| className="inline-flex items-center space-x-3 text-lg font-bold text-gray-900 dark:text-white hover:text-blue-600 dark:hover:text-blue-400 transition-all duration-300 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2 dark:focus-visible:ring-offset-gray-900 rounded" | |
| > | |
| <Github className="h-7 w-7" /> | |
| <span className="bg-gradient-to-r from-blue-600 to-purple-600 bg-clip-text text-transparent"> | |
| GitHub Tracker | |
| </span> | |
| </a> |
🤖 Prompt for AI Agents
In src/components/Footer.tsx around lines 21 to 27, the external anchor lacks
focus-visible styles making it hard to navigate by keyboard; add keyboard-focus
styles to the anchor (e.g., focus:outline-none plus focus-visible:ring-2,
focus-visible:ring-offset-2, a visible ring color that works in both light/dark
like focus-visible:ring-blue-500 and dark:focus-visible:ring-blue-400, and an
appropriate focus-visible:rounded class) so keyboard users see a clear focus
indicator while preserving existing hover styles.
Related Issue
Description
Improved the footer section alignment by ensuring content is evenly distributed across the width of the page. Removed excessive left alignment and utilized available horizontal space, resulting in a more balanced and responsive design.
How Has This Been Tested?
Type of Change
Summary by CodeRabbit
New Features
Style