Skip to content

feat: add matricole intro#111

Open
ShaanveerS wants to merge 3 commits into
mainfrom
matricole-intro
Open

feat: add matricole intro#111
ShaanveerS wants to merge 3 commits into
mainfrom
matricole-intro

Conversation

@ShaanveerS
Copy link
Copy Markdown
Collaborator

@ShaanveerS ShaanveerS commented May 13, 2026

fixes #95

Signed-off-by: Shaanveer Singh <shaanver.singh@gmail.com>
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 13, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8636ffc1-be79-47dc-b989-0114596502af

📥 Commits

Reviewing files that changed from the base of the PR and between 222932e and db55391.

📒 Files selected for processing (5)
  • src/components/card-icon/classes.ts
  • src/components/card-icon/index.tsx
  • src/components/card-icon/types.ts
  • src/components/matricole/faqs.tsx
  • src/components/matricole/intro.tsx

Walkthrough

Adds a typed /matricole Next.js page (metadata + MatricolePage), a MatricoleIntro section rendering resource CardIcon cards, tweaks FAQs container to use section, updates header and Hero navigation to link to /matricole, and extends CardIcon with a compact size and align prop.

Changes

Matricole Page Feature

Layer / File(s) Summary
CardIcon types, size maps, and layout
src/components/card-icon/types.ts, src/components/card-icon/classes.ts, src/components/card-icon/index.tsx
Adds CardAlign and align?: CardAlign, adds compact to CardSize, adds compact entries to size/class maps, and updates CardIcon to compute/apply alignment and compact-specific typography/layout.
MatricoleIntro section and resources
src/components/matricole/intro.tsx
New MatricoleIntro component defines a typed resources array and renders the intro section with a responsive grid mapping resources to CardIcon instances.
Page metadata and page export
src/app/matricole/page.tsx, src/components/matricole/faqs.tsx
Adds typed metadata export for /matricole; default export renamed to MatricolePage which renders MatricoleIntro and FAQsPage. FAQsPage top-level element changed from <main> to <section>.
Header and Hero navigation
src/components/header/constants.ts, src/components/home/hero.tsx
Header "Freshman" menu href updated to /matricole. Hero imports next/link and refactors the "Sei una matricola?" CTA to render a Link to /matricole using Button's asChild.

Possibly related PRs

  • PoliNetworkOrg/web#42: Prior work touching src/components/home/hero.tsx and the freshman CTA that this PR refactors to use next/link.
  • PoliNetworkOrg/web#102: Related changes to CardIcon sizing/class-map utilities; both modify CardIcon sizing and class maps.
  • PoliNetworkOrg/web#59: Uses CardIcon in a Materials component; relevant because this PR changes CardIcon sizing/alignment and adds compact.
🚥 Pre-merge checks | ✅ 1 | ❌ 3

