-
Notifications
You must be signed in to change notification settings - Fork 4k
RND-2147: automatically scroll TOC #2478
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
Conversation
🦋 Changeset detectedLatest commit: 89b66f9 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
1d43ca5
to
cc9ac89
Compare
cc9ac89
to
7730dbc
Compare
7730dbc
to
c1ee529
Compare
affd07e
to
4efb2c2
Compare
deb1d89
to
f7fa8c6
Compare
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.
Looks good on my end. Thanks for picking this up.
packages/gitbook/src/components/TableOfContents/TOCScroller.tsx
Outdated
Show resolved
Hide resolved
packages/gitbook/src/components/TableOfContents/TOCScroller.tsx
Outdated
Show resolved
Hide resolved
packages/gitbook/src/components/TableOfContents/TOCScroller.tsx
Outdated
Show resolved
Hide resolved
packages/gitbook/src/components/TableOfContents/TOCScroller.tsx
Outdated
Show resolved
Hide resolved
packages/gitbook/src/components/TableOfContents/TOCScroller.tsx
Outdated
Show resolved
Hide resolved
bc31b1e
to
d79a534
Compare
Bringing back the work @spastorelli did on automatically scrolling the TOC to current page (in #2425).
That work was rolled back due to a bug. Main fix is preventing multiple scroll triggers with a ref.
[Note/out-of-scope]: The difference in rendering of the TOC in localhost v prod is kind of concerning and should be investigated further. I'd expect a dev build to render more often but the toc items re-render a lot more in prod which is why scrolling issues were only picked up in prod.
I've been testing against the visual regression preview where I could replicate the issue, e.g. https://211cca89.gitbook-open.pages.dev/gitbook.gitbook.io/test-gitbook-open