Skip to content

docs: comet docs design overhaul- phase 1#4353

Open
pranamya123 wants to merge 4 commits into
apache:mainfrom
pranamya123:docs/sidebar-redesign
Open

docs: comet docs design overhaul- phase 1#4353
pranamya123 wants to merge 4 commits into
apache:mainfrom
pranamya123:docs/sidebar-redesign

Conversation

@pranamya123
Copy link
Copy Markdown
Contributor

@pranamya123 pranamya123 commented May 16, 2026

Key changes:

This is the first phase of a design overhaul for the Comet docs site. The goal is to bring it closer to the conventions of modern dev-doc sites (Stripe, Linear, Vercel, Anthropic) without changing any prose content — every change here is layered on top of pydata_sphinx_theme, so the existing search index, theme switcher, mobile drawer, and toctree generation all keep working unchanged.

🔗 Live preview: https://rainbow-cranachan-f70262.netlify.app/

Which issue does this PR close?

Closes #.

Rationale for this change

What changes are included in this PR?

The homepage is now a dedicated landing page rather than just the User Guide index. The content is borrowed from the existing Comet Overview page, happy to take suggestions on what to keep, cut, or reword.

The left sidebar got the biggest rework. It's now section-scoped: when you're on a User Guide page, the sidebar shows only User Guide content, not the four top-nav items repeated as headers. Each group toggles independently (with proper aria-expanded), and you can have multiple open at once. The sidebar also has an in-place search filter: typing in the search box hides non-matching items and highlights the matched characters live, instead of submitting the form and redirecting you to /search.html. Full-document search via the standard Sphinx index still works the same way.

A few smaller things came together with that:

