✂️ fix: Clipped Focus Outlines in Conversation Panel (#11438)

* fix: focus outline clipping in Conversations panel

* chore: address Copilot comments
This commit is contained in:
Dustin Healy 2026-01-21 10:44:20 -08:00 committed by GitHub
parent 24e182d20e
commit e608c652e5
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 9 additions and 8 deletions

View file

@ -82,7 +82,7 @@ const ChatsHeader: FC<ChatsHeaderProps> = memo(({ isExpanded, onToggle }) => {
return (
<button
onClick={onToggle}
className="group flex w-full items-center justify-between px-1 py-2 text-xs font-bold text-text-secondary"
className="group flex w-full items-center justify-between rounded-lg px-1 py-2 text-xs font-bold text-text-secondary outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-black dark:focus-visible:ring-white"
type="button"
>
<span className="select-none">{localize('com_ui_chats')}</span>

View file

@ -148,7 +148,7 @@ export default function Conversation({
return (
<div
className={cn(
'group relative flex h-12 w-full items-center rounded-lg md:h-9',
'group relative flex h-12 w-full items-center rounded-lg outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-black dark:focus-visible:ring-white md:h-9',
isActiveConvo || isPopoverActive
? 'bg-surface-active-alt before:absolute before:bottom-1 before:left-0 before:top-1 before:w-0.5 before:rounded-full before:bg-black dark:before:bg-white'
: 'hover:bg-surface-active-alt',

View file

@ -48,7 +48,7 @@ const ConvoLink: React.FC<ConvoLinkProps> = ({
</div>
<div
className={cn(
'absolute bottom-0 right-0 top-0 w-20 rounded-r-lg bg-gradient-to-l',
'pointer-events-none absolute bottom-0.5 right-0.5 top-0.5 w-20 rounded-r-md bg-gradient-to-l',
isActiveConvo || isPopoverActive
? 'from-surface-active-alt'
: 'from-surface-primary-alt from-0% to-transparent group-hover:from-surface-active-alt group-hover:from-40%',

View file

@ -101,6 +101,7 @@ const BookmarkNav: FC<BookmarkNavProps> = ({ tags, setTags }: BookmarkNavProps)
'flex items-center justify-center',
'size-10 border-none text-text-primary hover:bg-accent hover:text-accent-foreground',
'rounded-full border-none p-2 hover:bg-surface-active-alt md:rounded-xl',
'outline-none focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-black dark:focus-visible:ring-white',
isMenuOpen ? 'bg-surface-hover' : '',
)}
data-testid="bookmark-menu"

View file

@ -110,7 +110,7 @@ export default function FavoriteItem({
tabIndex={0}
aria-label={ariaLabel}
className={cn(
'group relative flex w-full cursor-pointer items-center justify-between rounded-lg px-3 py-2 text-sm text-text-primary hover:bg-surface-active-alt',
'group relative flex w-full cursor-pointer items-center justify-between rounded-lg px-3 py-2 text-sm text-text-primary outline-none hover:bg-surface-active-alt focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-black dark:focus-visible:ring-white',
isPopoverActive ? 'bg-surface-active-alt' : '',
)}
onClick={handleClick}

View file

@ -282,7 +282,7 @@ export default function FavoritesList({
role="button"
tabIndex={0}
aria-label={localize('com_agents_marketplace')}
className="group relative flex w-full cursor-pointer items-center justify-between rounded-lg px-3 py-2 text-sm text-text-primary hover:bg-surface-active-alt"
className="group relative flex w-full cursor-pointer items-center justify-between rounded-lg px-3 py-2 text-sm text-text-primary outline-none hover:bg-surface-active-alt focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-black dark:focus-visible:ring-white"
onClick={handleAgentMarketplace}
onKeyDown={(e) => {
if (e.key === 'Enter' || e.key === ' ') {

View file

@ -55,7 +55,7 @@ export default function NewChat({
return (
<>
<div className="flex items-center justify-between py-[2px] md:py-2">
<div className="flex items-center justify-between px-0.5 py-[2px] md:py-2">
<TooltipAnchor
description={localize('com_nav_close_sidebar')}
render={
@ -66,7 +66,7 @@ export default function NewChat({
data-testid="close-sidebar-button"
aria-label={localize('com_nav_close_sidebar')}
aria-expanded={true}
className="rounded-full border-none bg-transparent duration-0 hover:bg-surface-active-alt md:rounded-xl"
className="rounded-full border-none bg-transparent duration-0 hover:bg-surface-active-alt focus-visible:ring-inset focus-visible:ring-black focus-visible:ring-offset-0 dark:focus-visible:ring-white md:rounded-xl"
onClick={handleToggleNav}
>
<Sidebar aria-hidden="true" className="max-md:hidden" />
@ -88,7 +88,7 @@ export default function NewChat({
variant="outline"
data-testid="nav-new-chat-button"
aria-label={localize('com_ui_new_chat')}
className="rounded-full border-none bg-transparent duration-0 hover:bg-surface-active-alt md:rounded-xl"
className="rounded-full border-none bg-transparent duration-0 hover:bg-surface-active-alt focus-visible:ring-inset focus-visible:ring-black focus-visible:ring-offset-0 dark:focus-visible:ring-white md:rounded-xl"
onClick={clickHandler}
>
<NewChatIcon className="icon-lg text-text-primary" />