merge feature/floatingwindow-zindex-dropdown-fix dans develop (fix z-index TicketViewportSelect)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@ -40,7 +40,8 @@ describe("TicketViewportSelect", () => {
|
|||||||
name: "filter by assignee",
|
name: "filter by assignee",
|
||||||
});
|
});
|
||||||
expect(listbox.parentElement).toBe(document.body);
|
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" }));
|
fireEvent.click(screen.getByRole("option", { name: "Alpha" }));
|
||||||
expect(onChange).toHaveBeenCalledWith("alpha");
|
expect(onChange).toHaveBeenCalledWith("alpha");
|
||||||
@ -102,4 +103,3 @@ describe("TicketViewportSelect", () => {
|
|||||||
expect(screen.queryByRole("listbox")).toBeNull();
|
expect(screen.queryByRole("listbox")).toBeNull();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -158,7 +158,7 @@ export function TicketViewportSelect({
|
|||||||
left: position.left,
|
left: position.left,
|
||||||
width: position.width,
|
width: position.width,
|
||||||
maxHeight: position.maxHeight,
|
maxHeight: position.maxHeight,
|
||||||
zIndex: zIndex.menuDropdown,
|
zIndex: zIndex.transientPopup,
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{options.map((option) => (
|
{options.map((option) => (
|
||||||
|
|||||||
@ -7,9 +7,10 @@
|
|||||||
* LayoutGrid/LeafView (G5).
|
* LayoutGrid/LeafView (G5).
|
||||||
*
|
*
|
||||||
* Consumers: `FloatingWindow` (floatingWindow), `MenuBar` dropdowns
|
* Consumers: `FloatingWindow` (floatingWindow), `MenuBar` dropdowns
|
||||||
* (menuDropdown), `TicketPicker` (floatingWindowNested), background-task toasts
|
* (menuDropdown), `TicketPicker` (floatingWindowNested), transient popups opened
|
||||||
* (toast). Introduced by lot B (#18) and adopted as the canonical scale by lot A
|
* from floating windows (transientPopup), background-task toasts (toast).
|
||||||
* (#16). See the sprint scoping note `ui-rework-sprint-scoping-contracts`.
|
* 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 = {
|
export const zIndex = {
|
||||||
/** Dropdown menus / popovers anchored to a control. */
|
/** 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
|
/** A floating window opened from within another floating window (e.g. a
|
||||||
* ticket picker launched from a sprint/link dialog). Sits above it. */
|
* ticket picker launched from a sprint/link dialog). Sits above it. */
|
||||||
floatingWindowNested: 60,
|
floatingWindowNested: 60,
|
||||||
|
/** Viewport-positioned popups that must float above their owning window. */
|
||||||
|
transientPopup: 65,
|
||||||
/** Transient toasts, always on top. */
|
/** Transient toasts, always on top. */
|
||||||
toast: 70,
|
toast: 70,
|
||||||
} as const;
|
} as const;
|
||||||
|
|||||||
Reference in New Issue
Block a user