Skip to content

Scroll to top using Navbar Aossie logo#1140

Open
JaYRaNa213 wants to merge 1 commit intoAOSSIE-Org:mainfrom
JaYRaNa213:scroll-to-top
Open

Scroll to top using Navbar Aossie logo#1140
JaYRaNa213 wants to merge 1 commit intoAOSSIE-Org:mainfrom
JaYRaNa213:scroll-to-top

Conversation

@JaYRaNa213
Copy link

@JaYRaNa213 JaYRaNa213 commented Feb 3, 2026

Fixes #1139

Description

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

This improves navigation UX, especially on long landing pages.

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

Proposed Implementation

Handle logo click in Navbar.tsx using window.scrollTo with smooth behavior.

window.scrollTo({ top: 0, behavior: "smooth" });

Files Affected

Navbar.tsx

video demo :

Scroll.to.top.mp4

Summary by CodeRabbit

  • New Features

    • Clicking the logo or navigation title now smoothly scrolls you to the top of the page.
  • Style

    • Added cursor pointer feedback to the logo to indicate it's interactive.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

The Navbar component is enhanced with smooth scroll-to-top functionality triggered by clicking the logo and PictoPy title. A cursor-pointer class is added to the logo for improved visual affordance. The implementation prevents default navigation and uses window.scrollTo with smooth behavior.

Changes

Cohort / File(s) Summary
Navbar Scroll-to-Top Enhancement
landing-page/src/Pages/Landing page/Navbar.tsx
Adds onClick handlers to logo and title links to smoothly scroll to top; adds cursor-pointer styling to logo for better interaction affordance.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Poem

🐰 Click the logo, off we go!
Smooth as butter, high to low,
Back to top with graceful flow,
Navigation's nice, you know! 🚀✨

🚥 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 describes the main change: implementing scroll-to-top functionality when clicking the navbar Aossie logo, which is the primary objective of the PR.
Linked Issues check ✅ Passed The PR implements all key requirements from issue #1139: smooth scroll-to-top on logo click using window.scrollTo with smooth behavior, affecting only Navbar.tsx as specified.
Out of Scope Changes check ✅ Passed All changes are directly related to the linked issue; only Navbar.tsx is modified to add onClick handlers for smooth scrolling and cursor-pointer styling, 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

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.

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