Skip to content

Commit 76b1d64

Browse files
joecodex
authored andcommitted
keep search result source context together
Refs: DOCS-12517 Render the search result library/source context as a single truncated line so values like apple-developer-docs /web do not split across rows while the file path remains on its own line. Verification: npm run build; npm test -- --run; git diff --check. Co-authored-by: Codex <noreply@openai.com>
1 parent 6b9bc25 commit 76b1d64

1 file changed

Lines changed: 2 additions & 7 deletions

File tree

web/src/views/pages.tsx

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1793,16 +1793,11 @@ export function SearchView() {
17931793
<div className="flex flex-wrap items-start justify-between gap-3">
17941794
<div className="min-w-0">
17951795
<h3 className="text-base font-semibold leading-6 tracking-normal">{result.title}</h3>
1796-
<div className="mt-1 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted-foreground">
1796+
<div className="mt-1 truncate text-xs text-muted-foreground">
17971797
<Link to="/catalog/$slug" params={{ slug: result.library }} className="font-medium text-foreground hover:underline">
17981798
{result.library}
17991799
</Link>
1800-
{result.source && (
1801-
<>
1802-
<span aria-hidden="true">/</span>
1803-
<span>{result.source}</span>
1804-
</>
1805-
)}
1800+
{result.source && <span className="whitespace-nowrap"> /{result.source}</span>}
18061801
</div>
18071802
</div>
18081803
{result.source_url && (

0 commit comments

Comments
 (0)