Browse Source

fix: goto-anything highlighting consistency improvements (#23843)

tags/1.8.0
lyzno1 2 months ago
parent
commit
854c1aa37d
No account linked to committer's email address

+ 1
- 1
web/app/components/goto-anything/command-selector.tsx View File

className="flex cursor-pointer items-center rounded-md className="flex cursor-pointer items-center rounded-md
p-2.5 p-2.5
transition-all transition-all
duration-150 hover:bg-state-base-hover-alt aria-[selected=true]:bg-state-base-hover"
duration-150 hover:bg-state-base-hover aria-[selected=true]:bg-state-base-hover-alt"
onSelect={() => onCommandSelect(action.shortcut)} onSelect={() => onCommandSelect(action.shortcut)}
> >
<span className="min-w-[4.5rem] text-left font-mono text-xs text-text-tertiary"> <span className="min-w-[4.5rem] text-left font-mono text-xs text-text-tertiary">

+ 2
- 1
web/app/components/goto-anything/index.tsx View File

const handleNavSearch = useCallback((q: string) => { const handleNavSearch = useCallback((q: string) => {
setShow(true) setShow(true)
setSearchQuery(q) setSearchQuery(q)
setCmdVal('')
requestAnimationFrame(() => inputRef.current?.focus()) requestAnimationFrame(() => inputRef.current?.focus())
}, []) }, [])
// Filter actions based on context // Filter actions based on context
<Command.Item <Command.Item
key={`${result.type}-${result.id}`} key={`${result.type}-${result.id}`}
value={result.title} value={result.title}
className='flex cursor-pointer items-center gap-3 rounded-md p-3 will-change-[background-color] hover:bg-state-base-hover-alt aria-[selected=true]:bg-state-base-hover data-[selected=true]:bg-state-base-hover'
className='flex cursor-pointer items-center gap-3 rounded-md p-3 will-change-[background-color] hover:bg-state-base-hover aria-[selected=true]:bg-state-base-hover-alt data-[selected=true]:bg-state-base-hover-alt'
onSelect={() => handleNavigate(result)} onSelect={() => handleNavigate(result)}
> >
{result.icon} {result.icon}

Loading…
Cancel
Save