|
1 | 1 | import { scopeProjectRef, scopeThreadRef } from "@t3tools/client-runtime"; |
2 | 2 | import type { EnvironmentId, VcsRef, ThreadId } from "@t3tools/contracts"; |
3 | 3 | import { LegendList, type LegendListRef } from "@legendapp/list/react"; |
4 | | -import { ChevronDownIcon, GitBranchIcon } from "lucide-react"; |
| 4 | +import { ChevronDownIcon, GitBranchIcon, SearchIcon } from "lucide-react"; |
5 | 5 | import { |
6 | 6 | useCallback, |
7 | 7 | useDeferredValue, |
@@ -645,23 +645,30 @@ export function BranchToolbarBranchSelector({ |
645 | 645 | <ChevronDownIcon className="size-3 shrink-0 opacity-50" /> |
646 | 646 | </ComboboxTrigger> |
647 | 647 | <ComboboxPopup align="end" side="top" className="flex w-80 flex-col"> |
648 | | - <div className="shrink-0 border-b p-1"> |
649 | | - <ComboboxInput |
650 | | - className="[&_input]:font-sans rounded-md" |
651 | | - inputClassName="ring-0" |
652 | | - placeholder="Search refs..." |
653 | | - showTrigger={false} |
654 | | - size="sm" |
655 | | - value={branchQuery} |
656 | | - onChange={(event) => setBranchQuery(event.target.value)} |
657 | | - /> |
| 648 | + <div className="shrink-0 px-3 pt-2.5"> |
| 649 | + <div className="relative -translate-y-px border-b border-border/70 pb-1.5 transition-colors focus-within:border-ring"> |
| 650 | + <SearchIcon |
| 651 | + aria-hidden="true" |
| 652 | + className="pointer-events-none absolute top-1.5 left-0 size-4 shrink-0 text-muted-foreground/55" |
| 653 | + /> |
| 654 | + <ComboboxInput |
| 655 | + className="[&_input]:h-6.5 [&_input]:ps-5 [&_input]:font-sans [&_input]:leading-6.5" |
| 656 | + inputClassName="rounded-none bg-transparent text-sm" |
| 657 | + placeholder="Search refs..." |
| 658 | + showTrigger={false} |
| 659 | + size="sm" |
| 660 | + unstyled |
| 661 | + value={branchQuery} |
| 662 | + onChange={(event) => setBranchQuery(event.target.value)} |
| 663 | + /> |
| 664 | + </div> |
658 | 665 | </div> |
659 | 666 | <div className="flex min-h-0 flex-1 flex-col overflow-hidden"> |
660 | 667 | <ComboboxEmpty>No refs found.</ComboboxEmpty> |
661 | 668 | <div className="relative min-h-0 w-full max-h-56 flex-1 overflow-hidden"> |
662 | 669 | {shouldVirtualizeBranchList ? ( |
663 | 670 | <> |
664 | | - <ComboboxListVirtualized className="not-empty:ps-1 not-empty:pe-0 not-empty:py-1"> |
| 671 | + <ComboboxListVirtualized className="not-empty:ps-1 not-empty:pe-0 not-empty:pt-2 not-empty:pb-1"> |
665 | 672 | <LegendList<string> |
666 | 673 | ref={branchListRef} |
667 | 674 | data={filteredBranchPickerItems} |
@@ -696,7 +703,7 @@ export function BranchToolbarBranchSelector({ |
696 | 703 | ) : ( |
697 | 704 | <ComboboxList |
698 | 705 | ref={setBranchListRef} |
699 | | - className="h-full max-h-56 min-h-0 not-empty:ps-1 not-empty:pe-0 not-empty:py-1" |
| 706 | + className="h-full max-h-56 min-h-0 not-empty:ps-1 not-empty:pe-0 not-empty:pt-2 not-empty:pb-1" |
700 | 707 | > |
701 | 708 | {filteredBranchPickerItems.map((itemValue, index) => |
702 | 709 | renderPickerItem(itemValue, index), |
|
0 commit comments