Footer#25
Conversation
|
È possibile rendere componente il bottone che c'è attualmente nella home? |
|
@Diubii non ho un pc sottomano in questo momento.
Il Button è assegnato (atm) a @Gabriele1075 magari sentitevi e coordinatevi |
|
@lorenzocorallo ok grazie, aspetterò il completamento del componente allora |
|
Warning Review limit reached
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 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 configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
WalkthroughAdds 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. ChangesFooter Component and UI Refactoring
Possibly Related PRs
Suggested labels
🚥 Pre-merge checks | ✅ 1 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ 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. Comment |
…eat: add FooterAccordion and FooterLink components
|
Once #105 is closed, I'll add the DropdownButton in the footer and open this pr |
There was a problem hiding this comment.
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
📒 Files selected for processing (8)
src/app/layout.tsxsrc/app/page.tsxsrc/components/button-icon.tsxsrc/components/card-split/index.tsxsrc/components/card-split/primary-content.tsxsrc/components/card-split/secondary-content.tsxsrc/components/footer.tsxsrc/components/ui/button.tsx
💤 Files with no reviewable changes (1)
- src/app/page.tsx
There was a problem hiding this comment.
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
📒 Files selected for processing (2)
src/app/page.tsxsrc/components/footer.tsx
💤 Files with no reviewable changes (1)
- src/app/page.tsx
| { label: "FAQs", href: "/" }, | ||
| ], | ||
| }, | ||
| { type: "text" as const, label: "Privacy Policy", href: "/" }, |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 winInvalid comment syntax breaks JSX.
The
//TODO: dropdownscomment 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 winHardcoded 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
📒 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", |
There was a problem hiding this comment.
| "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 |
There was a problem hiding this comment.
Come dice il coniglio, qui c'é className ma poi non viene usato nel buttonIcon
| 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> | ||
| ) | ||
| } |
There was a problem hiding this comment.
Forse questo si puo separare come componente
| <a href={href} className="hover:text-gray-800"> | ||
| {children} | ||
| </a> |
There was a problem hiding this comment.
si potrebbbe usare <Link> al posto di <a> visto che sono tutti link interni (<Link> di Next gestisce prefetch e navigazione client-side automaticamente)
| <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"> |
There was a problem hiding this comment.
Qui dovremmo usare FiGithub, cosi le icone rimangono coerenti
| 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: "/" }, | ||
| ] |
There was a problem hiding this comment.
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
Closes #10