Skip to content

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

Merged
merged 10 commits into from
Sep 24, 2024
Merged

Conversation

BrettJephson
Copy link
Contributor

@BrettJephson BrettJephson commented Sep 23, 2024

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

@BrettJephson BrettJephson self-assigned this Sep 23, 2024
Copy link

linear bot commented Sep 23, 2024

Copy link

changeset-bot bot commented Sep 23, 2024

🦋 Changeset detected

Latest commit: 89b66f9

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
gitbook Patch

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

@BrettJephson BrettJephson marked this pull request as ready for review September 23, 2024 13:33
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 23, 2024 13:35 Inactive
Copy link

argos-ci bot commented Sep 23, 2024

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ⚠️ Changes detected (Review) 32 changed Dec 31, 2024, 11:13 PM

@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 23, 2024 13:48 Inactive
@BrettJephson BrettJephson marked this pull request as draft September 23, 2024 14:47
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 23, 2024 15:31 Inactive
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 23, 2024 15:34 Inactive
@BrettJephson BrettJephson force-pushed the brett/RND-2147-scroll-toc branch from 1d43ca5 to cc9ac89 Compare September 23, 2024 16:03
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 23, 2024 16:05 Inactive
@BrettJephson BrettJephson force-pushed the brett/RND-2147-scroll-toc branch from cc9ac89 to 7730dbc Compare September 23, 2024 16:13
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 23, 2024 16:16 Inactive
@BrettJephson BrettJephson force-pushed the brett/RND-2147-scroll-toc branch from 7730dbc to c1ee529 Compare September 24, 2024 07:43
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 24, 2024 07:46 Inactive
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 24, 2024 07:48 Inactive
@BrettJephson BrettJephson force-pushed the brett/RND-2147-scroll-toc branch from affd07e to 4efb2c2 Compare September 24, 2024 08:05
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 24, 2024 08:08 Inactive
@BrettJephson BrettJephson force-pushed the brett/RND-2147-scroll-toc branch 2 times, most recently from deb1d89 to f7fa8c6 Compare September 24, 2024 08:12
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 24, 2024 08:12 Inactive
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 24, 2024 08:15 Inactive
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 24, 2024 08:16 Inactive
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 24, 2024 08:17 Inactive
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 24, 2024 08:37 Inactive
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 24, 2024 09:02 Inactive
@BrettJephson BrettJephson marked this pull request as ready for review September 24, 2024 09:10
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 24, 2024 11:02 Inactive
Copy link
Contributor

@spastorelli spastorelli left a 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.

@BrettJephson BrettJephson force-pushed the brett/RND-2147-scroll-toc branch from bc31b1e to d79a534 Compare September 24, 2024 13:51
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 24, 2024 13:54 Inactive
@github-actions github-actions bot temporarily deployed to gitbook-open (Preview) September 24, 2024 13:56 Inactive
@BrettJephson BrettJephson merged commit 042b850 into main Sep 24, 2024
9 checks passed
@BrettJephson BrettJephson deleted the brett/RND-2147-scroll-toc branch September 24, 2024 15:24
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.

3 participants