Skip to content

feat: Materials component and update Home page layout#59

Merged
toto04 merged 5 commits intomainfrom
bianca/material
Apr 9, 2026
Merged

feat: Materials component and update Home page layout#59
toto04 merged 5 commits intomainfrom
bianca/material

Conversation

@BIA3IA
Copy link
Copy Markdown
Contributor

@BIA3IA BIA3IA commented Apr 8, 2026

Introduce a new Materials component to enhance the Home page layout, providing a dedicated section for educational resources and quick links for users. This update improves the overall user experience by organizing content more effectively.

Closes #18

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 8, 2026

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: ba21e1d1-cc4e-4016-9bf4-d3f888f8ab3c

📥 Commits

Reviewing files that changed from the base of the PR and between f88c721 and 2660373.

📒 Files selected for processing (1)
  • src/components/home/materials.tsx
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/components/home/materials.tsx

Walkthrough

Extracted inline home page card data and rendering into a new Materials component (src/components/home/materials.tsx); src/app/page.tsx now imports and renders <Materials /> under <Hero /> instead of mapping internal card arrays.

Changes

Cohort / File(s) Summary
Home page composition
src/app/page.tsx
Removed inline card constants (schoolCards, materialCards, otherCards), related icon imports, and map-based rendering. Replaced the previous card content area with a single Materials component import and JSX usage.
New Materials component
src/components/home/materials.tsx
Added Materials export with two as const arrays (featuredCards, quickLinks). Renders left column mapping cards to CardIcon and right column with a heading, Italian description, and a primary Button including an icon. No state or error handling introduced.
UI primitives used
src/components/.../CardIcon, src/components/.../Button
Materials maps card metadata into CardIcon and uses Button with an icon; verify CardIcon/Button prop contracts remain compatible.

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 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 (3 passed)
Check name Status Explanation
Title check ✅ Passed The PR title accurately describes the main changes: introducing a new Materials component and updating the Home page layout to incorporate it.
Linked Issues check ✅ Passed The PR implements a Materials component for the Home page as specified in issue #18, with featured cards and quick links providing dedicated content organization.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the Materials component and updating the Home page layout; no extraneous modifications were introduced.

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

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

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

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/components/home/materials.tsx`:
- Around line 12-27: The arrays defining inert links (quickLinks and the
materials/items array with href: "#") and the primary CTA button are creating
dead-end UX; replace the placeholder hrefs with real route paths (e.g.,
"/dispense", "/esami", "/appunti" or your app's actual routes) and wire the
primary CTA's render to perform navigation instead of being a no-op (use a Link
component or call the router navigation method in the CTA's onClick). Update the
quickLinks and the materials/items array entries to use real href strings and
modify the CTA rendering code (the primary CTA button component instance) to
either wrap it with <Link> or call router.push('/target') so clicks navigate to
the intended pages. Ensure icons and sizes remain unchanged and test that
clicking a quickLink or the CTA performs navigation.
- Line 33: The Tailwind class on the div containing "order-2 flex flex-col..."
uses an invalid token `2xl:pt-42`; update the className in that component to use
a valid Tailwind spacing token or an arbitrary value instead (for example
replace `2xl:pt-42` with `2xl:pt-40`, `2xl:pt-44`, or an arbitrary value like
`2xl:pt-[10.5rem]`) so the CSS is generated correctly; locate the className
string in the JSX for the div in materials.tsx and make the replacement.
🪄 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: a01beebe-a5fb-4b79-911d-f90bbb49da6c

📥 Commits

Reviewing files that changed from the base of the PR and between ade80e3 and ffce9ba.

📒 Files selected for processing (2)
  • src/app/page.tsx
  • src/components/home/materials.tsx

@BIA3IA BIA3IA self-assigned this Apr 8, 2026
@BIA3IA BIA3IA requested a review from Diubii April 9, 2026 13:13
@toto04 toto04 merged commit 615d1bd into main Apr 9, 2026
2 checks passed
@toto04 toto04 deleted the bianca/material branch April 9, 2026 19:40
@coderabbitai coderabbitai bot mentioned this pull request Apr 9, 2026
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.

Home - materials

3 participants