Skip to content

[ZEPPELIN-6629] Fix anchor links hidden under navbar - #5407

Open
world970511 wants to merge 1 commit into
apache:masterfrom
world970511:ZEPPELIN-6629
Open

[ZEPPELIN-6629] Fix anchor links hidden under navbar#5407
world970511 wants to merge 1 commit into
apache:masterfrom
world970511:ZEPPELIN-6629

Conversation

@world970511

Copy link
Copy Markdown

What is this PR for?

Anchor links in the documentation can be hidden behind the fixed 60px navbar.

The existing maybeScrollToHash() JavaScript workaround uses a hardcoded 57px offset and does not handle explicit named anchors such as <a name="S3">.

This PR replaces the JavaScript workaround with scroll-padding-top: 60px, allowing native fragment navigation to account for the fixed navbar. It also removes maybeScrollToHash() and its related event handlers.

What type of PR is it?

Bug Fix

What is the Jira issue?

https://issues.apache.org/jira/browse/ZEPPELIN-6629

How should this be tested?

Run the documentation site locally and verify the following fragments on the Notebook Storage page:

  • #overview
  • #notebook-storage-in-s3
  • #S3

Verify that each target is visible below the fixed navbar.

Also verify the behavior with a mobile-width viewport.

Screenshots

Before/after screenshots for #S3, if appropriate.

Questions

  • Does the licenses files need update? No.
  • Is there breaking changes for older versions? No.
  • Does this needs documentation? No.

}

html {
scroll-padding-top: 60px;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nit: scroll-padding-top: 60px here and .navbar { height: 60px; } further down both hardcode the same 60px value in two separate places. Would it make sense to tie them together with a CSS custom property (e.g. --navbar-height) so they can't drift apart again — that's basically what caused this bug in the first place?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@world970511 I think we'd better address this issue in this PR. Could you please check this message? 🙏

@jongyoul
jongyoul self-requested a review August 10, 2026 05:13
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