From ec305657adfc8ae1be6496a6de63535710148bb1 Mon Sep 17 00:00:00 2001 From: Blomios Date: Tue, 28 Jul 2026 22:37:36 +0200 Subject: [PATCH] fix(tickets): TicketViewportSelect passe au-dessus des FloatingWindow MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Le popup viewport-positionné utilisait zIndex.menuDropdown (40), inférieur à zIndex.floatingWindow (50) : il s'affichait derrière une fenêtre flottante ouverte. Ajout de zIndex.transientPopup (65), au-dessus de floatingWindow et floatingWindowNested, pour tout popup transitoire porté par document.body depuis une FloatingWindow. Co-Authored-By: Claude Opus 4.8 --- .../src/features/tickets/TicketViewportSelect.test.tsx | 4 ++-- frontend/src/features/tickets/TicketViewportSelect.tsx | 2 +- frontend/src/shared/ui/zIndex.ts | 9 ++++++--- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/frontend/src/features/tickets/TicketViewportSelect.test.tsx b/frontend/src/features/tickets/TicketViewportSelect.test.tsx index 0b07c2a..8961124 100644 --- a/frontend/src/features/tickets/TicketViewportSelect.test.tsx +++ b/frontend/src/features/tickets/TicketViewportSelect.test.tsx @@ -40,7 +40,8 @@ describe("TicketViewportSelect", () => { name: "filter by assignee", }); expect(listbox.parentElement).toBe(document.body); - expect(listbox.style.zIndex).toBe(String(zIndex.menuDropdown)); + expect(listbox.style.zIndex).toBe(String(zIndex.transientPopup)); + expect(zIndex.transientPopup).toBeGreaterThan(zIndex.floatingWindow); fireEvent.click(screen.getByRole("option", { name: "Alpha" })); expect(onChange).toHaveBeenCalledWith("alpha"); @@ -102,4 +103,3 @@ describe("TicketViewportSelect", () => { expect(screen.queryByRole("listbox")).toBeNull(); }); }); - diff --git a/frontend/src/features/tickets/TicketViewportSelect.tsx b/frontend/src/features/tickets/TicketViewportSelect.tsx index b67b0a9..66ce9eb 100644 --- a/frontend/src/features/tickets/TicketViewportSelect.tsx +++ b/frontend/src/features/tickets/TicketViewportSelect.tsx @@ -158,7 +158,7 @@ export function TicketViewportSelect({ left: position.left, width: position.width, maxHeight: position.maxHeight, - zIndex: zIndex.menuDropdown, + zIndex: zIndex.transientPopup, }} > {options.map((option) => ( diff --git a/frontend/src/shared/ui/zIndex.ts b/frontend/src/shared/ui/zIndex.ts index 00cacd9..7e2035f 100644 --- a/frontend/src/shared/ui/zIndex.ts +++ b/frontend/src/shared/ui/zIndex.ts @@ -7,9 +7,10 @@ * LayoutGrid/LeafView (G5). * * Consumers: `FloatingWindow` (floatingWindow), `MenuBar` dropdowns - * (menuDropdown), `TicketPicker` (floatingWindowNested), background-task toasts - * (toast). Introduced by lot B (#18) and adopted as the canonical scale by lot A - * (#16). See the sprint scoping note `ui-rework-sprint-scoping-contracts`. + * (menuDropdown), `TicketPicker` (floatingWindowNested), transient popups opened + * from floating windows (transientPopup), background-task toasts (toast). + * Introduced by lot B (#18) and adopted as the canonical scale by lot A (#16). + * See the sprint scoping note `ui-rework-sprint-scoping-contracts`. */ export const zIndex = { /** Dropdown menus / popovers anchored to a control. */ @@ -19,6 +20,8 @@ export const zIndex = { /** A floating window opened from within another floating window (e.g. a * ticket picker launched from a sprint/link dialog). Sits above it. */ floatingWindowNested: 60, + /** Viewport-positioned popups that must float above their owning window. */ + transientPopup: 65, /** Transient toasts, always on top. */ toast: 70, } as const;