feat: Implement Context-Aware Footer Across the Application #93#95
Conversation
|
@BikramMondal5 is attempting to deploy a commit to the Shiv Raj Singh's projects Team on Vercel. A member of the Team first needs to authorize it. |
📝 WalkthroughWalkthroughThe Footer component now detects the current route via useLocation and conditionally renders a compact footer (brand, copyright, version badge, privacy/terms links, GitHub link, back-to-top) for non-landing pages, while preserving the existing multi-column footer for the landing page. ChangesContext-Aware Footer
Estimated code review effort: 2 (Simple) | ~10 minutes Sequence Diagram(s)sequenceDiagram
participant Router
participant Footer
participant Page
Router->>Footer: provide current location
Footer->>Footer: compute isLandingPage
alt isLandingPage is false
Footer->>Page: render compact footer
else isLandingPage is true
Footer->>Page: render full multi-column footer
end
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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 Warning |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
client/src/components/Footer.jsx (2)
21-107: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated brand/GitHub/back-to-top markup across both footer variants.
The brand+GitHub link+back-to-top-button logic is duplicated between the compact (lines 21-107) and full (lines 110-334) footers. Consider extracting small subcomponents (e.g.,
BackToTopButton,GitHubLink) to reduce duplication and keep both variants consistent as they evolve.Also applies to: 110-334
🤖 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 `@client/src/components/Footer.jsx` around lines 21 - 107, The footer markup for the brand, GitHub link, and back-to-top control is duplicated between the compact and full variants in Footer.jsx. Extract these repeated pieces into shared subcomponents or reusable JSX helpers (for example, a GitHub link component and a BackToTopButton component) and use them in both branches so the two footer variants stay consistent and easier to maintain.
86-94: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueMissing
aria-labelon compact GitHub link for consistency.The full footer's GitHub link (line 164) has an explicit
aria-label, but the compact variant's equivalent link does not. Minor accessibility/consistency nit.🤖 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 `@client/src/components/Footer.jsx` around lines 86 - 94, The compact GitHub link in Footer.jsx is missing the same accessibility label used by the full footer variant. Update the GitHub anchor in the compact footer block to include an explicit aria-label matching the existing GitHub link pattern so both versions stay consistent; use the Footer component’s GitHub link markup as the reference point.
🤖 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.
Inline comments:
In `@client/src/components/Footer.jsx`:
- Around line 72-85: The Privacy Policy and Terms of Service anchors in Footer
are dead links because they use href="#" with preventDefault(), so update the
Footer component to either point these items to real destinations or render them
as disabled/non-interactive until the routes exist. Use the existing /policies
page as the source of truth and adjust the link behavior in the Footer JSX so
the labels no longer act as no-ops.
---
Nitpick comments:
In `@client/src/components/Footer.jsx`:
- Around line 21-107: The footer markup for the brand, GitHub link, and
back-to-top control is duplicated between the compact and full variants in
Footer.jsx. Extract these repeated pieces into shared subcomponents or reusable
JSX helpers (for example, a GitHub link component and a BackToTopButton
component) and use them in both branches so the two footer variants stay
consistent and easier to maintain.
- Around line 86-94: The compact GitHub link in Footer.jsx is missing the same
accessibility label used by the full footer variant. Update the GitHub anchor in
the compact footer block to include an explicit aria-label matching the existing
GitHub link pattern so both versions stay consistent; use the Footer component’s
GitHub link markup as the reference point.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: 00bd4aff-0174-43b9-9f40-74087b1dcd01
📒 Files selected for processing (1)
client/src/components/Footer.jsx
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@BikramMondal5 Thank you for your contribution and for implementing the context-aware footer feature! 🚀 I appreciate the effort you put into keeping this PR focused on the requested functionality. The route-aware footer behavior is implemented cleanly, the landing page retains the full marketing footer, and the compact footer provides a much better experience across the application's internal pages. Thank you as well for validating the changes with formatting, linting, and build checks before submitting the PR. Everything looks good, and I'm happy to merge your contribution. If you enjoyed contributing to MeetOnMemory, consider giving the repository a ⭐. I look forward to seeing more of your contributions in the future. Happy coding! 💙 |
|
🎉 Thank you for your contribution! Your pull request has been successfully merged. We appreciate your effort in improving MeetOnMemory, @BikramMondal5! |
closes #93
Description
Introduced a context-aware footer experience by updating the global
Footercomponent. The landing page (/) preserves the existing rich marketing footer, while all authenticated and nested internal pages (such as/dashboard,/meetings,/policies, etc.) display a clean, distraction-free, and responsive compact footer.Key changes:
useLocationhook inFooter.jsxto dynamically switch between footer styles.v1.0.0), links (Privacy Policy, Terms of Service, GitHub Repo), and a "Back to Top" utility./loginroute).Type of Change
Related Issue
Closes # [Insert Issue Number Here]
Testing
Verified the changes locally using the project's verification checklist:
npx prettier client/src/components/Footer.jsx --checkto confirm correct code formatting.npm run lintto verify static analysis; confirmed no new errors or warnings were introduced in the modified files.npm run build.Checklist
Summary by CodeRabbit