A "Home" tab in the top navigation
A right-side page TOC that auto-shows on pages with 3+ H2 headings and hides on short reference pages, so it doesn't leave an empty rail
Breadcrumbs trimmed from 5 segments to 3, dropped the home icon (the logo handles it) and the redundant Comet User Guide parent, plus shortened the verbose Comet 0.16.0-SNAPSHOT User Guide label to just 0.16.0-SNAPSHOT
A quiet, structured footer used on every page (was previously the pydata default)
Project orange (#e8650a) is now the only accent color across the site, buttons, focus rings, active states, links, all consistent
There was one real build bug worth calling out: $COMET_VERSION was being substituted only inside build.sh, so anyone running sphinx-build source build/html directly (local dev, IDE preview, etc.) would see the literal placeholder in page titles, breadcrumbs, and the toctree caption. I moved that substitution into conf.py via a source-read hook, so local Sphinx builds now match what production produces.

Accessibility: every new interactive element has proper ARIA, the focus rings are now a custom orange ring instead of the browser's default pink/purple, and the terminal cursor blink in the hero respects prefers-reduced-motion.

Preview-only caveats
A few things look incomplete on the Netlify preview but render correctly
in production. They depend on extra build steps in docs/build.sh that
the preview environment doesn't run:

  • Older Versions group in the User Guide sidebar is empty
    → populated by generate-versions.py, which clones the released-branch
    docs from GitHub

  • 11 auto-generated reference pages are empty:

    • Configuration Settings (configs.md)
    • All 10 pages under Compatibility → Expression Compatibility
      (Aggregate, Array, Cast, Date/Time, Map, Math, Misc, String, Struct, URL)
      → populated by ./mvnw -Pgenerate-docs, which reads Spark/Comet source
      annotations and fills in the <!--BEGIN:...--> markers in the markdown

This PR doesn't touch either of those build steps; the visual styling
applies normally once they're populated by Apache CI on merge.

Phase 2 (separate PR)
A few things I deliberately scoped out for review velocity:

Content review across all pages
Re-evaluating which top-nav items earn their place
Interactive / animated graphs on the homepage

BEFORE
Screenshot 2026-05-16 at 9 10 02 AM

AFTER
Screenshot 2026-05-27 at 12 09 59 PM

With the right side page TOC
Screenshot 2026-05-27 at 12 11 09 PM

How are these changes tested?

Verified with generate-versions.py

Ran the script locally to populate the older-version directories (the
same script docs/build.sh runs in CI). All three User Guide groups
show up correctly with their nested content:

Screenshot 2026-05-27 at 1 07 39 PM

(the user guide sidebar with all groups)

Auto-generated tables (configs, expression compatibility)

The Maven ./mvnw -Pgenerate-docs step fills in the <!--BEGIN:...--> markers on the configs and expression-compatibility pages. I attempted to run it locally but hit a separate build issue unrelated to this PR (missing proto-generated classes on the spark module's classpath, which reproduces on a clean checkout of main). Apache CI doesn't hit this, so those tables will populate normally on merge. The visual styling in
this PR applies on top of whatever content the build produces.

Deployed the UI on netlify and manually tested it out- https://rainbow-cranachan-f70262.netlify.app/
In the next PRs, the plan is to add more unit tests.

@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!

@pranamya123 pranamya123 force-pushed the docs/sidebar-redesign branch from 672858a to 6fc267a Compare May 16, 2026 12:48
@pranamya123 pranamya123 changed the title docs: redesign sidebar UX with collapsible groups, in-place search, and section scoping docs: redesign comet docs page- v1 May 16, 2026
@pranamya123 pranamya123 changed the title docs: redesign comet docs page- v1 docs:comet docs design overhaul- v1 May 16, 2026
@pranamya123 pranamya123 changed the title docs:comet docs design overhaul- v1 docs:comet docs design overhaul- phase 1 May 16, 2026
@coderfender coderfender added documentation Improvements or additions to documentation enhancement New feature or request labels May 16, 2026
@coderfender coderfender changed the title docs:comet docs design overhaul- phase 1 docs: comet docs design overhaul- phase 1 May 16, 2026
@coderfender
Copy link
Copy Markdown
Contributor

I think the mobile layout has an issue @pranamya123
image

@pranamya123
Copy link
Copy Markdown
Contributor Author

I think the mobile layout has an issue @pranamya123 image

Thank you for this comment, I made the design responsive to all devices and redeployed, could you please check now in the same netlify link? @coderfender

@coderfender
Copy link
Copy Markdown
Contributor

Thank you. It looks good now

@coderfender
Copy link
Copy Markdown
Contributor

coderfender commented May 17, 2026

Seems like the Apache DataFusion Comet font is too less (even less than the description) here ? Can we probably highlight Apache DataFusion Comet better ?
image

nit : Would also be great to show the acceleration in the terminal
nit : Your existing Spark queries — now executed natively via DataFusion - probably could add comet here ?
Also on the user guide page:
image
(html_title)

Also, not sure if this is intended but I don't see older version docs :

current :
image

PR :

image

Missing some feature sections :

current :
image

PR :

image

@pranamya123 pranamya123 force-pushed the docs/sidebar-redesign branch from 110a232 to e85fa47 Compare May 22, 2026 20:52
…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
@pranamya123 pranamya123 force-pushed the docs/sidebar-redesign branch from e85fa47 to 9926d3b Compare May 26, 2026 21:17
- Promote Apache DataFusion Comet to the hero H1 (was a small eyebrow)
- Mention Comet in the terminal install demo
- Fix html_title leaking as visible text on the User Guide page
- Restore Use Commodity Hardware section
- Keep sidebar consistent across all User Guide pages so clicking a
  Dev Snapshot child does not reload the sidebar with a different tree
- Fix admonition icon overlapping the title text

Older version docs render correctly once merged; they require
docs/build.sh to run generate-versions.py, which Netlify previews skip.
@pranamya123 pranamya123 force-pushed the docs/sidebar-redesign branch from 9926d3b to 328f8b6 Compare May 26, 2026 21:18
@pranamya123
Copy link
Copy Markdown
Contributor Author

Thanks @coderfender — addressed in 328f8b6:

  • "Apache DataFusion Comet" is now the hero H1 (was the small eyebrow)
  • Terminal demo now mentions Comet by name in the inline comment
  • html_title leak fixed; reverted to standard markdown H1
  • "Use Commodity Hardware" section restored with the verbatim source paragraph
  • Sidebar stays consistent across all User Guide pages — clicking a Dev Snapshot child no longer reloads the sidebar with a different tree
    Re older version docs: the Netlify preview only shows Development Snapshot
    because Netlify doesn't run docs/build.sh (which calls generate-versions.py
    to clone the released-version docs from GitHub). In production, the Apache
    build runs that step, so 0.16.x (current) and Older Versions populate
    correctly when this PR merges. No source change needed for that.

@pranamya123 pranamya123 marked this pull request as ready for review May 26, 2026 23:14
@pranamya123
Copy link
Copy Markdown
Contributor Author

Hi @andygrove, this PR is now ready for review. You can test out the new UI in https://rainbow-cranachan-f70262.netlify.app/ . Please let me know your feedback. TIA!

@coderfender
Copy link
Copy Markdown
Contributor

coderfender commented May 27, 2026

Seeing some inconsistencies with the terminal display :
image

Seeing different sidebars :

PR :

image

Main :

image

Also missing important config:

PR :

image

Main :

image

Seeing issues with the expression data as well :

image image

Could we please confirm that the text / content is not missing ?

Copy link
Copy Markdown
Contributor

@coderfender coderfender left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left comments on missing content

@pranamya123
Copy link
Copy Markdown
Contributor Author

pranamya123 commented May 27, 2026

Seeing some inconsistencies with the terminal display : image

Seeing different sidebars :

PR :

image Main : image Also missing important config:

PR :

image Main : image Seeing issues with the expression data as well :

image image
Could we please confirm that the text / content is not missing ?

Thanks @coderfender — confirming no content is missing. What you're
seeing is the Netlify preview running only sphinx-build, while
production runs the full docs/build.sh which has two extra steps that
populate this content.

  1. Terminal display inconsistencies: Could you point me at the page that has this specific issue, so that I can reproduce the issue?

  2. sidebar difference vs main: this is intentional.

I took a UX judgement call here: the user would expect to stay anchored on the Development Snapshot sidebar item with its child items opened under it, instead of having the whole sidebar replaced and feeling like they navigated to a different site.

That said, if the team prefers main's switching behavior over the consistent-tree approach, happy to revert.

  1. Config tables on configs.md and the 10 expression compatibility pages: these use <!--BEGIN:CONFIG_TABLE[...]--> and <!--BEGIN:EXPR_COMPAT[...]--> markers that get filled in by ./mvnw -Pgenerate-docs, which reads the Spark/Comet source annotations at build time. Sphinx alone doesn't run this, so the markers stay empty on the preview.

I tried running the Maven step locally to verify it too, but hit a separate build issue (proto-generated classes not on the spark module's classpath — reproduces on a clean main checkout, not introduced by this PR). The Apache CI environment doesn't hit that, so these tables will populate normally once this PR merges.

This PR doesn't touch either build step, the visual styling layers on top of whatever content the pipeline produces.

  1. same as 3, Aggregate Expressions page gets generated during build.

One option is to merge these docs changes behind a feature flag, and test them out with the real build values, and only then turn it on when we feel confident with it.

@andygrove
Copy link
Copy Markdown
Member

Thanks @pranamya123. I plan on starting to test this out with local builds soon.

@andygrove
Copy link
Copy Markdown
Member

The text in the Spark shell exaple is double spaced, which wastes vertical space:

Screenshot 2026-05-27 at 3 58 01 PM

@andygrove
Copy link
Copy Markdown
Member

In http://localhost:8765/user-guide/0.16/installation.html some of the text is hidden due to colors used:

Screenshot 2026-05-27 at 4 00 41 PM

@pranamya123
Copy link
Copy Markdown
Contributor Author

@coderfender Maven build on my local is a success now, I verified the content on Comet Configuration Settings and Aggregate Expressions pages, please find the attached screenshots.

Comet Configuration Settings:
Screenshot 2026-05-28 at 12 34 16 PM

Aggregate Expressions:
Screenshot 2026-05-28 at 12 32 15 PM

- Code blocks: make all syntax tokens render light on the dark code
  background. Un-themed tokens (console prompt, names, output) were
  inheriting Pygments' light-theme dark colors and turning invisible.
- Hero terminal: fix double-spaced lines (display:block plus literal
  newlines in the <pre> caused two breaks per line) and tighten line-height.
- Keep the article's left edge stable whether or not the right-side TOC
  is shown.
- Use the full ASF license header on theme_overrides.css so Apache RAT
  passes.
@pranamya123
Copy link
Copy Markdown
Contributor Author

pranamya123 commented May 28, 2026

http://localhost:8765/user-guide/0.16/installation.html

Hi @andygrove, thank you for your feedback. I addressed both the issues in the latest commit (2d3e760).

Reduced the vertical spacing in the terminal block:

Screenshot 2026-05-28 at 1 49 35 PM

And fixed the font color so the text is legible in both themes:

light mode:
Screenshot 2026-05-28 at 2 07 48 PM

dark mode:
Screenshot 2026-05-28 at 2 07 59 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants