mirror of
https://github.com/hanzo-docs/docs.git
synced 2026-10-25 04:20:02 +00:00
The sidebar was one list of the whole site: 35 always-visible entries, the same on every page, so which surface you were in was invisible and every destination scrolled through everyone else's pages. Two changes to the one renderer every layout shares. A separator now OWNS the siblings that follow it, so a section collapses as a unit and only the section holding the page you are reading is open. The tree is flat on disk either way — grouping at render is what keeps the rail to a handful of rows without moving 35 files. A folder at the top of the tree is a place the nav can send someone, so a reader inside one sees that destination and nothing else, with a way back out. Read off the tree's own shape rather than a list of destinations kept beside it: a second list would disagree with the tree the first time somebody added a folder. Measured on the production build at 1280x880: /docs is 10 rows, /docs/openapi 11, neither scrolls; opening a domain takes it to 27 and it still does not. Reading /docs/cli opens Reference and leaves the other six closed. Leaf rows lose their icons — depth already says where a row sits, and a glyph per row is what made the column unscannable. The chevron stays; it is the one glyph saying something the text does not. Nine sections become seven, "Get started" becomes the pages under it rather than a name repeating its first entry, and the API key control gains a short twin in the top bar for the two states where the rail is not on screen: a collapsed rail, and mobile, where it is a drawer. Both read one hook, so they cannot disagree about who is signed in. Also: the surface-gap table leaves the generated pages, and contributing/style writes down the house rules and the traps that have actually cost us answers.