Skip to content

feat:add smooth scrolling to the website#428

Open
saishnimbalkar397 wants to merge 4 commits into
komalharshita:mainfrom
saishnimbalkar397:feat/smooth-scroll
Open

feat:add smooth scrolling to the website#428
saishnimbalkar397 wants to merge 4 commits into
komalharshita:mainfrom
saishnimbalkar397:feat/smooth-scroll

Conversation

@saishnimbalkar397

@saishnimbalkar397 saishnimbalkar397 commented May 22, 2026

Copy link
Copy Markdown

Summary [required]

In this PR i have added lenis js for smooth scrolling through the website and enhance the user experience through all pages of the website

Related Issue [required]

Closes #397

Type of Change [required]

  • Feature — adds new functionality

What Was Changed [required]

Added lenis.js cdn:
index.html - Main homepage
project.html - Project detail page
404.html - Error page
405.html - Error page
500.html - Error page

Added Lenis initialization in script.js:
Configured smooth scrolling with duration of 1.2s
Used easing function for natural deceleration
Enabled smooth wheel scrolling
Integrated with anchor links (all # links now scroll smoothly)
Wrapped in IIFE to avoid global scope pollution

For error pages (404, 405, 500):
Added inline initialization since they don't use the main script.js

Test Results [required]
image

Screenshots (if UI change)

smooth scrolling has been added,if you want to go a mile ahead i could record my screen an show it to you

@vercel

vercel Bot commented May 22, 2026

Copy link
Copy Markdown

@saishnimbalkar397 is attempting to deploy a commit to the komalsony234-1530's projects Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Thank you for submitting your first pull request to DevPath.

Before review:

  • Complete the PR template fully
  • Ensure all tests pass
  • Link your PR to an issue
  • Keep changes scoped to the issue

A maintainer will review your contribution soon.

@saishnimbalkar397

Copy link
Copy Markdown
Author

@komalharshita please review

@komalharshita komalharshita left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Thank you for the contribution. After reviewing the implementation, I found several issues that should be addressed before this PR can be merged:

  • The Lenis initialization code is duplicated across multiple templates instead of reusing the existing global script.
  • The PR introduces an external CDN dependency without a fallback strategy.
  • Smooth scrolling does not respect the user's prefers-reduced-motion accessibility setting.
  • An unrelated file rename is included in the PR.

Please address these concerns and request another review once they have been resolved.

- Move initialization to global script to remove duplication
- Add prefers-reduced-motion check for accessibility
- Switch from CDN to local npm package import
- Revert accidental file rename
@saishnimbalkar397

Copy link
Copy Markdown
Author

Hi @komalharshita ,

Thank you for the thorough review. I've updated the branch and addressed all of your feedback:

Code Duplication: Moved the Lenis initialization into the global script so it's no longer duplicated across individual templates.

CDN Dependency: Switched from the external CDN script tag to a local npm package import via Vite.

Accessibility: Wrapped the initialization in a prefers-reduced-motion media query check. Smooth scrolling will now automatically bypass for users who prefer reduced motion.

File Rename: Reverted the accidental file rename back to match the main branch.

Please let me know if everything looks good now or if there is anything else you'd like me to adjust!

WhatsApp Image 2026-06-04 at 10 16 15 PM

komalharshita
komalharshita previously approved these changes Jun 8, 2026

@komalharshita komalharshita left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Looks good to merge now!

@komalharshita

Copy link
Copy Markdown
Owner

@saishnimbalkar397 kindly resolve the merge conflicts

@saishnimbalkar397

Copy link
Copy Markdown
Author

@komalharshita done

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Lenis JS for smooth scrolling to enhance UX

2 participants