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

Table of contents scroll not working #282

Closed
adamschwartz opened this issue Oct 9, 2020 · 2 comments
Closed

Table of contents scroll not working #282

adamschwartz opened this issue Oct 9, 2020 · 2 comments
Assignees
Labels
bug Something isn't working

Comments

@adamschwartz
Copy link
Contributor

adamschwartz commented Oct 9, 2020

Seems to be a regression with the table of contents.

@adamschwartz adamschwartz added the bug Something isn't working label Oct 9, 2020
@adamschwartz adamschwartz self-assigned this Oct 9, 2020
@adamschwartz
Copy link
Contributor Author

adamschwartz commented Oct 9, 2020

This appears to have been a regression in Gatsby. It may be gatsbyjs/gatsby#25778 but it’s hard to say.

What I know is that for deployed projects running Gatsby v2.24.1 the scroll to anchor works fine. Since our package.json specifies ^2.24.1, our projects are now (as of Oct 8, 2020) deploying with v2.24.72 (hence 5fd5a56).

Relying on Gatsby for this behavior seems a bit foolish in retrospect, but perhaps more foolish is relying on SEMVER. We should probably create Docs Engine releases which are tied to specific versions of Gatsby (and all of our dependencies) to ensure that the issues that caused us to revert (0ca870f) won’t happen again. (We’re still investigating what went wrong with GH Actions.)

In the meantime, we may need to implement the scrolling to anchor ourselves, similar to the workaround mentioned in gatsbyjs/gatsby#25778, the problem being that a proper history event won’t be created and thus the great behavior we had before of the scroll position being smoothly and properly restored on browser history changes would be lost.

@adamschwartz
Copy link
Contributor Author

adamschwartz commented Oct 10, 2020

The solution ultimately did involve downgrading Gatsby, but to v2.24.7 not v2.24.1 due to gatsbyjs/gatsby#25899 (comment).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant