Skip to content

Feat/homepage logo visibility#654

Open
reach2saksham wants to merge 1 commit intoAOSSIE-Org:mainfrom
reach2saksham:feat/homepage-logo-visibility-clean
Open

Feat/homepage logo visibility#654
reach2saksham wants to merge 1 commit intoAOSSIE-Org:mainfrom
reach2saksham:feat/homepage-logo-visibility-clean

Conversation

@reach2saksham
Copy link
Contributor

@reach2saksham reach2saksham commented Mar 12, 2026

Addressed Issues:

Fixes #646
Currently, the AOSSIE logo (which also acts as a Home button) is hidden on the landing homepage.
This creates a UX inconsistency because users expect the logo to be present in the navbar at all times.

Additionally, users often click the logo to quickly return to the top of the page.
(The sticky property of Navbar would be implemented after this PR is merged properly because this issues scopes only for the homepage logo visibility and scrolling to top at home functionality)

Screenshots/Recordings:

Before:
image
image

After:
image

image

Additional Notes:

AI Usage Disclosure:

We encourage contributors to use AI tools responsibly when creating Pull Requests. While AI can be a valuable aid, it is essential to ensure that your contributions meet the task requirements, build successfully, include relevant tests, and pass all linters. Submissions that do not meet these standards may be closed without warning to maintain the quality and integrity of the project. Please take the time to understand the changes you are proposing and their impact. AI slop is strongly discouraged and may lead to banning and blocking. Do not spam our repos with AI slop.

Check one of the checkboxes below:

  • This PR does not contain AI-generated code at all.
  • This PR contains AI-generated code. I have read the AI Usage Policy and this PR complies with this policy. I have tested the code locally and I am responsible for it.

I have used the following AI models and tools: TODO

Checklist

  • My PR addresses a single issue, fixes a single bug or makes a single improvement.
  • My code follows the project's code style and conventions
  • If applicable, I have made corresponding changes or additions to the documentation
  • If applicable, I have made corresponding changes or additions to tests
  • My changes generate no new warnings or errors
  • I have joined the Discord server and I will share a link to this PR with the project maintainers there
  • I have read the Contribution Guidelines
  • Once I submit my PR, CodeRabbit AI will automatically review it and I will address CodeRabbit's comments.
  • I have filled this PR template completely and carefully, and I understand that my PR may be closed without review otherwise.

Summary by CodeRabbit

  • Refactor
    • Updated header rendering logic to consistently display across all pages.

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

📝 Walkthrough

Walkthrough

Modified the Header component to always render the Home element containing the Aossie logo, regardless of current page location. Previously, the logo was conditionally hidden on the homepage. Added pathname detection and a scroll-to-top handler to restore navigation consistency across all pages.

Changes

Cohort / File(s) Summary
Header Component
src/components/shared/Header.jsx
Changed conditional rendering to always display Home component with Aossie logo. Introduced usePathname() hook and added handleClick function for scroll-to-top functionality on homepage (function not currently connected to UI elements).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Suggested reviewers

  • Zahnentferner

Poem

🐰 The logo hops back to the top,
Where it belonged all along!
Now users scroll down, then hop back up,
With a click on that logo so strong—
Balance restored, the page sings along! 🎪

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'Feat/homepage logo visibility' directly aligns with the main objective of making the AOSSIE logo visible on the homepage, which is the primary change in this PR.
Linked Issues check ✅ Passed The PR implements both requirements from #646: the AOSSIE logo is now rendered on the homepage (by always rendering HomeContainer with Home), and scroll-to-top functionality is added via the handleClick function.
Out of Scope Changes check ✅ Passed All changes in the Header component are directly related to issue #646 requirements: logo visibility and scroll-to-top behavior. No unrelated modifications detected.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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.

@reach2saksham
Copy link
Contributor Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Mar 12, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link

@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/shared/Header.jsx (1)

239-255: ⚠️ Potential issue | 🟠 Major

Wire the new scroll handler into the logo link.

Line 241 defines handleClick, but Line 251 never passes it to the rendered Link, so the homepage logo still won’t perform the smooth scroll described in this PR.

Proposed fix
 function Home({ large = false, className, ...props }) {
   const pathname = usePathname()

   function handleClick(e) {
     if (pathname === '/') {
       e.preventDefault()
       window.scrollTo({
         top: 0,
         behavior: 'smooth',
       })
     }
   }
   return (
     <Link
       href="/"
       aria-label="Home"
       className={clsx(className, 'pointer-events-auto')}
+      onClick={handleClick}
       {...props}
     >
       <Image src='/logo1.png' width={100} height={100} className='scale-125' alt='Aossie Logo' />
     </Link>
   )
 }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/components/shared/Header.jsx` around lines 239 - 255, The click handler
handleClick defined in this component isn't wired to the rendered Link, so the
logo link won't trigger the smooth scroll; attach the handler to the Link by
adding the onClick prop (onClick={handleClick}) to the Link element (the same
Link that currently has href="/" and className uses clsx), ensuring the function
name handleClick is used and imported hooks like usePathname remain unchanged.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/components/shared/Header.jsx`:
- Around line 239-255: The click handler handleClick defined in this component
isn't wired to the rendered Link, so the logo link won't trigger the smooth
scroll; attach the handler to the Link by adding the onClick prop
(onClick={handleClick}) to the Link element (the same Link that currently has
href="/" and className uses clsx), ensuring the function name handleClick is
used and imported hooks like usePathname remain unchanged.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 6bdfbfd4-acc7-486a-bba2-8d0fae3e3815

📥 Commits

Reviewing files that changed from the base of the PR and between 8c97742 and 2cc598d.

📒 Files selected for processing (1)
  • src/components/shared/Header.jsx

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.

Aossie Logo visiblity in Homepage at Navbar

1 participant