Skip to content

feat: add Hero component#42

Merged
toto04 merged 4 commits intomainfrom
bianca/hero
Mar 17, 2026
Merged

feat: add Hero component#42
toto04 merged 4 commits intomainfrom
bianca/hero

Conversation

@BIA3IA
Copy link
Copy Markdown
Contributor

@BIA3IA BIA3IA commented Mar 12, 2026

Closes #17

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 12, 2026

Walkthrough

Replaced the inline Home page JSX with a dedicated Hero component and updated the page to render it. Added the new Hero component (heading, search input, primary and tertiary buttons with icons). Adjusted small button typography via text-xs in the button variant.

Changes

Cohort / File(s) Summary
Hero Component & Page
src/app/page.tsx, src/components/home/hero.tsx
Created Hero component and simplified the home page to render it. Hero provides a centered hero layout with headline, search Input, primary Button ("More groups") with send icon, and a tertiary blur button ("Sei una matricola?") with user-plus icon.
Button Styling
src/components/ui/button.tsx
Added text-xs class to the size.sm variant to adjust small-button typography.
🚥 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 title 'feat: add Hero component' is clear, specific, and directly describes the main change - adding a new Hero component to the codebase.
Linked Issues check ✅ Passed The PR adds the Hero component as required by issue #17, with appropriate implementation including layout, input field, and button elements.
Out of Scope Changes check ✅ Passed Minor adjustment to Button component's small size variant (text-xs class) is closely related to Hero component styling needs and is within scope.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
📝 Coding Plan for PR comments
  • Generate coding plan

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.

@BIA3IA BIA3IA marked this pull request as ready for review March 12, 2026 15:22
@BIA3IA BIA3IA requested review from Diubii and lorenzocorallo and removed request for lorenzocorallo March 12, 2026 15:24
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: 1

🧹 Nitpick comments (1)
src/components/home/hero.tsx (1)

26-29: Buttons are non-functional.

Both buttons lack onClick handlers or link behavior. If these are intended as placeholders, consider either:

  1. Wrapping them with <Link> for navigation, or
  2. Adding TODO comments to track the missing functionality

Also applies to: 34-37

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

In `@src/components/home/hero.tsx` around lines 26 - 29, The two Button instances
in hero.tsx (the one rendering "More groups" with the Send icon and the other at
lines 34-37) are missing interaction handlers; either wire them to navigation or
mark them as TODOs: if they should navigate, wrap the Button with your routing
Link (or give it an onClick that calls navigate) and pass href/route, otherwise
add a clear TODO comment and a no-op onClick (e.g., onClick={() => {}}) so they
are intentionally non-functional but tracked; locate the JSX Buttons by the
<Button> elements and the Send icon to make the change.
🤖 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/hero.tsx`:
- Around line 10-14: The hero component mixes Italian and English UI strings;
update src/components/home/hero.tsx to use a single language or wire up i18n:
ensure the <h1> text, the input placeholder (currently "Find your group"), the
primary button label ("More groups") and the tertiary button label ("Sei una
matricola?") are all pulled from the same localization source (or all converted
to Italian/English consistently) and replace hard-coded literals in the JSX with
the chosen localized keys or unified strings so language is consistent across
h1, input placeholder, primary and tertiary buttons.

---

Nitpick comments:
In `@src/components/home/hero.tsx`:
- Around line 26-29: The two Button instances in hero.tsx (the one rendering
"More groups" with the Send icon and the other at lines 34-37) are missing
interaction handlers; either wire them to navigation or mark them as TODOs: if
they should navigate, wrap the Button with your routing Link (or give it an
onClick that calls navigate) and pass href/route, otherwise add a clear TODO
comment and a no-op onClick (e.g., onClick={() => {}}) so they are intentionally
non-functional but tracked; locate the JSX Buttons by the <Button> elements and
the Send icon to make the change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b3cee787-5f81-48fb-936c-83198329cd99

📥 Commits

Reviewing files that changed from the base of the PR and between 135767a and 28cf21a.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (3)
  • src/app/page.tsx
  • src/components/home/hero.tsx
  • src/components/ui/button.tsx

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

🤖 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/hero.tsx`:
- Around line 17-37: Wrap the Input in a form and implement a handleSearch
onSubmit that reads the input value and navigates to your search route (or calls
the existing search action) so the Input (icon/Search) actually submits; add
onClick handlers for the "More groups" Button (rendering Send) and the "Sei una
matricola?" Button (rendering UserPlus) that call the appropriate navigation or
action (e.g., router.push('/groups') or router.push('/onboarding') or invoke
existing functions), or replace those Buttons with Link components if using
client-side routing; name the handlers clearly (e.g., handleSearch,
handleMoreGroupsClick, handleNewStudentClick) and attach them to the Input/form
and Buttons respectively so the hero controls are wired to real actions.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5bc80e5d-f808-4985-8df8-e0f1bc3f1b18

📥 Commits

Reviewing files that changed from the base of the PR and between 28cf21a and a50047d.

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

@BIA3IA BIA3IA requested a review from toto04 March 15, 2026 11:38
@toto04 toto04 merged commit 3d92e9e into main Mar 17, 2026
2 checks passed
@toto04 toto04 deleted the bianca/hero branch March 17, 2026 21:07
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 - hero

2 participants