Skip to content

Footer#25

Open
Diubii wants to merge 28 commits into
mainfrom
Diubii/footer
Open

Footer#25
Diubii wants to merge 28 commits into
mainfrom
Diubii/footer

Conversation

@Diubii
Copy link
Copy Markdown
Contributor

@Diubii Diubii commented Nov 8, 2025

Closes #10

@Diubii Diubii added difficulty: easy Beginner-friendly issue — low complexity priority: high High priority — critical for functionality or release area: frontend Relates to frontend or user interface code labels Nov 8, 2025
@Diubii
Copy link
Copy Markdown
Contributor Author

Diubii commented Nov 8, 2025

È possibile rendere componente il bottone che c'è attualmente nella home?

@lorenzocorallo
Copy link
Copy Markdown
Member

@Diubii non ho un pc sottomano in questo momento.
Se è qualcosa che ti serve nel footer ma che ancora non c'è, hai due strade:

  1. continui il footer con un bel copia incolla
  2. aspetti che il component del Button venga fatto e poi finisci il footer

Il Button è assegnato (atm) a @Gabriele1075 magari sentitevi e coordinatevi

@Diubii
Copy link
Copy Markdown
Contributor Author

Diubii commented Nov 8, 2025

@lorenzocorallo ok grazie, aspetterò il completamento del componente allora

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Mar 5, 2026

Review Change Stack

Warning

Review limit reached

@Diubii, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 22 minutes and 13 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a547941c-505a-4a22-92d9-7683c83d69b4

📥 Commits

Reviewing files that changed from the base of the PR and between 32a353d and 5f8dbd5.

📒 Files selected for processing (1)
  • src/components/footer.tsx

Walkthrough

Adds a Footer component and renders it in RootLayout; refactors Button size variants and ButtonIcon API to accept sizes and children; adjusts CardSplit responsive layout/typography; and simplifies Home page by removing CTA and language/social icon cards.

Changes

Footer Component and UI Refactoring

Layer / File(s) Summary
Button size variant refactoring
src/components/ui/button.tsx
Extracts button sizes into a buttonSizes constant and exports a ButtonSizes type. buttonVariants now references this mapping, removing prior icon/icon-sm/icon-lg size keys.
ButtonIcon prop migration to size and children
src/components/button-icon.tsx
ButtonIcon now accepts children: ReactNode instead of text, requires a size: ButtonSizes prop passed to Button, and adds an optional className prop; imports updated accordingly.
CardSplit responsive layout and typography
src/components/card-split/index.tsx, src/components/card-split/primary-content.tsx, src/components/card-split/secondary-content.tsx
CardSplit container and inner wrapper switch to a centered flex row with w-full, gap, and responsive padding; primary/secondary content typography updated to use breakpoint-specific utilities.
Footer component with sitemap and social icons
src/components/footer.tsx
Adds new exported Footer component plus internal FooterLink and FooterAccordion helpers, a sitemapSections config, contact/CTA blocks, social icon tiles, and a sitemap area rendered as accordions or text links.
Root layout and Home page integration
src/app/layout.tsx, src/app/page.tsx
Imports and renders Footer after children in the root layout. Simplifies Home page to render only Hero, Materials, Projects, and AboutUs by removing the CTA and language/social icon card section.

Possibly Related PRs

  • PoliNetworkOrg/web#34: Related to button size variants—this PR refactors ButtonSizes and removes icon-specific size keys impacted by that change.
  • PoliNetworkOrg/web#105: Related to ButtonIcon API changes—both PRs modify ButtonIcon signature and usage.
  • PoliNetworkOrg/web#50: Related to Home page icon/card content—both PRs change Home rendering around icon cards and language/social sections.

Suggested labels

status: needs review, priority: medium

