From 3fefb6f4a918d825a4d56501001c9f8318434ee2 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 1 Jun 2026 13:03:01 +0000 Subject: [PATCH] fix(ui): apply BulkFlyout bodySx to body container --- src/ui/__tests__/bulk-flyout.test.tsx | 14 ++++++++++++++ src/ui/bulk-flyout.tsx | 2 +- 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/ui/__tests__/bulk-flyout.test.tsx b/src/ui/__tests__/bulk-flyout.test.tsx index a953437..eca45a1 100644 --- a/src/ui/__tests__/bulk-flyout.test.tsx +++ b/src/ui/__tests__/bulk-flyout.test.tsx @@ -36,6 +36,7 @@ interface HarnessProps { footer?: 'apply-cancel' | null applyDisabled?: boolean onApply?: () => void + bodySx?: Record tabs?: BulkFlyoutTab[] panes?: BulkFlyoutPane[] rootPaneId?: string @@ -68,6 +69,7 @@ function Harness(props: HarnessProps) { footer={props.footer} applyDisabled={props.applyDisabled} onApply={props.onApply} + bodySx={props.bodySx} >
simple body
@@ -172,6 +174,18 @@ describe(' simple mode', () => { expect(find('[role="dialog"]')).not.toBeNull() }) + it('applies bodySx to the body container, not the shell', () => { + const { find } = render( + {}} bodySx={{ display: 'grid' }} />, + ) + const shell = find('[data-testid="rgp-bulk-flyout"]') as HTMLElement + const body = find('[data-testid="rgp-bulk-flyout-body"]') as HTMLElement + expect(shell).not.toBeNull() + expect(body).not.toBeNull() + expect(getComputedStyle(body).display).toBe('grid') + expect(getComputedStyle(shell).display).toBe('flex') + }) + it('injects keyframes wrapped in prefers-reduced-motion: no-preference', () => { render( {}} />) const style = document.getElementById('rgp-flyout-keyframes') diff --git a/src/ui/bulk-flyout.tsx b/src/ui/bulk-flyout.tsx index 60b560f..b3f1167 100644 --- a/src/ui/bulk-flyout.tsx +++ b/src/ui/bulk-flyout.tsx @@ -204,7 +204,6 @@ export function BulkFlyout(props: BulkFlyoutProps) { width, maxHeight, minWidth: width, - ...(bodySx ?? {}), }} data-testid="rgp-bulk-flyout" > @@ -216,6 +215,7 @@ export function BulkFlyout(props: BulkFlyoutProps) { px: 3, py: 2, minHeight: 0, + ...(bodySx ?? {}), }} data-testid="rgp-bulk-flyout-body" >