-
Notifications
You must be signed in to change notification settings - Fork 14
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
feat: hook to ease scroll to an element #226
Conversation
ESLint Summary View Full Report
Report generated by eslint-plus-action |
Branch preview✅ Deployed to dev: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this chatgpt-generated? Why are you not just using scrollIntoView with behavior: 'smooth'
?
Also, on mobile it doesn't scroll all the way. The masthead is cut off at the bottom.
I tried first with the
It was requested to not scroll the masthead all the way to the top (that's why I'm subtracting a factor of |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll approve but I would recommend looking into adding Framer Motion to this project as it's likely to have more custom animations in future.
And there's a plugin for Motion specifically for animated scrolling: https://github.com/breadadams/scroller-motion
Thanks for the references! I will definitely look into those as I agree the project will have more custom animations. |
What it solves
Resolves #227
How this PR fixes it
When opening the Core page, smoothly scrolls to the masthead section.
The target scroll position, ease and duration are reviewed by the design team.