🚥 Pre-merge checks | ✅ 1 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Several changes appear out of scope: ButtonIcon was refactored, CardSplit styling was updated, Button size variants were restructured, and home page content was removed—none directly related to implementing issue #10. Review whether ButtonIcon refactoring, CardSplit styling updates, Button variant changes, and home page removals are necessary for the footer implementation, or separate them into dedicated PRs.
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.
Title check ❓ Inconclusive The title 'Footer' is very generic and does not clearly communicate the specific changes made beyond adding a footer component. Consider using a more descriptive title like 'Add Footer component with sitemap and contact information' to better summarize the main changes.
✅ Passed checks (1 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The PR implements a Footer component with contact info, CTA buttons, social icons, and sitemap sections, directly addressing issue #10's requirement for a footer component.

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


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.

@Diubii
Copy link
Copy Markdown
Contributor Author

Diubii commented May 3, 2026

Once #105 is closed, I'll add the DropdownButton in the footer and open this pr

@Diubii Diubii marked this pull request as ready for review May 21, 2026 22:04
@Diubii Diubii requested review from BIA3IA and toto04 May 21, 2026 22:04
Copy link
Copy Markdown
Contributor

@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: 3

🤖 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 `@src/components/button-icon.tsx`:
- Around line 17-20: The prop className is declared but never forwarded to the
rendered Button; update the ButtonIcon component in button-icon.tsx to either
remove className from its props API or forward it: destructure className from
the component props and pass it into the rendered <Button> (e.g., pass
className={className} or merge it with existing classes) so consumers can style
the Button, or if you intentionally don't want external classes, remove
className from the props definition and usages.

In `@src/components/footer.tsx`:
- Around line 58-59: Sitemap legal entries ("Privacy Policy", "Terms &
Conditions", "Cookie policy") are currently defined as { type: "text", label:
"..."} and render as <p>, so change each entry to a link entry (e.g., { type:
"link", label: "Privacy Policy", href: "/privacy" }) and update the footer
rendering logic (where it checks item.type) to render an anchor or Link
component for type === "link"; specifically modify the entries with label
"Privacy Policy", "Terms & Conditions", and "Cookie policy" and ensure the
Footer/component that inspects item.type uses the link branch to output
navigable anchors.
- Line 155: The Tailwind class on the footer div is using an invalid arbitrary
max-width value ("md:max-w-[1324]") without units; update the class string on
the div in src/components/footer.tsx (the element with className starting
"typo-body-small md:typo-body-large mt-36 ...") to use a valid CSS length like
"md:max-w-[1324px]" so Tailwind can parse the arbitrary value correctly.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: df9f7128-9e71-4c94-b029-43f09b25adcb

📥 Commits

Reviewing files that changed from the base of the PR and between 68e769e and 444987a.

📒 Files selected for processing (8)
  • src/app/layout.tsx
  • src/app/page.tsx
  • src/components/button-icon.tsx
  • src/components/card-split/index.tsx
  • src/components/card-split/primary-content.tsx
  • src/components/card-split/secondary-content.tsx
  • src/components/footer.tsx
  • src/components/ui/button.tsx
💤 Files with no reviewable changes (1)
  • src/app/page.tsx

Comment thread src/components/button-icon.tsx
Comment thread src/components/footer.tsx Outdated
Comment thread src/components/footer.tsx Outdated
Copy link
Copy Markdown
Contributor

@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: 1

🤖 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 `@src/components/footer.tsx`:
- Line 58: Footer link objects (e.g., the entry with label "Privacy Policy" in
src/components/footer.tsx) currently point legal items to "/" — update those
hrefs for "Privacy Policy", "Terms & Conditions", and "Cookie policy" to their
actual legal routes (for example "/privacy", "/terms" and "/cookies" or your
app's canonical legal paths) inside the footer links array so the items navigate
to the real legal pages instead of the homepage.
🪄 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: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8b649d13-8807-438e-8bfd-f6f0bcc737ff

📥 Commits

Reviewing files that changed from the base of the PR and between 444987a and b354ebe.

📒 Files selected for processing (2)
  • src/app/page.tsx
  • src/components/footer.tsx
💤 Files with no reviewable changes (1)
  • src/app/page.tsx

Comment thread src/components/footer.tsx
{ label: "FAQs", href: "/" },
],
},
{ type: "text" as const, label: "Privacy Policy", href: "/" },
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Point legal sitemap links to actual legal pages (not /).

