Skip to content

Simplify search results and let hover select a result - #4806

Merged
peterwhite merged 5 commits into
mainfrom
peter/rnd-14208-improve-search-ui
Nov 18, 2026
Merged

peterwhite merged 5 commits into
mainfrom
peter/rnd-14208-improve-search-ui

Conversation

@peterwhite

@peterwhite peterwhite commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Context

Problem: Search results are busy. Every result repeats the same page icon. Long breadcrumbs wrap onto two lines. The mouse and the keyboard each draw their own highlight.

Outcome: Results are easier to scan. The highlighted result is always the one Enter opens.

Proposed changes

  • Breadcrumbs stay on one line. The whole path shows when it fits. When it doesn't, the levels next to the root fold into a ⋯ in second place until the line fits. The folded levels show in a tooltip after a 1s hover.
  • The page icon and the breadcrumb icons are gone.
  • Hovering a result selects it. The mouse and the arrow keys share one highlight. Enter opens the row under the mouse.
  • Cut-off results fade out. The scroll arrow shows whenever more results are below, not only on hover.
  • The ⌘I, Navigate and Close hints are gone. The footer only shows when there is a scope filter.

ScrollContainer gets opt-in fade: 'long' and buttonAlwaysVisible options. Its other users are unchanged. The search request, result order, Ask flow and search_open_result event stay the same.

Fixes RND-14208

Demo

The same search on gitbook.com/docs. Main is on the left, this branch on the right.

search-before-after.mp4

Merge danger

Door: two-way

A revert brings back the icons, wrapped breadcrumbs and hints. No data or API contract changes.

Blast radius: search popover, mobile search sheet and embedded search on every published site

Every site's search looks different by default. Search visual snapshots change.

Changelog

  • [Feature] Search results show one-line breadcrumbs without repeated icons or shortcut hints. Hovering a result selects it.

Search results drop the page icon and keep breadcrumbs on one line: the
first crumb, a "⋯" whose tooltip lists the steps in between (after a 1s
hover), and the last crumb, cut short when space runs out.

Hovering a result now selects it, so the mouse and the arrow keys share
one highlight and Enter opens the row under the mouse. Cut-off results
fade out, with the scroll arrow shown whenever more results are below.
The keyboard shortcut hints are gone from the popover.

Fixes RND-14208
Breadcrumbs in search results show the whole path when it fits. When it
doesn't, the levels next to the root fold one at a time into the "⋯" in
second place until the line fits, and the last crumb is cut short only
once everything between is folded. Each crumb is capped at 200px and
shows its full title when cut.

Part of RND-14208
@changeset-bot

changeset-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: aef2bd3

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
gitbook Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@linear-code

linear-code Bot commented Nov 18, 2026

Copy link
Copy Markdown

RND-14208

@argos-ci

argos-ci Bot commented Nov 18, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
customers-v2-cloudflare (Inspect) 👍 Approved by Peter White (1 comment) 5 changed, 7 ignored Nov 18, 2026, 2:02 PM
customers-v2-vercel (Inspect) 👍 Approved by Peter White (1 comment) 3 changed, 5 ignored Nov 18, 2026, 2:00 PM
v2-cloudflare (Inspect) 👍 Approved by Peter White (1 comment) 12 changed, 1 ignored Nov 18, 2026, 2:06 PM
v2-vercel (Inspect) 👍 Approved by Peter White (1 comment) 14 changed, 2 ignored Nov 18, 2026, 2:02 PM

@github-actions

github-actions Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Style invalidation on a large API reference

Elements restyled by opening one popup on the Snyk API reference. A share near or above 100% means the insertion restyles the whole document.

interaction restyled page share budget
openapi-select 6 12,228 0.0% 25% ✅
search 648 12,228 5.3% 125% ✅

@peterwhite
peterwhite requested a review from gregberge November 18, 2026 12:44
The hook calls back once on mount and on every resize, and skips the
observer in browsers without ResizeObserver.

Part of RND-14208
@peterwhite
peterwhite enabled auto-merge (squash) November 18, 2026 14:11
@peterwhite
peterwhite merged commit 386a5c1 into main Nov 18, 2026
21 checks passed
@peterwhite
peterwhite deleted the peter/rnd-14208-improve-search-ui branch November 18, 2026 14:12

This branch was successfully deployed

2 active deployments
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.

2 participants