❌ Failed checks (2 warnings, 1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ⚠️ Warning Changes to CardIcon components (compact size, alignment), header navigation, and hero button refactoring extend beyond the basic intro component addition. Clarify whether CardIcon enhancements and header/hero updates are required for the matricole intro feature or if they should be separate 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.
Linked Issues check ❓ Inconclusive Without explicit coding requirements in issue #95, the implementation must be assessed against the visual design shown in the linked issue image. Verify that the implemented MatricoleIntro component matches the visual design and layout shown in issue #95's image attachment.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title 'feat: add matricole intro' accurately describes the main change: adding a new MatricoleIntro component and associated page updates.

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

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


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

🧹 Nitpick comments (1)
src/components/matricole/intro.tsx (1)

29-46: ⚡ Quick win

Clarify whether ResourceCard should link to destination pages.

The cards display action-oriented descriptions ("Controlla i risultati...", "Tutte le informazioni..."), but currently render as static display components. Header navigation has corresponding items ("Rankings", "Tol Project") pointing to placeholder hrefs, and no destination routes exist yet. Consider either: (1) wrapping cards with links once routes are implemented, or (2) clarifying if these should remain informational only.

🤖 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/matricole/intro.tsx` around lines 29 - 46, ResourceCard is
currently a static display but uses action-oriented copy; decide whether it
should navigate or stay informational and implement accordingly: add an optional
href?: string to ResourceCardProps and, inside ResourceCard, conditionally wrap
the Glass component with a Next.js <Link> (or an <a> for non-Next projects) when
href is provided, preserving className and accessibility (use role/aria as
needed, target/rel for external links); alternatively, if you intend it to
remain informational, update the copy passed to title/description to remove
imperative phrasing. Update all callers of ResourceCard to pass href when
navigation is desired (e.g., for "Rankings" / "Tol Project") or change the copy
where no route exists.
🤖 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/matricole/intro.tsx`:
- Around line 48-123: The MatricoleBackground component currently uses a fixed
viewport-width-dependent height (h-[248.3218vw]) and hardcoded style percentages
(e.g., left: "-26.0417%", left: "66.7244%", top: "-10.1142%") which break
responsiveness; update MatricoleBackground to use responsive sizing (replace
h-[248.3218vw] and the inline percentage style values with Tailwind responsive
utilities like sm:, md:, lg: variants or switch to CSS variables/clamp() or
media-query-driven classes), adjust the Image wrapper positioning to provide
alternative values per breakpoint (for the two Image instances and the two
positioned looper containers), and verify visually across mobile/tablet/desktop
to ensure the background scales as intended without overflowing layout.

---

Nitpick comments:
In `@src/components/matricole/intro.tsx`:
- Around line 29-46: ResourceCard is currently a static display but uses
action-oriented copy; decide whether it should navigate or stay informational
and implement accordingly: add an optional href?: string to ResourceCardProps
and, inside ResourceCard, conditionally wrap the Glass component with a Next.js
<Link> (or an <a> for non-Next projects) when href is provided, preserving
className and accessibility (use role/aria as needed, target/rel for external
links); alternatively, if you intend it to remain informational, update the copy
passed to title/description to remove imperative phrasing. Update all callers of
ResourceCard to pass href when navigation is desired (e.g., for "Rankings" /
"Tol Project") or change the copy where no route exists.
🪄 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: 23ca5553-f7d3-441b-ba0a-1f7eb129c707

📥 Commits

Reviewing files that changed from the base of the PR and between f34cf16 and b591dd6.

📒 Files selected for processing (4)
  • src/app/matricole/page.tsx
  • src/components/header/constants.ts
  • src/components/home/hero.tsx
  • src/components/matricole/intro.tsx

Comment thread src/components/matricole/intro.tsx Outdated
Signed-off-by: Shaanveer Singh <shaanver.singh@gmail.com>

# Conflicts:
#	src/app/matricole/page.tsx
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.

🧹 Nitpick comments (1)
src/components/matricole/faqs.tsx (1)

40-40: ⚡ Quick win

Consider removing min-h-screen from the FAQ section.

The min-h-screen utility forces this section to take at least the full viewport height, which may create excessive whitespace when the FAQ content is short (currently 5 items). Since this section is rendered below MatricoleIntro within the page, users will need to scroll past potentially empty space.

Consider removing min-h-screen or replacing it with a more moderate minimum height to improve the user experience.

♻️ Proposed fix to adjust section height
-    <section className="mx-auto flex min-h-screen w-full max-w-400 flex-col items-center justify-center gap-16 px-9 py-49 sm:gap-20">
+    <section className="mx-auto flex w-full max-w-400 flex-col items-center justify-center gap-16 px-9 py-49 sm:gap-20">
🤖 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/matricole/faqs.tsx` at line 40, The FAQ section currently
forces a full viewport height via the class "min-h-screen" in the section
element inside the Matricole FAQs component; remove "min-h-screen" (or replace
it with a more moderate utility such as "min-h-0" or a specific smaller
min-height utility) in the className on the section element in
src/components/matricole/faqs.tsx so the section only takes the space needed and
avoids large empty whitespace below MatricoleIntro.
🤖 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.

Nitpick comments:
In `@src/components/matricole/faqs.tsx`:
- Line 40: The FAQ section currently forces a full viewport height via the class
"min-h-screen" in the section element inside the Matricole FAQs component;
remove "min-h-screen" (or replace it with a more moderate utility such as
"min-h-0" or a specific smaller min-height utility) in the className on the
section element in src/components/matricole/faqs.tsx so the section only takes
the space needed and avoids large empty whitespace below MatricoleIntro.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 041f4cb7-8bdb-4814-8f68-9ec2d5f52238

📥 Commits

Reviewing files that changed from the base of the PR and between b591dd6 and 222932e.

📒 Files selected for processing (3)
  • src/app/matricole/page.tsx
  • src/components/home/hero.tsx
  • src/components/matricole/faqs.tsx

Comment thread src/components/matricole/intro.tsx Outdated
Comment thread src/components/matricole/intro.tsx Outdated
Comment thread src/components/matricole/intro.tsx Outdated
Comment thread src/components/matricole/intro.tsx Outdated
Signed-off-by: Shaanveer Singh <shaanver.singh@gmail.com>
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.

Matricole - Intro

2 participants