mirror of
https://github.com/stablyai/orca.git
synced 2026-10-22 08:03:37 +00:00
fix(workspace-cleanup): keep filter footer visible
This commit is contained in:
@@ -46,15 +46,14 @@ describe('WorkspaceCleanupFilterBar', () => {
|
||||
expect(screen.queryByRole('button', { name: 'Scan' })).toBeNull()
|
||||
})
|
||||
|
||||
it('caps the facet panel height on the scroll viewport so it stays scrollable', () => {
|
||||
it('keeps the footer visible while the facet panel scrolls', () => {
|
||||
renderFilterBar(true)
|
||||
|
||||
// Why: on the ScrollArea Root the cap only clips — the h-full viewport
|
||||
// collapses under an indefinite height and the last facet groups become
|
||||
// unreachable behind the footer.
|
||||
const viewport = document.querySelector('[data-slot="scroll-area-viewport"]')
|
||||
const content = document.querySelector('[data-slot="popover-content"]')
|
||||
const root = document.querySelector('[data-slot="scroll-area"]')
|
||||
expect(viewport?.className).toContain('max-h-[420px]')
|
||||
expect(root?.className).not.toContain('max-h-')
|
||||
expect(content?.className).toContain(
|
||||
'h-[min(471px,var(--radix-popover-content-available-height))]'
|
||||
)
|
||||
expect(root?.className).toContain('min-h-0 flex-1')
|
||||
})
|
||||
})
|
||||
|
||||
@@ -67,12 +67,13 @@ export function WorkspaceCleanupFilterBar({
|
||||
) : null}
|
||||
</Button>
|
||||
</PopoverTrigger>
|
||||
<PopoverContent align="end" sideOffset={6} className="w-[320px] p-0">
|
||||
{/* Why: the cap must sit on the scroll viewport. On the Root it only
|
||||
clips — the viewport is h-full, which collapses to auto under an
|
||||
indefinite height, so the panel grew past the cap unscrollably and
|
||||
hid the last facet groups behind the footer. */}
|
||||
<ScrollArea viewportClassName="max-h-[420px]">
|
||||
<PopoverContent
|
||||
align="end"
|
||||
sideOffset={6}
|
||||
className="flex h-[min(471px,var(--radix-popover-content-available-height))] w-[320px] flex-col p-0"
|
||||
>
|
||||
{/* 471px preserves the 420px facet viewport plus the fixed footer at full height. */}
|
||||
<ScrollArea className="min-h-0 flex-1">
|
||||
<WorkspaceCleanupLifecycleFacets {...facetProps} />
|
||||
<WorkspaceCleanupGitReviewFacets {...facetProps} />
|
||||
</ScrollArea>
|
||||
|
||||
Reference in New Issue
Block a user