Skip to content

Add smooth scroll#986

Open
federicobucchi wants to merge 1 commit into
mainfrom
fb/add-smooth-scroll
Open

Add smooth scroll#986
federicobucchi wants to merge 1 commit into
mainfrom
fb/add-smooth-scroll

Conversation

@federicobucchi

@federicobucchi federicobucchi commented Dec 15, 2025

Copy link
Copy Markdown
Member

Bug/issue #985

Summary

Added CSS in html to enable the smooth scroll. Disable the smooth scroll if the user has a setting that enables prefers-reduced-motion

Dependencies

None

Testing

All done

Steps:

  • Navigate to a page with multiple headings / anchors
  • Click on an anchor
  • User should see a smooth scroll to the anchor

Checklist

Make sure you check off the following items. If they cannot be completed, provide a reason.

  • Added tests
  • Ran npm test, and it succeeded
  • Updated documentation if necessary

Tests are not needed for this and documentation shouldn't be updated for this.

@heckj

heckj commented Dec 17, 2025

Copy link
Copy Markdown
Member

@swift-ci please test

@mportiz08 mportiz08 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Sorry for not checking this PR out until now—I think I just missed it!

I don't see any issue with this PR in terms of the goal, but I think there are issues with the existing application that are preventing this from working as smoothly as it should 😅

When testing this locally with the PR changes, I'm sometimes seeing a regression where clicking a subsection further down on the page only partially scrolls to the right place whereas it always scrolls to the right place without these changes.

example.mov

If I had to guess, this is likely some sort of race condition coming from logic we have related to vue-router and scroll events and not any issue with the CSS here. However, we would want to address that before taking these changes.

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.

4 participants