mirror of
https://github.com/stablyai/orca.git
synced 2026-11-13 17:37:40 +00:00
fix(sidebar): keep project header actions stationary (#38655)
This commit is contained in:
@@ -9,7 +9,7 @@ export const PROJECT_HEADER_ACTIONS_CLASS_NAME = cn(
|
||||
'can-hover:pointer-events-none can-hover:opacity-0 can-hover:transition-opacity',
|
||||
'group-hover:pointer-events-auto group-hover:opacity-100',
|
||||
'has-[:focus-visible]:pointer-events-auto has-[:focus-visible]:opacity-100',
|
||||
'has-[button[data-state=open]]:pointer-events-auto has-[button[data-state=open]]:opacity-100'
|
||||
'has-[button[aria-expanded=true]]:pointer-events-auto has-[button[aria-expanded=true]]:opacity-100'
|
||||
)
|
||||
|
||||
export function ProjectHeaderActions({
|
||||
|
||||
+2
-4
@@ -1,4 +1,2 @@
|
||||
export const REPO_HEADER_ACTION_REVEAL_CLASS =
|
||||
'min-w-0 max-w-0 -ml-1.5 overflow-hidden opacity-0 focus:ml-0 focus:max-w-5 focus:opacity-100 group-hover:ml-0 group-hover:max-w-5 group-hover:opacity-100 [@media(hover:none)]:ml-0 [@media(hover:none)]:max-w-5 [@media(hover:none)]:opacity-100'
|
||||
|
||||
export const REPO_HEADER_ACTION_BUTTON_CLASS = `size-5 shrink-0 ${REPO_HEADER_ACTION_REVEAL_CLASS} rounded-md text-muted-foreground transition-[margin,max-width,opacity,background-color,color] hover:bg-accent/70 hover:text-foreground data-[state=open]:ml-0 data-[state=open]:max-w-5 data-[state=open]:opacity-100`
|
||||
export const REPO_HEADER_ACTION_BUTTON_CLASS =
|
||||
'size-5 shrink-0 rounded-md text-muted-foreground transition-colors hover:bg-accent/70 hover:text-foreground'
|
||||
|
||||
+2
-9
@@ -25,7 +25,6 @@ import {
|
||||
DropdownMenuSubTrigger,
|
||||
DropdownMenuTrigger
|
||||
} from '@/components/ui/dropdown-menu'
|
||||
import { cn } from '@/lib/utils'
|
||||
import { translate } from '@/i18n/i18n'
|
||||
import { getRepositoryIconSectionId } from '@/components/settings/repository/repository-settings-targets'
|
||||
import { WslMoveProjectMenuItem } from '@/components/wsl-move/WslMoveProjectMenuItem'
|
||||
@@ -37,10 +36,7 @@ import {
|
||||
effectiveExternalWorktreeVisibility,
|
||||
isLegacyRepoForExternalWorktreeVisibility
|
||||
} from '../../../../../../shared/worktree/ownership'
|
||||
import {
|
||||
REPO_HEADER_ACTION_BUTTON_CLASS,
|
||||
REPO_HEADER_ACTION_REVEAL_CLASS
|
||||
} from './repo-header-action-button-class'
|
||||
import { REPO_HEADER_ACTION_BUTTON_CLASS } from './repo-header-action-button-class'
|
||||
import { getRepoHeaderCreateState } from './repo-header-create-state'
|
||||
import {
|
||||
handleRepoHeaderActionPointerDown,
|
||||
@@ -216,10 +212,7 @@ export const RepoHeaderCreateWorkspaceButton = React.memo(function RepoHeaderCre
|
||||
<TooltipTrigger asChild>
|
||||
{createState?.disabled ? (
|
||||
<span
|
||||
className={cn(
|
||||
'inline-flex cursor-not-allowed transition-[margin,max-width,opacity]',
|
||||
REPO_HEADER_ACTION_REVEAL_CLASS
|
||||
)}
|
||||
className="inline-flex size-5 shrink-0 cursor-not-allowed"
|
||||
data-repo-header-action=""
|
||||
tabIndex={0}
|
||||
aria-label={createState.ariaLabel}
|
||||
|
||||
Reference in New Issue
Block a user