Skip to content

Update docs navigation to horizontal#3303

Open
m-hulbert wants to merge 6 commits intomainfrom
docs-nav-update
Open

Update docs navigation to horizontal#3303
m-hulbert wants to merge 6 commits intomainfrom
docs-nav-update

Conversation

@m-hulbert
Copy link
Copy Markdown
Contributor

@m-hulbert m-hulbert commented Mar 27, 2026

Description

This PR updates the docs navigation;

  • Adds a horizontal layout split between Platform and Products.
  • Adds a sub-menu for listing of Products.
  • Expands 2nd level navigation items by default to increase discoverability.
  • Minor navigation updates to all products to remove 'orphaned' single pages (such as About X product).
  • Adds the search bar back into the header.
  • Strips the utility bar functionality; the language selector goes back to the right-hand nav, and the 'copy as' and 'view as' functionality gets rolled into a single split button.

@m-hulbert m-hulbert self-assigned this Mar 27, 2026
@m-hulbert m-hulbert added the review-app Create a Heroku review app label Mar 27, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 27, 2026

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 4ff5b654-b53a-49e2-9408-5241a638a5c7

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch docs-nav-update

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ably-ci ably-ci temporarily deployed to ably-docs-docs-nav-upda-eow4fy March 27, 2026 17:47 Inactive
@m-hulbert m-hulbert temporarily deployed to ably-docs-docs-nav-upda-eow4fy March 27, 2026 18:36 Inactive
@m-hulbert m-hulbert force-pushed the docs-nav-update branch 3 times, most recently from 7fd8d23 to b72d35b Compare April 13, 2026 16:06
@m-hulbert m-hulbert temporarily deployed to ably-docs-docs-nav-upda-5un0m0 April 13, 2026 16:11 Inactive
@m-hulbert m-hulbert temporarily deployed to ably-docs-docs-nav-upda-5un0m0 April 16, 2026 18:50 Inactive
@m-hulbert m-hulbert temporarily deployed to ably-docs-docs-nav-upda-5un0m0 April 21, 2026 17:47 Inactive
@m-hulbert m-hulbert temporarily deployed to ably-docs-docs-nav-upda-5un0m0 April 21, 2026 18:01 Inactive
@m-hulbert m-hulbert temporarily deployed to ably-docs-docs-nav-upda-5un0m0 April 21, 2026 18:20 Inactive
m-hulbert and others added 6 commits April 21, 2026 19:34
Replace the previous header navigation with three top-level tabs:
Platform, Products, and Examples. Add a search button trigger with
keyboard shortcut hint, Ask AI button, and help resources dropdown.

Restructure the mobile menu with a tab-based layout where the Products
tab keeps the ProductBar pinned above the scrollable sidebar.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Add a sticky ProductBar for switching between products (Pub/Sub, Chat,
Spaces, etc.) shown below the header on non-platform pages.

Restructure the main layout from a centred container to a full-width
flex layout with left sidebar, content pane (max 860px for docs,
1024px for examples), and right sidebar. Change button hover style
from border colour to background fill.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Extract the copy-for-LLM functionality from PageHeader into a dedicated
CopyForLLM component with a split button (copy action + dropdown for
markdown preview, copy, and LLM links). Add ButtonGroup and Separator
UI primitives. Simplify PageHeader after extraction.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Flatten the left sidebar to show a single product's nav with static
section headings and accordion sub-menus. Move the language selector
from the left sidebar to the right sidebar, restyle it as a bordered
button matching the secondary button style. Add useShowLanguageSelector
hook to determine visibility based on page languages.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ooks

Extract the duplicated product bar visibility check into
activePage.hasProductBar, computed once in the layout context. Simplify
useShowLanguageSelector double negation to the equivalent some().

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Restructure nav data for all products to use section-based grouping
with Getting started sections. Update generateMarkdownFooter test to
match the new section structure.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@m-hulbert m-hulbert marked this pull request as ready for review April 21, 2026 18:41
@m-hulbert m-hulbert requested a review from jamiehenson April 21, 2026 18:41
@m-hulbert m-hulbert changed the title [WIP] Test a horizontal docs nav Update docs navigation to horizontal Apr 22, 2026
Copy link
Copy Markdown
Member

@jamiehenson jamiehenson left a comment

Choose a reason for hiding this comment

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

I like it, it's close! Sat with it a little more since demo earlier. Code is decent. I like the simplifications, I like the break up of the utility bar and the shuffling round of various things. Product bar works well. Pretty minor stuff from here tbh and some of it is subjective.

Small observations:

  • I understand why the left nav contents was padded in (to align with the ably logo and the product row), but it looks weird and overly big to me, particularly when the padding between elements is so small. Honestly, I'd lower the side and top padding
Image
  • Product row on mobile looks a bit padded in as well, weird when scrolling
Image

@@ -0,0 +1,18 @@
import { useMemo } from 'react';
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.

I don't think this needs to be its own hook, it is only used in one place - best to localise this to where it's used.

</div>
<Tooltip.Provider delayDuration={0} disableHoverableContent>
<div className="hidden md:flex gap-2 pt-3 md:py-0 px-4 md:px-0 shrink-0">
<button
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.

From what I can see this Ask AI button is no longer gated by inkeepChatEnabled - sounds like a problem, unless it's now on everywhere all the time without the switch

@@ -0,0 +1,131 @@
import { useMemo } from 'react';
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.

No tests for this file

setCopyFeedback('Error!');
}

setTimeout(() => setCopyFeedback(null), 2000);
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.

If the user navigates within 2s of clicking copy, this fires setState on an unmounted component. Minor; the abortController pattern already used for the fetch is the right model to extend here (or keep a ref and clearTimeout on unmount).

Comment thread data/onCreatePage.ts

const pageLayoutOptions: Record<string, LayoutOptions> = {
'/docs': { leftSidebar: true, rightSidebar: false, template: 'index', mdx: false },
'/docs': { leftSidebar: false, rightSidebar: false, template: 'index', mdx: false },
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.

No left bar on the homepage?

<>
<div className="h-[2.125rem] sm:h-[1.875rem] w-5 absolute left-2 top-1 flex items-center justify-center select-none cursor-default">
<Icon name={'icon-gui-magnifying-glass-outline'} size="1rem" />
<div className="relative w-full">
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.

Cool but is this in scope with the rest of the PR feature?

return [
{ model: 'gpt', label: 'Open in ChatGPT', icon: 'icon-tech-openai', link: gptPath },
{ model: 'claude', label: 'Open in Claude', icon: 'icon-tech-claude-mono', link: claudePath },
{ model: 'perplexity', label: 'Open in Perplexity', icon: 'icon-tech-perplexity', link: perplexityPath },
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.

Not seeing a logo for this on the review app - package bump? I know you were asking about this before

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

Labels

review-app Create a Heroku review app

Development

Successfully merging this pull request may close these issues.

3 participants