Line 58, Line 69, and Line 79 currently send Privacy Policy, Terms & Conditions, and Cookie policy to the homepage. That makes legal navigation effectively incorrect and can create compliance/UX risk.

Proposed minimal fix
-  { type: "text" as const, label: "Privacy Policy", href: "/" },
+  { type: "text" as const, label: "Privacy Policy", href: "/privacy-policy" },
@@
-  { type: "text" as const, label: "Terms & Conditions", href: "/" },
+  { type: "text" as const, label: "Terms & Conditions", href: "/terms-and-conditions" },
@@
-  { type: "text" as const, label: "Cookie policy", href: "/" },
+  { type: "text" as const, label: "Cookie policy", href: "/cookie-policy" },

Also applies to: 69-69, 79-79

🤖 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 `@src/components/footer.tsx` at line 58, Footer link objects (e.g., the entry
with label "Privacy Policy" in src/components/footer.tsx) currently point legal
items to "/" — update those hrefs for "Privacy Policy", "Terms & Conditions",
and "Cookie policy" to their actual legal routes (for example "/privacy",
"/terms" and "/cookies" or your app's canonical legal paths) inside the footer
links array so the items navigate to the real legal pages instead of the
homepage.

Copy link
Copy Markdown
Contributor

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

Caution

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

⚠️ Outside diff range comments (1)
src/components/footer.tsx (1)

170-170: ⚠️ Potential issue | 🔴 Critical | ⚡ Quick win

Invalid comment syntax breaks JSX.

The //TODO: dropdowns comment is placed after the closing </footer> tag but inside the return statement parentheses. This is invalid JavaScript/JSX syntax and will cause a compilation error.

🔧 Proposed fix

Move the comment outside the return statement or use JSX comment syntax:

Option 1: Move after return

     </footer>
-    //TODO: dropdowns
   )
+  // TODO: dropdowns
 }

Option 2: Use JSX comment inside footer

       </div>
+      {/* TODO: dropdowns */}
     </footer>
-    //TODO: dropdowns
   )
 }
🤖 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 `@src/components/footer.tsx` at line 170, The inline JavaScript comment
"//TODO: dropdowns" is placed inside the component's JSX return (after the
closing </footer>) which breaks parsing; either move that comment outside the
return block (after the JSX return completes in the component function) or
convert it to a JSX comment like {/* TODO: dropdowns */} placed inside the
<footer> if you intend it to be part of the rendered JSX — locate the comment
near the component's return and the </footer> closing tag in this file
(src/components/footer.tsx) and apply one of these fixes so the JSX compiles.
🧹 Nitpick comments (1)
src/components/footer.tsx (1)

158-158: ⚡ Quick win

Hardcoded copyright year should be dynamic.

The copyright year "2026" is hardcoded and will need manual updates each year.

♻️ Proposed fix
-        <p id="copyright">PoliNetwork 2016-2026 © All rights reserved</p>
+        <p id="copyright">PoliNetwork 2016-{new Date().getFullYear()} © All rights reserved</p>
🤖 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 `@src/components/footer.tsx` at line 158, Replace the hardcoded year string in
the footer paragraph with a dynamic value: locate the JSX element with id
"copyright" in the Footer component (the <p id="copyright"> line) and replace
the static "2016-2026" (or the "2026" portion) with a runtime-generated year
using JavaScript (e.g., new Date().getFullYear()) so the displayed copyright
range updates automatically each year.
🤖 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.

Outside diff comments:
In `@src/components/footer.tsx`:
- Line 170: The inline JavaScript comment "//TODO: dropdowns" is placed inside
the component's JSX return (after the closing </footer>) which breaks parsing;
either move that comment outside the return block (after the JSX return
completes in the component function) or convert it to a JSX comment like {/*
TODO: dropdowns */} placed inside the <footer> if you intend it to be part of
the rendered JSX — locate the comment near the component's return and the
</footer> closing tag in this file (src/components/footer.tsx) and apply one of
these fixes so the JSX compiles.

---

