Skip to content

Fix the reference sidebar and scrolling, table line breaks and the mobile menu - #242

Merged
guanzhousongmicrosoft merged 4 commits into
documentdb:mainfrom
GuanzhouSong:website/layout-review-fixes
Nov 6, 2026
Merged

guanzhousongmicrosoft merged 4 commits into
documentdb:mainfrom
GuanzhouSong:website/layout-review-fixes

Conversation

@GuanzhouSong

Copy link
Copy Markdown
Contributor

What visitors hit on documentdb.io today:

  • The reference sidebar never marks the current page. trailingSlash: true gives usePathname() a trailing slash that the sidebar's hrefs lack, so no entry has matched since, and the list never scrolls to the page you're on ($rank sat about 2,300px down).
  • Reference pages at 768px and up are a 100vh pane under the banner and sticky navbar. Its last ~100px sat below the fold, the window and the article scrolled separately, and once the window moved the navbar covered "Back to Documentation". Now the window scrolls and only the sidebar sticks. At the very bottom the footer still pushes the sidebar up, as with any sticky sidebar.
  • $densify shows literal <br> in a table. react-markdown prints raw HTML as text. Only <br> becomes a break; rehype-raw would let docs inject any HTML.
  • The mobile menu runs off short screens (landscape phones couldn't reach the last links without scrolling to the end of the page), and it stayed open after Escape, the logo or Back. Its height is measured rather than a dvh constant because the banner above it wraps to two lines on narrow phones.

$pull and $minDistance are broken in the source Markdown: documentdb/docs#93.

Checked in headless Edge from 320×568 to 1440 wide, with no console or hydration errors.

trailingSlash: true gives usePathname() a trailing slash that the sidebar's hrefs lack, so no entry has matched since, and the sidebar never scrolled to the current one.
Signed-off-by: Guanzhou Song <26541184+GuanzhouSong@users.noreply.github.com>
The 100vh pane started below the banner and navbar, so its last ~100px sat below the fold, the window and the article scrolled separately, and the navbar covered the pane's top once the window moved.

Signed-off-by: Guanzhou Song <26541184+GuanzhouSong@users.noreply.github.com>
react-markdown prints raw HTML as text, so the $densify Limitations table showed literal <br>. Only <br> is converted; other HTML stays escaped.

Signed-off-by: Guanzhou Song <26541184+GuanzhouSong@users.noreply.github.com>
The open menu had no height limit inside the sticky nav, so on short screens its last links were out of reach. It also stayed open after Escape, the logo, or Back.

Signed-off-by: Guanzhou Song <26541184+GuanzhouSong@users.noreply.github.com>
@guanzhousongmicrosoft
guanzhousongmicrosoft merged commit 90cfa08 into documentdb:main Nov 6, 2026
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.

2 participants