Skip to content

Add Scroll Progress Indicator to Navbar - #1214

Merged
Shashankss1205 merged 2 commits into
CodeGraphContext:mainfrom
ArshiBansal:scroll_progress_indicator
Jul 31, 2026
Merged

Shashankss1205 merged 2 commits into
CodeGraphContext:mainfrom
ArshiBansal:scroll_progress_indicator

Conversation

@ArshiBansal

Copy link
Copy Markdown
Contributor

Description

This PR implements a Scroll Progress Indicator in the Navbar for better user experience on long pages.

Users now have a clear visual indication of how much content they have read or scrolled through.

Changes Made

  • Added real-time scroll progress calculation using useEffect and window.scroll event listener.
  • Implemented a thin elegant progress bar at the top of the navbar (h-0.5).
  • Used gradient styling (from-purple-600 via-cyan-500 to-purple-600) to match the existing design system.
  • Added smooth animation with transition-all duration-200.
  • Optimized performance using { passive: true } listener.
  • Fully responsive and works across all devices and pages.

Type of Change

  • New feature (non-breaking change which adds functionality)

Related Issue

Closes #1178

Checklist

  • My code follows the project's style guidelines
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • I have tested the changes on multiple screen sizes (desktop + mobile)

Additional Notes

  • The progress bar is placed inside the fixed navbar and respects the existing z-50 stacking.
  • No existing functionality or styling was broken.
  • Minimal performance impact.

@vercel

vercel Bot commented Jun 12, 2026

Copy link
Copy Markdown

@ArshiBansal is attempting to deploy a commit to the shashankss1205's projects Team on Vercel.

A member of the Team first needs to authorize it.

@Shashankss1205

Copy link
Copy Markdown
Collaborator

👋 Thanks for contributing to CodeGraphContext! Since this PR was opened, main has moved forward significantly (we just shipped v0.5.2 and merged ~50 PRs), so this one now has merge conflicts. Could you please rebase onto the latest main and resolve the conflicts? Once it is conflict-free and CI is green, we will review and merge it. Really appreciate your work — thank you! 🙏

@Shashankss1205 Shashankss1205 left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed and verified locally: brought the branch up to date with main (kept the current Navbar with scroll-spy, grafted your progress indicator onto it), tsc error set identical to main and vite build green. Nice touch on the gradient strip.

@Shashankss1205
Shashankss1205 merged commit 28371ea into CodeGraphContext:main Jul 31, 2026
11 of 15 checks passed
@github-project-automation github-project-automation Bot moved this from Backlog tasks to Done in CGC Progress Board Jul 31, 2026
@Shashankss1205

Copy link
Copy Markdown
Collaborator

Thanks @ArshiBansal for this contribution — merged! 🎉 The scroll progress indicator looks great on the navbar. We'd love to have you contribute back again — feel free to pick up another open issue!

@Shashankss1205 Shashankss1205 added gssoc:approved GSSoC validation: counts toward scoring level:beginner GSSoC difficulty: 20 pts contributor / 10 mentor mentor:Shashankss1205 GSSoC mentor attribution: credits reviewing mentor quality:clean GSSoC quality: x1.2 contributor / +5 mentor type:design GSSoC type bonus: design labels Aug 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

gssoc:approved GSSoC validation: counts toward scoring level:beginner GSSoC difficulty: 20 pts contributor / 10 mentor mentor:Shashankss1205 GSSoC mentor attribution: credits reviewing mentor quality:clean GSSoC quality: x1.2 contributor / +5 mentor type:design GSSoC type bonus: design

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add a Scroll Progress Indicator

2 participants