Skip to content

fix: docs sidebar rendering at double width on wide screens#469

Merged
chaokunyang merged 2 commits into
apache:mainfrom
ayush00git:fix-sidebar-double-width
Jun 14, 2026
Merged

fix: docs sidebar rendering at double width on wide screens#469
chaokunyang merged 2 commits into
apache:mainfrom
ayush00git:fix-sidebar-double-width

Conversation

@ayush00git

@ayush00git ayush00git commented Jun 14, 2026

Copy link
Copy Markdown
Contributor

What

The docs sidebar renders at roughly double its intended width on wide screens.

Why

The previous fix (#468) widened the sidebar container by the navbar offset ((100vw - 1280px)/2) so the padded menu wouldn't clip. On a 1920px-wide screen that offset is ~320px, so --doc-sidebar-width became 300px + 320px = 620px — about double the intended 300px.

How

  • Revert --doc-sidebar-width to the panel width (300px).
  • Use the normal --fory-doc-sidebar-inset for the menu's left padding instead of the large navbar offset.
  • Remove the now-unused --fory-doc-sidebar-offset variable.

The sidebar now stays a consistent 300px at every screen width with no clipping. Trade-off: the menu text no longer aligns under the centered navbar logo.

The previous sidebar fix widened the container by the navbar offset
(`(100vw - 1280px)/2`), which on a 1920px screen made the sidebar
~620px instead of 300px. Revert the width to the panel width and use a
normal menu inset so the sidebar stays a consistent 300px at every
screen width without clipping.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ayush00git ayush00git changed the title Fix docs sidebar rendering at double width on wide screens fix: docs sidebar rendering at double width on wide screens Jun 14, 2026
@ayush00git

ayush00git commented Jun 14, 2026

Copy link
Copy Markdown
Contributor Author

@chaokunyang have a look
image

@chaokunyang

Copy link
Copy Markdown
Contributor

The header bar should be as same width as the body:
image

Could you fix it?

The navbar was capped and centered at 1280px, so on wide screens the
brand floated in a centered band that no longer lined up with the
left-edge docs sidebar. Run the navbar full width and align its left
padding with the sidebar inset so the logo sits above the sidebar.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@ayush00git

Copy link
Copy Markdown
Contributor Author

@chaokunyang fixed?
image

@chaokunyang chaokunyang merged commit 302a8eb into apache:main Jun 14, 2026
4 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.

2 participants