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

fix: anchor links top scroll #903

Merged
merged 2 commits into from
Oct 6, 2023
Merged

fix: anchor links top scroll #903

merged 2 commits into from
Oct 6, 2023

Conversation

dgarcia360
Copy link
Collaborator

@dgarcia360 dgarcia360 commented Oct 3, 2023

Closes #889

Related issue scylladb/scylladb#15420

Handles top scroll padding at the html level (full page) instead of per component type (e.g. sections, glossary).

How to test

  1. Build docs

  2. Click on any anchor link:

    image

  3. It should scroll after the header + 10px.

@annastuchlik
Copy link
Collaborator

When I click a heading, it looks as expected:
image

When I click some anchor links, they also look as expected:
image

But when I click some other links, the heading and some following lines are hidden by the page header.
Example 1. When I click this "make preview" link:
image

it takes me to:
image

Example 2. Clicking the "Build previews only (. . .)" link:
image

opens:
image

@dgarcia360
Copy link
Collaborator Author

dgarcia360 commented Oct 6, 2023

Thanks for reviewing @annastuchlik!

Unfortunately, I wasn't able to replicate the issues on my end:

  • When I click the "make preview" link:

image

  • Clicking the "Build previews only (. . .)" link:

image

It's possible that this could be a cache-related problem. Could you please clear your browser cache and give it another try?

If the issue persists, we can walk through the steps during our next call to try and reproduce the error.

@annastuchlik
Copy link
Collaborator

@dgarcia360 I've cleaned everything of everything :) And now it works. Thank you.

Copy link
Collaborator

@annastuchlik annastuchlik left a comment

Choose a reason for hiding this comment

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

LGTM

@dgarcia360 dgarcia360 merged commit 6d87f2e into master Oct 6, 2023
3 checks passed
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.

Fix internal links to anchors
2 participants