Skip to content

fix: anchor links top scroll#903

Merged
dgarcia360 merged 2 commits intomasterfrom
fix-anchor-links
Oct 6, 2023
Merged

fix: anchor links top scroll#903
dgarcia360 merged 2 commits intomasterfrom
fix-anchor-links

Conversation

@dgarcia360
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Collaborator

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

Copy link
Copy Markdown
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

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