mirror of
https://github.com/stablyai/orca.git
synced 2026-11-01 17:47:40 +00:00
fix(sidebar): keep incoming host headers above sticky groups (#34751)
Co-authored-by: OrcaWin <293788423+OrcaWin@users.noreply.github.com>
This commit is contained in:
@@ -65,7 +65,7 @@ function renderHostHeaderVirtualRow(
|
||||
row: Extract<RenderRow, { type: 'host-header' }>,
|
||||
vItem: VirtualItem
|
||||
): React.JSX.Element {
|
||||
// Why: the host card is the outer tier; it pins above group headers (z-30 vs z-20) and stays put as they hand off.
|
||||
// Incoming hosts must cover the outgoing sticky group before they pin.
|
||||
const isActiveStickyHost = ctx.activeStickyHostIndexRef.current === vItem.index
|
||||
const hasHeaderTopSpacing = shouldUseHeaderTopSpacing({
|
||||
rows: ctx.renderRows,
|
||||
@@ -83,9 +83,9 @@ function renderHostHeaderVirtualRow(
|
||||
data-index={vItem.index}
|
||||
ref={ctx.measureVirtualRowElement}
|
||||
className={cn(
|
||||
'left-0 right-0',
|
||||
'left-0 right-0 z-30 bg-worktree-sidebar',
|
||||
hasHeaderTopSpacing && !isActiveStickyHost && 'pt-1',
|
||||
isActiveStickyHost ? 'sticky -top-px z-30 bg-worktree-sidebar' : 'absolute top-0'
|
||||
isActiveStickyHost ? 'sticky -top-px' : 'absolute top-0'
|
||||
)}
|
||||
style={isActiveStickyHost ? undefined : { transform: getVirtualRowTransform(vItem.start) }}
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user