Skip to content

feat: handle navigation fatigue in components card and enhance footer navigation#445

Merged
hari merged 8 commits intocodse:mainfrom
Moamal-2000:feat/issue-444-improve-navigation-and-footer
Apr 27, 2026
Merged

feat: handle navigation fatigue in components card and enhance footer navigation#445
hari merged 8 commits intocodse:mainfrom
Moamal-2000:feat/issue-444-improve-navigation-and-footer

Conversation

@Moamal-2000
Copy link
Copy Markdown
Contributor

@Moamal-2000 Moamal-2000 commented Apr 26, 2026

This PR fixes issue #444

This PR improves the overall site structure by introducing a dynamic footer navigation system and refining the accessibility of the component cards.

Changes

  • Accessibility & Refactoring:
    • Refactored components card by converting internal links to decorative div elements. This prevents nested interactive elements (link-within-link) and ensures a cleaner accessibility tree for screen readers.
  • Footer Enhancements:
    • Implemented getFooterCategories utility to dynamically filter and map documentation categories from docsConfig.
    • Introduced a responsive CSS Grid layout to organize the 18+ category links, ensuring they are easy to navigate on all screen sizes.
    • Refined hover and focus states for footer links to provide better visual feedback and maintain high accessibility standards.

Technical Details

  • Added lib/docs.ts to centralize navigation logic.
  • Optimized the footer layout using Tailwind's responsive grid system.
  • Followed clean code principles by separating data transformation from the UI components.

Summary by CodeRabbit

  • New Features

    • Added a linked category navigation section to the footer, displayed in a responsive grid between newsletter and branding.
  • Accessibility

    • Category marquee pills are now non-interactive and hidden from assistive technologies to reduce redundant navigation.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 26, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 39e25fa8-ae30-45a7-9407-e1ac625c9739

📥 Commits

Reviewing files that changed from the base of the PR and between c9e74f6 and 0b97483.

📒 Files selected for processing (1)
  • app/(main)/_landing/stats-bento.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • app/(main)/_landing/stats-bento.tsx

📝 Walkthrough

Walkthrough

Introduces a footer category navigation by adding getFooterCategories and integrating it into SiteFooter; converts the landing stats category marquee from interactive Next.js Link elements to non-interactive elements and marks the marquee container aria-hidden="true".

Changes

Cohort / File(s) Summary
Footer navigation utility & integration
lib/docs.ts, components/site-footer.tsx
Adds getFooterCategories(navItems, excludedTitles?) to extract { title, href } entries (excluding defaults like "Getting Started" / "Contributing") and integrates those categories into SiteFooter, rendering a responsive grid of navigation links sourced from docsConfig.sidebarNav.
Landing stats marquee accessibility
app/(main)/_landing/stats-bento.tsx
Replaces category <Link> wrappers with non-interactive <div> wrappers in both forward and reverse marquees, removes hover border styling, and sets the marquee container attribute aria-hidden="true".

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐇 I hopped through code with nimble paws,

I gathered categories and gentle laws.
Links became quiet, the marquee hums low,
Footer flowers now proudly show.
A tiny hop — the site will glow.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

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.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately captures the main changes: handling navigation fatigue by converting interactive elements to divs in the stats component and enhancing footer navigation with dynamic category links.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

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

Actionable comments posted: 2

Caution

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

⚠️ Outside diff range comments (1)
app/(main)/_landing/stats-bento.tsx (1)

3-3: ⚠️ Potential issue | 🟡 Minor

Remove unused Link import.

The Link import from next/link on line 3 is not referenced anywhere in this file and should be removed to keep the bundle clean.

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

In `@app/`(main)/_landing/stats-bento.tsx at line 3, Remove the unused import
"Link" by deleting the import line that reads `import Link from "next/link";` so
the module no longer imports the unused symbol Link; update any associated
ESLint/TS errors by saving the file containing the stats-bento component (remove
the import from the top of stats-bento.tsx).
🧹 Nitpick comments (3)
components/site-footer.tsx (2)

26-26: Redundant aria-label.

Screen readers already announce a <nav> as "navigation"; aria-label="Footer Navigation" becomes "Footer Navigation navigation". A shorter label like "Footer" or "Categories" reads better.

-      <nav aria-label="Footer Navigation" className="mx-auto mt-16 w-full max-w-6xl">
+      <nav aria-label="Footer" className="mx-auto mt-16 w-full max-w-6xl">
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/site-footer.tsx` at line 26, The nav's aria-label value is
redundant; update the <nav> in the SiteFooter component (the nav element
rendered in site-footer.tsx) to use a shorter, non-repetitive label such as
aria-label="Footer" or aria-label="Categories", or remove the aria-label
entirely if the visible heading already provides sufficient context; ensure the
change is applied to the nav element that currently has aria-label="Footer
Navigation".

13-15: Inline type annotation is redundant.

getFooterCategories already returns { title: string; href: string }[] (or will, once the helper has an explicit return type). The local annotation here just duplicates that.

-  const footerCategories: { title: string; href: string }[] = getFooterCategories(
-    docsConfig.sidebarNav,
-  );
+  const footerCategories = getFooterCategories(docsConfig.sidebarNav);
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@components/site-footer.tsx` around lines 13 - 15, The variable
footerCategories is annotated with a redundant inline type; remove the explicit
"{ title: string; href: string }[]" annotation and let TypeScript infer the type
from the getFooterCategories(docsConfig.sidebarNav) call (update the declaration
of footerCategories accordingly so it simply assigns the result of
getFooterCategories).
app/(main)/_landing/stats-bento.tsx (1)

243-276: Decorative pills retain hover styling — consider removing.

