Skip to content

Conversation

@pranitaurlam
Copy link

@pranitaurlam pranitaurlam commented Feb 3, 2026

Description

Clicking the AOSSIE/PictoPy logo in the navbar now smoothly scrolls the page back to the top instead of only acting as a route link.

This improves navigation UX, especially on long landing pages.

Changes Made

  • Added onClick handler to the logo image Link component
  • Added onClick handler to the PictoPy text Link component
  • Uses window.scrollTo({ top: 0, behavior: 'smooth' })

Expected Behavior

  • Clicking the navbar logo scrolls smoothly to the top of the page
  • Works consistently on desktop and mobile
  • Does not reload the page

Files Affected

  • landing-page/src/Pages/Landing page/Navbar.tsx

Fixes #1139

Summary by CodeRabbit

  • New Features
    • Navbar logo and brand text now smoothly scroll to the top of the page when clicked, providing a more responsive navigation experience.

Clicking the AOSSIE/PictoPy logo in the navbar now smoothly scrolls
the page back to the top instead of acting as a route link.

- Added onClick handler to logo image Link
- Added onClick handler to PictoPy text Link
- Uses window.scrollTo with smooth behavior

Fixes AOSSIE-Org#1139
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

Adds onClick handlers to the navbar logo and brand text links that invoke smooth scrolling to the page top via window.scrollTo({ top: 0, behavior: "smooth" }) instead of performing default navigation, preserving the link elements while disabling route changes.

Changes

Cohort / File(s) Summary
Navbar scroll-to-top feature
landing-page/src/Pages/Landing page/Navbar.tsx
Added onClick handlers to logo and brand text Link elements to trigger smooth scroll-to-top behavior instead of routing to "/". Prevents default navigation while maintaining link elements.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~5 minutes

Poem

🐰 Click the logo, up we go,
Smooth and swift through the scrolling flow,
No routes needed, just a gentle glide,
Back to the top with bunny pride!

🚥 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 clearly and specifically describes the main change: adding scroll-to-top behavior triggered by navbar logo click.
Linked Issues check ✅ Passed The pull request fully implements the requirements from issue #1139: adds click handlers to logo and brand text to perform smooth scroll-to-top using window.scrollTo with proper behavior configuration.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue objective. The modifications only add onClick handlers for scroll-to-top functionality to the navbar logo and brand text, with no unrelated alterations.
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 docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Important

Action Needed: IP Allowlist Update

If your organization protects your Git platform with IP whitelisting, please add the new CodeRabbit IP address to your allowlist:

  • 136.113.208.247/32 (new)
  • 34.170.211.100/32
  • 35.222.179.152/32

Reviews will stop working after February 8, 2026 if the new IP is not added to your allowlist.


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.

@pranitaurlam
Copy link
Author

Hi @rahulharpal1603,
I have raised a PR for this issue implementing the smooth scroll-to-top behavior on the navbar logo click.
Please review and verify. Thanks!

fixes: #1139

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.

Feat:Add scroll-to-top behavior on navbar logo click

1 participant