Skip to content

Commit 3ac3d5b

Browse files
committed
fix(ui): sidebar resize handle touch area + linked doc border styling
ResizeHandle: the v0.14.5 archive browser PR simplified the touch area to treat both sides identically, making the left sidebar handle ungrabable. Now uses asymmetric positioning per side — extends slightly toward the panel, more toward the content, without covering scrollbars. Viewer: linked doc border reduced from 2px full-opacity primary to 1px at 40% opacity for a subtler visual distinction. For provenance purposes, this commit was AI assisted.
1 parent f96758d commit 3ac3d5b

2 files changed

Lines changed: 8 additions & 6 deletions

File tree

packages/ui/components/ResizeHandle.tsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@ import type { ResizeHandleProps as BaseProps } from '../hooks/useResizablePanel'
33

44
interface Props extends BaseProps {
55
className?: string;
6-
/** When set, touch area extends rightward only to avoid covering adjacent scrollbars.
7-
* Both 'left' and 'right' produce the same behavior — scrollbars sit on the right
8-
* edge of left-adjacent panels, so the handle must never extend leftward. */
6+
/** Controls which direction the touch area extends to avoid covering adjacent scrollbars.
7+
* 'left' = handle is on the right edge of the left sidebar, touch area extends leftward.
8+
* 'right' = handle is on the left edge of the right panel, touch area extends rightward. */
99
side?: 'left' | 'right';
1010
}
1111

@@ -24,10 +24,12 @@ export const ResizeHandle: React.FC<Props> = ({
2424
<div className={`absolute inset-y-0 -left-0.5 -right-0.5 transition-colors ${
2525
isDragging ? 'bg-primary/50' : 'group-hover:bg-border'
2626
}`} />
27-
{/* Wider touch area — extends rightward to avoid covering left-side scrollbars */}
27+
{/* Wider touch area — extends away from adjacent scrollbar */}
2828
<div
2929
className={`absolute inset-y-0 ${
30-
side ? 'left-0 -right-3' : '-inset-x-2'
30+
side === 'left' ? '-right-2 -left-1' :
31+
side === 'right' ? '-left-2 -right-1' :
32+
'-inset-x-2'
3133
}`}
3234
onMouseDown={onMouseDown}
3335
onTouchStart={onTouchStart}

packages/ui/components/Viewer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,7 +429,7 @@ export const Viewer = forwardRef<ViewerHandle, ViewerProps>(({
429429
<article
430430
ref={containerRef}
431431
className={`w-full bg-card rounded-xl shadow-xl p-5 md:p-8 lg:p-10 xl:p-12 relative ${
432-
linkedDocInfo ? 'border-2 border-primary' : 'border border-border/50'
432+
linkedDocInfo ? 'border border-primary/40' : 'border border-border/50'
433433
} ${inputMethod === 'pinpoint' ? 'cursor-crosshair' : ''}`}
434434
style={{ WebkitTouchCallout: 'none' } as React.CSSProperties}
435435
>

0 commit comments

Comments
 (0)