Skip to content
This repository was archived by the owner on Aug 1, 2025. It is now read-only.

Commit 9be17a4

Browse files
committed
fix mention menu tooltip height when branch name is long
1 parent 2b43819 commit 9be17a4

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

lib/prompt-editor/src/mentions/mentionMenu/MentionMenu.branch.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,6 @@ describe('MentionMenu branch selection', () => {
168168
const mentionQuery = { text: 'test-repo:', provider: REMOTE_DIRECTORY_PROVIDER_URI }
169169

170170
const result = getBranchHelpText(items!, mentionQuery)
171-
expect(result).toBe('* Select or @ search for a specific branch')
171+
expect(result).toBe('* Select or search for a specific branch')
172172
})
173173
})

lib/prompt-editor/src/mentions/mentionMenu/MentionMenu.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -310,7 +310,8 @@ export const MentionMenu: FunctionComponent<
310310
className={clsx(
311311
COMMAND_ROW_CLASS_NAME,
312312
COMMAND_ROW_TEXT_CLASS_NAME,
313-
'tw-bg-accent'
313+
'tw-bg-accent',
314+
'!tw-h-auto'
314315
)}
315316
>
316317
{getBranchHelpText(data.items, mentionQuery)}
@@ -373,7 +374,7 @@ export function getBranchHelpText(
373374
if (repoName && !directoryPath) {
374375
// Check if this is a branch mention (title starts with @)
375376
if (firstItem.title?.startsWith('@')) {
376-
return '* Select or @ search for a specific branch'
377+
return '* Select or search for a specific branch'
377378
}
378379
}
379380

@@ -453,9 +454,7 @@ function getItemsHeading(
453454
if (parentItem.id === REMOTE_DIRECTORY_PROVIDER_URI) {
454455
return (
455456
<div className="tw-flex tw-flex-gap-2 tw-items-center tw-justify-between">
456-
<div>
457-
{getRemoteDirectoryHeading(mentionQuery.text)}
458-
</div>
457+
<div>{getRemoteDirectoryHeading(mentionQuery.text)}</div>
459458
</div>
460459
)
461460
}

0 commit comments

Comments
 (0)