Fix sidebar scroll drag

https://feedback.yaak.app/p/endpoinst-scrollbar-not-clickable
This commit is contained in:
Gregory Schier
2025-05-15 07:10:08 -07:00
parent c188435524
commit 21e2a67c1e
4 changed files with 20 additions and 18 deletions

View File

@@ -32,8 +32,8 @@ export function ResizeHandle({
className={classNames( className={classNames(
className, className,
'group z-10 flex select-none', 'group z-10 flex select-none',
// 'bg-fg-info', // For debugging // 'bg-info', // For debugging
vertical ? 'w-full h-3 cursor-row-resize' : 'h-full w-3 cursor-col-resize', vertical ? 'w-full h-2 cursor-row-resize' : 'h-full w-2 cursor-col-resize',
justify === 'center' && 'justify-center', justify === 'center' && 'justify-center',
justify === 'end' && 'justify-end', justify === 'end' && 'justify-end',
justify === 'start' && 'justify-start', justify === 'start' && 'justify-start',

View File

@@ -163,7 +163,7 @@ export function Workspace() {
</ErrorBoundary> </ErrorBoundary>
</div> </div>
<ResizeHandle <ResizeHandle
className="-translate-x-3" className="-translate-x-0.5"
justify="end" justify="end"
side="right" side="right"
isResizing={isResizing} isResizing={isResizing}

View File

@@ -31,7 +31,7 @@ export function Checkbox({
<HStack <HStack
as="label" as="label"
alignItems="center" alignItems="center"
space={2} space={3}
className={classNames(className, 'text-text mr-auto')} className={classNames(className, 'text-text mr-auto')}
> >
<div className={classNames(inputWrapperClassName, 'x-theme-input', 'relative flex')}> <div className={classNames(inputWrapperClassName, 'x-theme-input', 'relative flex')}>
@@ -56,9 +56,11 @@ export function Checkbox({
/> />
</div> </div>
</div> </div>
<div className={classNames(fullWidth && 'w-full', disabled && 'opacity-disabled')}> {!hideLabel && (
{!hideLabel && title} <div className={classNames(fullWidth && 'w-full', disabled && 'opacity-disabled')}>
</div> {title}
</div>
)}
{help && <IconTooltip content={help} />} {help && <IconTooltip content={help} />}
</HStack> </HStack>
); );

View File

@@ -221,7 +221,7 @@ export const PairEditor = forwardRef<PairEditorRef, PairEditorProps>(function Pa
'pb-2 mb-auto h-full', 'pb-2 mb-auto h-full',
!noScroll && 'overflow-y-auto max-h-full', !noScroll && 'overflow-y-auto max-h-full',
// Move over the width of the drag handle // Move over the width of the drag handle
'-ml-3 -mr-2 pr-2', '-mr-2 pr-2',
// Pad to make room for the drag divider // Pad to make room for the drag divider
'pt-0.5', 'pt-0.5',
)} )}
@@ -458,26 +458,26 @@ function PairEditorRow({
!pair.enabled && 'opacity-60', !pair.enabled && 'opacity-60',
)} )}
> >
<Checkbox
hideLabel
title={pair.enabled ? 'Disable item' : 'Enable item'}
disabled={isLast}
checked={isLast ? false : !!pair.enabled}
className={classNames(isLast && '!opacity-disabled')}
onChange={handleChangeEnabled}
/>
{!isLast ? ( {!isLast ? (
<div <div
className={classNames( className={classNames(
'py-2 h-7 w-3 flex items-center', 'py-2 h-7 w-4 flex items-center',
'justify-center opacity-0 group-hover:opacity-70', 'justify-center opacity-0 group-hover:opacity-70',
)} )}
> >
<Icon size="sm" icon="grip_vertical" className="pointer-events-none" /> <Icon size="sm" icon="grip_vertical" className="pointer-events-none" />
</div> </div>
) : ( ) : (
<span className="w-3" /> <span className="w-4" />
)} )}
<Checkbox
hideLabel
title={pair.enabled ? 'Disable item' : 'Enable item'}
disabled={isLast}
checked={isLast ? false : !!pair.enabled}
className={classNames('pr-2', isLast && '!opacity-disabled')}
onChange={handleChangeEnabled}
/>
<div <div
className={classNames( className={classNames(
'grid items-center', 'grid items-center',