Skip to content

Commit ed06376

Browse files
authored
Merge pull request #233 from beNative/codex/add-left-border-with-padding-on-snippet-containers-8jpza5
Remove snippet background fills
2 parents a04a412 + 73ae37a commit ed06376

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

components/FolderOverview.tsx

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,13 @@ const FolderOverview: React.FC<FolderOverviewProps> = ({
361361
</p>
362362
{result.searchSnippet && (
363363
<p
364-
className="mt-0.5 -ml-2 border-l border-primary/30 pl-2 text-[11px] leading-snug text-text-secondary"
364+
className="mt-0.5 -ml-2 text-[11px] leading-snug text-text-secondary"
365+
style={{
366+
paddingLeft: '0.75rem',
367+
borderLeftWidth: '3px',
368+
borderLeftStyle: 'solid',
369+
borderLeftColor: 'rgb(var(--color-accent) / 0.45)',
370+
}}
365371
>
366372
{highlightMatches(result.searchSnippet, folderSearchTerm)}
367373
</p>

components/PromptTreeItem.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,9 @@ const DocumentTreeItem: React.FC<DocumentTreeItemProps> = (props) => {
353353
const rowPaddingLeft = basePaddingLeft + Math.max(level, 0) * safeIndent;
354354
const snippetPaddingLeft = rowPaddingLeft + 28;
355355
const snippetAccentPadding = 8;
356+
const snippetAccentWidth = 3;
356357
const snippetMarginLeft = Math.max(snippetPaddingLeft - snippetAccentPadding, 0);
358+
const snippetAccentColor = 'rgb(var(--color-accent) / 0.45)';
357359

358360
return (
359361
<li
@@ -514,10 +516,13 @@ const DocumentTreeItem: React.FC<DocumentTreeItemProps> = (props) => {
514516

515517
{!isFolder && searchTerm.trim() && node.searchSnippet && (
516518
<div
517-
className="text-[11px] text-text-secondary leading-snug whitespace-pre-wrap break-words pr-3 border-l border-primary/30"
519+
className="text-[11px] text-text-secondary leading-snug whitespace-pre-wrap break-words pr-3"
518520
style={{
519521
marginLeft: `${snippetMarginLeft}px`,
520522
paddingLeft: `${snippetAccentPadding}px`,
523+
borderLeftWidth: `${snippetAccentWidth}px`,
524+
borderLeftStyle: 'solid',
525+
borderLeftColor: snippetAccentColor,
521526
}}
522527
>
523528
{highlightMatches(node.searchSnippet, searchTerm)}

0 commit comments

Comments
 (0)