Now that the marquee container is aria-hidden="true" and the pills are non-interactive <div>s, the transition-colors hover:border-foreground/30 styling is misleading: the cursor is the default arrow but the border still highlights on hover, suggesting interactivity that no longer exists. Consider dropping the hover class for visual honesty.

♻️ Proposed cleanup
                   <div
                     key={`fwd-${i}`}
-                    className="rounded-full border border-border bg-foreground/5 px-2 py-0.5 text-[10px] font-semibold text-foreground transition-colors hover:border-foreground/30 sm:px-2.5 sm:py-1 sm:text-[11px]"
+                    className="rounded-full border border-border bg-foreground/5 px-2 py-0.5 text-[10px] font-semibold text-foreground sm:px-2.5 sm:py-1 sm:text-[11px]"
                   >

(apply same change to the reverse marquee at Lines 268–273)

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

In `@app/`(main)/_landing/stats-bento.tsx around lines 243 - 276, The decorative
pill elements inside the Marquee (the non-interactive divs generated in the
categories.map for keys like `fwd-${i}` and the reversed map for `rev-${i}`)
still include `transition-colors hover:border-foreground/30`, which implies
interactivity even though the container is `aria-hidden="true"`; remove the
`hover:border-foreground/30` class from both pill divs (and optionally
`transition-colors` if you want to avoid hover transitions entirely) so the
pills no longer change border on hover and correctly appear non-interactive.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@components/site-footer.tsx`:
- Around line 32-35: In the className passed to cn in the site-footer component
(the className prop around "text-sm text-muted-foreground" /
"hover:text-foreground focus:text-white px-4 py-2"), remove the hardcoded
focus:text-white and replace it with a theme-aware, accessible focus-visible
ring using the accent token (e.g., use focus-visible:ring-2 and a ring color
based on the accent token like ring-[hsl(var(--accent))] or a provided
ring-accent utility plus an offset), so keyboard focus uses a visible
theme-aware outline rather than white text.

In `@lib/docs.ts`:
- Around line 9-12: The footer mapping currently sets href to a dead-anchor
("#") when a category has no items; update the mapping for the category objects
(the .map((cat) => ({ ... })) call) to mirror the stats-bento logic by using the
first available destination: prefer cat.items?.[0]?.href, then cat.href, then a
safe default like "/docs" (use nullish coalescing instead of || to preserve
empty-string handling).

---

Outside diff comments:
In `@app/`(main)/_landing/stats-bento.tsx:
- Line 3: Remove the unused import "Link" by deleting the import line that reads
`import Link from "next/link";` so the module no longer imports the unused
symbol Link; update any associated ESLint/TS errors by saving the file
containing the stats-bento component (remove the import from the top of
stats-bento.tsx).

---

Nitpick comments:
In `@app/`(main)/_landing/stats-bento.tsx:
- Around line 243-276: The decorative pill elements inside the Marquee (the
non-interactive divs generated in the categories.map for keys like `fwd-${i}`
and the reversed map for `rev-${i}`) still include `transition-colors
hover:border-foreground/30`, which implies interactivity even though the
container is `aria-hidden="true"`; remove the `hover:border-foreground/30` class
from both pill divs (and optionally `transition-colors` if you want to avoid
hover transitions entirely) so the pills no longer change border on hover and
correctly appear non-interactive.

In `@components/site-footer.tsx`:
- Line 26: The nav's aria-label value is redundant; update the <nav> in the
SiteFooter component (the nav element rendered in site-footer.tsx) to use a
shorter, non-repetitive label such as aria-label="Footer" or
aria-label="Categories", or remove the aria-label entirely if the visible
heading already provides sufficient context; ensure the change is applied to the
nav element that currently has aria-label="Footer Navigation".
- Around line 13-15: The variable footerCategories is annotated with a redundant
inline type; remove the explicit "{ title: string; href: string }[]" annotation
and let TypeScript infer the type from the
getFooterCategories(docsConfig.sidebarNav) call (update the declaration of
footerCategories accordingly so it simply assigns the result of
getFooterCategories).
🪄 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: d7bb1ec6-936c-48f4-8363-009fb3670443

📥 Commits

Reviewing files that changed from the base of the PR and between da9d7b2 and f68cb1e.

📒 Files selected for processing (3)
  • app/(main)/_landing/stats-bento.tsx
  • components/site-footer.tsx
  • lib/docs.ts

Comment thread components/site-footer.tsx
Comment thread lib/docs.ts
….com:Moamal-2000/animata into feat/issue-444-improve-navigation-and-footer
@Moamal-2000 Moamal-2000 temporarily deployed to preview-deployment April 26, 2026 09:26 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown

🚀 Preview deployed to: https://fc951665.animata.pages.dev

@Moamal-2000 Moamal-2000 marked this pull request as draft April 26, 2026 09:31
@Moamal-2000 Moamal-2000 temporarily deployed to preview-deployment April 26, 2026 09:37 — with GitHub Actions Inactive
@Moamal-2000 Moamal-2000 marked this pull request as ready for review April 26, 2026 09:38
@github-actions
Copy link
Copy Markdown

🚀 Preview deployed to: https://46e75d65.animata.pages.dev

Comment thread app/(main)/_landing/stats-bento.tsx Outdated
Comment thread app/(main)/_landing/stats-bento.tsx Outdated
@Moamal-2000
Copy link
Copy Markdown
Contributor Author

@hari I've removed the hover styles from both rows.

@Moamal-2000 Moamal-2000 requested a review from hari April 27, 2026 05:13
@hari hari merged commit 2de8170 into codse:main Apr 27, 2026
1 of 2 checks passed
@Moamal-2000 Moamal-2000 deleted the feat/issue-444-improve-navigation-and-footer branch April 27, 2026 19:18
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.

2 participants