Nitpick comments:
In `@src/components/footer.tsx`:
- Line 158: Replace the hardcoded year string in the footer paragraph with a
dynamic value: locate the JSX element with id "copyright" in the Footer
component (the <p id="copyright"> line) and replace the static "2016-2026" (or
the "2026" portion) with a runtime-generated year using JavaScript (e.g., new
Date().getFullYear()) so the displayed copyright range updates automatically
each year.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 689f15d5-d859-4ed7-9105-4abf194c382a

📥 Commits

Reviewing files that changed from the base of the PR and between b354ebe and 32a353d.

📒 Files selected for processing (1)
  • src/components/footer.tsx

<Glass
className={cn(
"inline-flex max-w-full overflow-hidden rounded-rectangles border-white/50 bg-background-blur p-0 text-card-foreground",
"inline-flex w-67 overflow-hidden rounded-rectangles border-white/50 bg-background-blur p-0 text-card-foreground md:w-full md:max-w-full",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"inline-flex w-67 overflow-hidden rounded-rectangles border-white/50 bg-background-blur p-0 text-card-foreground md:w-full md:max-w-full",
"inline-flex w-67 overflow-hidden rounded-rectangles border-white/50 bg-background-blur p-0 text-card-foreground md:w-full",

children: ReactNode
iconPosition?: "left" | "right"
size: ButtonSizes
className?: string
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Come dice il coniglio, qui c'é className ma poi non viene usato nel buttonIcon

Comment thread src/components/footer.tsx
Comment on lines +29 to +45
function FooterAccordion({ title, links }: FooterAccordionProps) {
return (
<details className="group text-text-secondary">
<summary className="flex cursor-pointer list-none items-center gap-1 [&::-webkit-details-marker]:hidden">
{title}
<FiChevronDown className="size-4 transition-transform group-open:rotate-180" />
</summary>
<div className="mt-2 flex flex-col gap-2 pl-2 text-sm">
{links.map((link) => (
<FooterLink key={link.label} href={link.href}>
{link.label}
</FooterLink>
))}
</div>
</details>
)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forse questo si puo separare come componente

Comment thread src/components/footer.tsx
Comment on lines +18 to +20
<a href={href} className="hover:text-gray-800">
{children}
</a>
Copy link
Copy Markdown
Contributor

@BIA3IA BIA3IA May 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

si potrebbbe usare <Link> al posto di <a> visto che sono tutti link interni (<Link> di Next gestisce prefetch e navigazione client-side automaticamente)

Comment thread src/components/footer.tsx
<div id="problems" className="flex flex-col gap-4 text-center md:text-left">
<h3 className="typo-label-extralarge md:typo-headline-small">Qualche problema? Segnalalo!</h3>
<div>
<ButtonIcon icon={FaGithub} size="lg-wide" iconPosition="left" variant="tertiary">
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Qui dovremmo usare FiGithub, cosi le icone rimangono coerenti

Comment thread src/components/footer.tsx
Comment on lines +47 to +80
const sitemapSections = [
{
type: "accordion" as const,
title: "Resources",
links: [
{ label: "Materials", href: "/" },
{ label: "Guides", href: "/" },
{ label: "Computer recs", href: "/" },
{ label: "FAQs", href: "/" },
],
},
{ type: "text" as const, label: "Privacy Policy", href: "/" },
{
type: "accordion" as const,
title: "Community",
links: [
{ label: "Groups", href: "/" },
{ label: "Projects", href: "/" },
{ label: "Freshmen", href: "/" },
{ label: "Associations", href: "/" },
],
},
{ type: "text" as const, label: "Terms & Conditions", href: "/" },
{
type: "accordion" as const,
title: "About",
links: [
{ label: "About us", href: "/" },
{ label: "Join us", href: "/" },
{ label: "Contact us", href: "/" },
],
},
{ type: "text" as const, label: "Cookie policy", href: "/" },
]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Credo che questi siano gli stessi delle constants dell'header, potremmo pensare di unificarle cosi abbiamo una unica source of truth e cambiando un link non dobbiamo andare a cercarli tutti

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: frontend Relates to frontend or user interface code difficulty: easy Beginner-friendly issue — low complexity priority: high High priority — critical for functionality or release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Footer component

4 participants