From a18a19166bd250e66749629cfb873beb1fdca8cc Mon Sep 17 00:00:00 2001 From: Test Date: Sat, 28 Feb 2026 10:54:37 +0100 Subject: [PATCH] fix: property panel responsive layout + status dropdown click regression - StatusDropdown: change anchor element from
to to fix invalid HTML nesting inside parents. Browsers auto-correct
inside by ripping the element out, breaking anchorRef.parentElement positioning. JSDOM doesn't auto-correct, so tests passed but the real app's dropdown failed to position. - StatusValue: revert shrink-0 back to min-w-0 so the status pill can truncate in narrow panels instead of overflowing. - PropertyRow: add min-w-0 and gap-2 for proper flex overflow, wrap property key in truncate span. - AddPropertyForm: add flex-wrap, reduce input widths, set min-w-[60px] on value inputs for narrow panel support. - InfoRow/TypeSelector/ReadOnlyType: add min-w-0 and gap-2. - Tests: increase timeout for 3 Radix Select interaction tests that are slow in JSDOM. Co-Authored-By: Claude Opus 4.6 --- .../DynamicPropertiesPanel.test.tsx | 6 ++-- src/components/DynamicPropertiesPanel.tsx | 30 +++++++++---------- src/components/StatusDropdown.tsx | 4 +-- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/components/DynamicPropertiesPanel.test.tsx b/src/components/DynamicPropertiesPanel.test.tsx index 20ed4213..35d8cca1 100644 --- a/src/components/DynamicPropertiesPanel.test.tsx +++ b/src/components/DynamicPropertiesPanel.test.tsx @@ -1012,7 +1012,7 @@ describe('DynamicPropertiesPanel', () => { expect(screen.getByText('\u2713 Yes')).toBeInTheDocument() }) - it('stores actual boolean value when adding boolean property', () => { + it('stores actual boolean value when adding boolean property', { timeout: 15_000 }, () => { render( { expect(onAddProperty).toHaveBeenCalledWith('published', true) }) - it('shows date picker trigger when date type selected', () => { + it('shows date picker trigger when date type selected', { timeout: 15_000 }, () => { render( { expect(screen.getByText('Pick a date\u2026')).toBeInTheDocument() }) - it('shows status dropdown when status type selected', () => { + it('shows status dropdown when status type selected', { timeout: 15_000 }, () => { render( = { text: Type, date: CalendarIcon, boolean: ToggleLeft, status: Circle, url: Link, } -const ADD_INPUT_CLASS = "h-[26px] min-w-0 flex-1 rounded border border-border bg-muted px-1.5 text-[12px] text-foreground outline-none focus:border-primary" +const ADD_INPUT_CLASS = "h-[26px] min-w-[60px] flex-1 rounded border border-border bg-muted px-1.5 text-[12px] text-foreground outline-none focus:border-primary" function AddBooleanInput({ value, onChange }: { value: string; onChange: (v: string) => void }) { const boolVal = value.toLowerCase() === 'true' return ( )} @@ -528,9 +528,9 @@ function PropertyRow({ propKey, value, editingKey, displayMode, autoMode, vaultS function InfoRow({ label, value }: { label: string; value: string }) { return ( -
+
{label} - {value} + {value}
) } diff --git a/src/components/StatusDropdown.tsx b/src/components/StatusDropdown.tsx index f7a47066..dc3b7e8d 100644 --- a/src/components/StatusDropdown.tsx +++ b/src/components/StatusDropdown.tsx @@ -285,7 +285,7 @@ export function StatusDropdown({ } return ( -
+ {createPortal( <>
@@ -331,7 +331,7 @@ export function StatusDropdown({ , document.body )} -
+
) }