docs: add tabbed navigation (Documentation / Release notes) - #2718
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 4 |
| Duplication | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull Request Overview
The PR successfully implements tabbed navigation for 'Documentation' and 'Release notes' using MkDocs Material. While the overall analysis shows the changes are up to standards, there is a technical risk associated with the manual scroll and focus management added to docs-theme.js. This file is flagged as complex and currently lacks automated test coverage, which could lead to regressions in mobile navigation.
A primary concern is the CSS implementation in responsive.css; certain selectors are not scoped to the tabbed navigation state (.md-nav--lifted), which would cause layout breakage on the standard sidebar if tabs are ever disabled in mkdocs.yml. Additionally, minor inconsistencies in JavaScript syntax and YAML indentation should be addressed to maintain codebase quality.
About this PR
- The new manual scroll and focus management logic in
docs-theme.jslacks automated integration or regression tests. Given that this file is flagged as complex and lacks coverage, these changes introduce a maintenance risk for mobile UI stability.
Test suggestions
- Verify mobile drawer scrollLeft is reset to 0 when opened to ensure active tab content is visible.
- Verify focus management in the mobile drawer prioritizes links within the active tab subtree.
- Test icon rendering logic in
nav-item.htmlcorrectly identifies level 2 items when tabs are active. - Verify desktop CSS hides redundant top-level labels while keeping them visible on mobile.
- Automate unit/integration testing for
docs/assets/javascripts/docs-theme.jsto address complexity and lack of coverage.
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Verify mobile drawer scrollLeft is reset to 0 when opened to ensure active tab content is visible.
2. Verify focus management in the mobile drawer prioritizes links within the active tab subtree.
3. Test icon rendering logic in `nav-item.html` correctly identifies level 2 items when tabs are active.
4. Verify desktop CSS hides redundant top-level labels while keeping them visible on mobile.
5. Automate unit/integration testing for `docs/assets/javascripts/docs-theme.js` to address complexity and lack of coverage.
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
Introduces navigation.tabs and restructures the nav into four top-level tabs (Product, Management, Developer Tools, Release Notes) with matching sidebar icon and styling changes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Scale the tabs down to two: Documentation (the existing nav, unchanged) and Release notes (release notes plus special thanks, as before). Drops the Product/Management/Developer Tools split and its icon remapping, and restores the sidebar's original collapsed-by-default behavior now that navigation.expand isn't enabled. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Scope the tab-label-hiding and top-item-styling selectors to .md-nav--lifted (matching the pattern already used two rules below) instead of .md-nav--primary, use const instead of var in docs-theme.js, and fix the Reporting sub-list indentation in mkdocs.yml. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
e79b7b4 to
3494927
Compare
Puts it as the last top-level item in the Documentation tab, with its heart icon restored, instead of under Release notes. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Safari doesn't implement scrollbar-gutter, so the existing stable-gutter rule is a no-op there and the primary nav rail visibly narrows once a scrollbar appears. Force overflow-y: scroll as a Safari-only fallback, detected via the hanging-punctuation feature (Safari-exclusive since 2016).
…avior Fixes a scroll jump on search open (scroll-padding-top on <html> caught the search trigger's own focus() call, not just anchor jumps) by moving the sticky-header offset to per-heading scroll-margin-top instead. Aligns the desktop header to the content grid below it (logo/search/right cluster columns match sidebar/content/toc) when a sidebar is visible, restores the search backdrop blur, and repositions the search popup to overlap the header on desktop instead of opening as a second, disconnected search bar. Fixes the mobile search close button, which was permanently hidden behind a hardcoded icon override, and fixes the click-outside-to-close overlay not covering the full viewport on any breakpoint — caused by .md-header's backdrop-filter turning it into a containing block for the fixed-position search panel, so `inset: 0` resolved against the header's own short box instead of the viewport. Adds a border-bottom to the mobile header to match the divider line desktop gets from the (hidden-on-mobile) tabs bar. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Icons the Cloud and Self-hosted sections (matching the pattern used throughout the Documentation tab), and the Release notes intro page. Fixes the meta.icon nav template branch, which pointed at Material's unvendored icon set and never actually rendered, to use the same vendored-ionicons macro as sidebar_icons. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
Overall readability score: 53.9 (🟢 +0)
View detailed metrics🟢 - Shows an increase in readability
Averages:
View metric targets
|
hide: - toc sets the native [hidden] attribute on the secondary sidebar, which Material's :not([hidden]) selector doesn't match, so the article lost its 1.2rem right margin and rendered 6.4px wider than every other page. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Summary
navigation.tabs/navigation.tabs.stickyand splits the top-level nav into two tabs: Documentation (unchanged existing nav) and Release notes (release notes + special thanks, as before).navigation.expandis not enabled).docs-theme.js.Closes #2711
Test plan
mkdocs servelocally; verified both tabs render with correct icons🤖 Generated with Claude Code