Skip to content

docs: redesign sidebar UX with collapsible groups, in-place search, and section scoping#4353

Draft
pranamya123 wants to merge 2 commits into
apache:mainfrom
pranamya123:docs/sidebar-redesign
Draft

docs: redesign sidebar UX with collapsible groups, in-place search, and section scoping#4353
pranamya123 wants to merge 2 commits into
apache:mainfrom
pranamya123:docs/sidebar-redesign

Conversation

@pranamya123
Copy link
Copy Markdown
Contributor

Visual + interaction overhaul of the published docs site, layered on top of pydata_sphinx_theme so the existing search index, theme switcher, and toctree generation all continue to work.

Key changes:

Comet Docs redesign.

Files:
conf.py register comet-ux.js + page-toc + version hook
_templates/docs-sidebar.html cap toctree depth at 3 (no double-nesting)
_templates/layout.html structured project footer
_static/comet-ux.js all client-side enhancements (new file)
_static/theme_overrides.css visual theme + sidebar/footer/TOC styles

Which issue does this PR close?

Closes #.

Rationale for this change

What changes are included in this PR?

Screenshot 2026-05-15 at 8 20 02 PM

How are these changes tested?

…nd section scoping

Visual + interaction overhaul of the published docs site, layered on top of
pydata_sphinx_theme so the existing search index, theme switcher, and
toctree generation all continue to work.

Key changes:

- Section-scoped sidebar: when a top-level tab is active, the sidebar shows
  only that section's contents. Eliminates the redundancy of repeating the
  top-nav items in the left rail.
- Click-to-toggle expand/collapse arrows on every nav group (independent of
  page navigation). Uses real <button> elements + aria-expanded for
  accessibility.
- In-sidebar live search filter with character-level highlighting. Replaces
  the redirect-to-/search.html flow for sidebar lookups; full-text search
  via Sphinx still works as before.
- Right-side page TOC re-enabled, auto-hidden on pages with fewer than 3
  H2 anchors so it doesn't waste space on short reference pages.
- Breadcrumb trim: hide the home icon (logo handles it) and the redundant
  section-index breadcrumb item; shorten the verbose
  "Comet X.Y.Z User Guide" version label to just "X.Y.Z".
- Footer: structured 3-column footer (Documentation / Community / Apache)
  with the project logo, tagline, copyright, and trademark notice.
- \$COMET_VERSION substitution moved into conf.py via a source-read hook so
  that local Sphinx builds match what build.sh produces; previously the
  literal "\$COMET_VERSION" leaked into page titles, breadcrumbs, and the
  toctree caption when building directly from source/.

Files:
  conf.py                     register comet-ux.js + page-toc + version hook
  _templates/docs-sidebar.html  cap toctree depth at 3 (no double-nesting)
  _templates/layout.html       structured project footer
  _static/comet-ux.js          all client-side enhancements (new file)
  _static/theme_overrides.css  visual theme + sidebar/footer/TOC styles
@coderfender
Copy link
Copy Markdown
Contributor

Thank you @pranamya123 . Could you add further screenshots with before and after changes?

Comment thread docs/source/_templates/layout.html Outdated
Comment thread docs/source/conf.py
}


# -- $COMET_VERSION substitution -------------------------------------------
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.

This is very nice!

Co-authored-by: Andy Grove <agrove@apache.org>
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