Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhanced Scroll Behavior for a Sleeker User Experience 📜 #9475

Closed

Conversation

sanjaiyan-dev
Copy link
Contributor

@sanjaiyan-dev sanjaiyan-dev commented Oct 31, 2023

Hi, this PR introduces a very minor UI improvement by making scrolling smoother using {behavior: 'smooth'} in the .scrollTo() function. This change enhances the UI, making it look and feel sleeker.

Ref-: https://developer.mozilla.org/en-US/docs/Web/API/Element/scrollTo#parameters

@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Oct 31, 2023
@netlify
Copy link

netlify bot commented Oct 31, 2023

[V2]

Built without sensitive environment variables

Name Link
🔨 Latest commit 9b4da4b
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/6540b11fd590090008276ad7
😎 Deploy Preview https://deploy-preview-9475--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@github-actions
Copy link

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🔴 48 🟢 97 🟢 100 🟢 100 🟠 89 Report
/docs/installation 🟠 81 🟢 98 🟢 100 🟢 100 🟠 89 Report
/docs/category/getting-started 🟠 73 🟢 100 🟢 100 🟢 90 🟠 89 Report
/blog 🟠 82 🟢 100 🟢 100 🟢 90 🟠 89 Report
/blog/preparing-your-site-for-docusaurus-v3 🟠 57 🟢 97 🟢 100 🟢 100 🟠 89 Report
/blog/tags/release 🟠 68 🟢 100 🟢 100 🟠 80 🟠 89 Report
/blog/tags 🟠 72 🟢 100 🟢 100 🟢 90 🟠 89 Report

Copy link
Collaborator

@Josh-Cena Josh-Cena left a comment

Choose a reason for hiding this comment

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

Hi! We don't do this by default because it's non-accessible for people with motion sickness. People who wish to implement this kind of behavior can easily opt in through CSS, but there's no way to opt out if we code it in JS.

In addition, it's really weird that the page scrolls on the very first view (personally). It's more natural for it to stay right there.

@Josh-Cena Josh-Cena closed this Nov 1, 2023
@sanjaiyan-dev sanjaiyan-dev deleted the sanjaiyan-smooth-scroll branch November 1, 2023 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Signed Facebook CLA
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants