fix: prevent mobile session row action overlap
Hide quick archive action on mobile session rows Restore mobile row spacing for the existing menu action
This commit is contained in:
@@ -273,14 +273,15 @@ function SessionNodeItemComponent(props: Props): React.ReactNode {
|
|||||||
const hideOnHoverClass = isVSCode
|
const hideOnHoverClass = isVSCode
|
||||||
? 'group-hover:opacity-0'
|
? 'group-hover:opacity-0'
|
||||||
: 'group-hover:opacity-0 group-focus-within:opacity-0';
|
: 'group-hover:opacity-0 group-focus-within:opacity-0';
|
||||||
|
const showQuickArchiveAction = !archivedBucket && !mobileVariant;
|
||||||
const revealPaddingClass = isMinimalMode
|
const revealPaddingClass = isMinimalMode
|
||||||
? (isVSCode
|
? (isVSCode
|
||||||
? 'group-hover:pr-2'
|
? 'group-hover:pr-2'
|
||||||
: 'group-hover:pr-2 group-focus-within:pr-2')
|
: 'group-hover:pr-2 group-focus-within:pr-2')
|
||||||
: (isVSCode
|
: (isVSCode
|
||||||
? (archivedBucket ? 'group-hover:pr-5' : 'group-hover:pr-12')
|
? (showQuickArchiveAction ? 'group-hover:pr-12' : 'group-hover:pr-5')
|
||||||
: (archivedBucket ? 'group-hover:pr-5 group-focus-within:pr-5' : 'group-hover:pr-12 group-focus-within:pr-12'));
|
: (showQuickArchiveAction ? 'group-hover:pr-12 group-focus-within:pr-12' : 'group-hover:pr-5 group-focus-within:pr-5'));
|
||||||
const alwaysActionPaddingClass = archivedBucket ? 'pr-7' : 'pr-13';
|
const alwaysActionPaddingClass = showQuickArchiveAction ? 'pr-13' : 'pr-7';
|
||||||
const suppressNextSelectRef = React.useRef(false);
|
const suppressNextSelectRef = React.useRef(false);
|
||||||
const [isTouchPressed, setIsTouchPressed] = React.useState(false);
|
const [isTouchPressed, setIsTouchPressed] = React.useState(false);
|
||||||
|
|
||||||
@@ -870,7 +871,7 @@ function SessionNodeItemComponent(props: Props): React.ReactNode {
|
|||||||
? 'opacity-100'
|
? 'opacity-100'
|
||||||
: cn('opacity-0', revealOnHoverClass),
|
: cn('opacity-0', revealOnHoverClass),
|
||||||
)}>
|
)}>
|
||||||
{!archivedBucket ? (
|
{showQuickArchiveAction ? (
|
||||||
<Tooltip>
|
<Tooltip>
|
||||||
<TooltipTrigger asChild>
|
<TooltipTrigger asChild>
|
||||||
<button
|
<button
|
||||||
|
|||||||
Reference in New Issue
Block a user